티스토리 뷰
Mac
#jenkins 공식 이미지 실행
#https://hub.docker.com/r/jenkins/jenkins/tags
docker run jenkins/jenkins
#initail setup -> passwrod
#This may also be found at: /var/jenkins_home/secrets/initialAdminPassword
79e6fe31c9a14c51b0ae6122f046eccb
admin / admin
macOS Installers for Jenkins LTS
Sample commands:
Install the latest LTS version: brew install jenkins-lts
Install a specific LTS version: brew install jenkins-lts@YOUR_VERSION
Start the Jenkins service: brew services start jenkins-lts
Restart the Jenkins service: brew services restart jenkins-lts
Update the Jenkins version: brew upgrade jenkins-lts
#cmd
brew services start jenkins-lts
# ba32f9c556c94c979db7a6f16a5f636c
jenkins/secrets/initialAdminPassword
admin / admin
http://localhost:8080/
Windows 10 WSL2 - ubuntu 20.04
- version : 2.263.4
wget --no-check-certificate -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt update
#certificate error
Ign:1 https://pkg.jenkins.io/debian-stable binary/ InRelease
Err:2 https://pkg.jenkins.io/debian-stable binary/ Release
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 151.101.78.133 443]
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Reading package lists... Done
E: The repository 'https://pkg.jenkins.io/debian-stable binary/ Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
- 인증서 생성
- cer 파일 다운로드
- https://pkg.jenkins.io/debian-stable/
- jenkins.cer
- https://prodjenkinsreleases.blob.core.windows.net/
- jenkins2.cer
- https://get.jenkins.io/debian-stable/
- jenkins3.cer
- https://ftp.yz.yamagata-u.ac.jp/pub/misc/jenkins/debian-stable
- jenkins4.cer
- https://mirrors.tuna.tsinghua.edu.cn/jenkins/debian-stable/
- jenkins5.cer
- https://pkg.jenkins.io/debian-stable/
- cer → crt 파일 변환
- https://sourceforge.net/projects/openssl/
- openssl download → 압축해제 → $openssl/bin/openssl 사용
cd $openssl openssl x509 -inform PEM -in /mnt/d/example/jenkins/cert/jenkins.cer -out /mnt/d/example/jenkins/crt/jenkins.crt openssl x509 -inform PEM -in /mnt/d/example/jenkins/cert/jenkins2.cer -out /mnt/d/example/jenkins/crt/jenkins2.crt openssl x509 -inform PEM -in /mnt/d/example/jenkins/cert/jenkins3.cer -out /mnt/d/example/jenkins/crt/jenkins3.crt openssl x509 -inform PEM -in /mnt/d/example/jenkins/cert/jenkins4.cer -out /mnt/d/example/jenkins/crt/jenkins4.crt openssl x509 -inform PEM -in /mnt/d/example/jenkins/cert/jenkins5.cer -out /mnt/d/example/jenkins/crt/jenkins5.crt
- 인증서 복사
#/usr/share/ca-certificates cp /mnt/d/example/jenkins/crt/jenkins.crt /usr/share/ca-certificates cp /mnt/d/example/jenkins/crt/jenkins2.crt /usr/share/ca-certificates cp /mnt/d/example/jenkins/crt/jenkins3.crt /usr/share/ca-certificates cp /mnt/d/example/jenkins/crt/jenkins4.crt /usr/share/ca-certificates cp /mnt/d/example/jenkins/crt/jenkins5.crt /usr/share/ca-certificates
- ubuntu에 인증서 추가
sudo dpkg-reconfigure ca-certificates #선택은 스페이스 #방금 추가한 jenkins.crt, jenkins2.crt 추가
- java 인증서 추가
cd /mnt/c #인증서 추가 /usr/lib/jvm/java-11-openjdk-amd64/bin/keytool -keystore /etc/ssl/certs/java/cacerts -importcert -alias HQSS L -file ./HQSSL.cer #인증서 확인 /usr/lib/jvm/java-11-openjdk-amd64/bin/keytool -v -list -keystore /etc/ssl/certs/java/cacert -alias HQSSL
- 명령어 재실행
sudo apt update apt-get upgrade
- 계정 생성
#계정생성 sudo useradd jenkins #pw=jenkins sudo passwd jenkins #home dir 생성 sudo mkdir /home/jenkins #admin 그룹에 추가 sudo usermod -a -G adm jenkins sudo apt install jenkins sudo apt-get install jenkins
- jenkins 구동
#root 계정 sudo service jenkins start
http://localhost:8080/#password 조회 후 화면에 입력- jenkins 접속
cat /var/lib/jenkins/secrets/initialAdminPassword- 플러그인 설치
- offline
- wsl ubuntu에서는 proxy 설정없이 skip 하고 추후 플러그인 설정
- offline
- create first admin user
- admin / admin
- cer 파일 다운로드
- c7b403250ecb4e2094c96f00b61e710d
``` - #unlock jenkins 로 실행
- sudo service jenkins stop
#root 계정 sudo service jenkins start sudo service jenkins restart sudo service jenkins stop
Plugin 관리
Jenkins > Jenkins 관리 > 플러그인 관리
http://localhost:8080/pluginManager/
#path
/var/lib/jenkins/plugins
- ssl 오류
#skip-certificate-check download
wget --no-check-certificate https://updates.jenkins-ci.org/download/plugins/skip-certificate-check/1.0/skip-certificate-check.hpi
sudu service jenkins restart
- 재시작 후 plugin 업데이트
- 설치
- global slack notifier
- job configuration history
- build timeout
- build with parameters
- publish over ssh
- blueocean
Maven
- Jenkins 관리 > Global Tool Configuration > Maven 영역 > Maven installations > Add Maven 클릭 > maven 정보 입력
#version
maven 3.6.3
/usr/share/maven
'Programming > Jenkins' 카테고리의 다른 글
[Jenkins] Jenkins API (0) | 2021.05.09 |
---|---|
[Jenkins] Jenkins? (0) | 2021.05.09 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Algorithm
- ArrayList
- 자바
- 문자열
- 리스트
- 알고리즘
- 잠실맛집
- 송리단길맛집
- 티스토리초대장
- 초대장
- mysql
- jenkins
- 서울카페
- string
- 자료구조
- Java
- docker
- PreparedStatement
- 도커
- JDBC
- keycloak
- spring
- Database
- elastic stack
- db
- scouter
- 미사맛집
- kafka
- 카프카
- Array
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
글 보관함