변경사항이 있을 때마다 Daemon 을 멈추고 Git pull 하고 하는 반복 작업이 번거롭다고 느껴집니다.
Jenkins 를 사용해 좀 더 편한 환경을 만들어 봅시다.
Java 가 필요합니다. 설치되있는지 확인하고 없다면 설치해 줍시다.
$ sudo apt-get install openjdk-8-jdk
bell-sw.com/pages/repositories/#apt
Liberica Package Repositories
Liberica is a 100% open-source Java 8, 9, 10, 11, 12, 13, 14 & 15 implementation. It is built from OpenJDK which BellSoft contributes to, thoroughly tested and passed the JCK as provided under the license from OpenJDK.
bell-sw.com
www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-20-04
API 키 추가
$ wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
$ sudo apt update
젠킨스 설치
$ sudo apt install jenkins
젠킨스 실행
$ sudo systemctl start jenkins
실행 확인
$ sudo systemctl status jenkins
방화벽 해제
$ sudo ufw allow 8080
젠킨스 접속
[URL]:8080
Admin 암호 확인
$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Admin 암호 입력
Jenkins 권한 문제로 빌드가 되지 않는다면?
sgoyal.net/2016/11/18/run-a-shell-from-jenkins-using-sudo-ubuntu/
Run a shell from Jenkins using sudo (Ubuntu)
Running shell commands which have sudo might not worked as expected as jenkins doesn’t have access to read passwords from your linux box. Are you familiar with below error? sudo: no tty prese…
sgoyal.net
could not lock config file .git/config: Permission denied
Jenkins 에 Sudo 권한 부여
Jenkins에서 sudo 권한을 실행시키기
Jenkins에서 sudo 권한이 필요한 명령어 실행시키기 일단 확인을 좀 더 쉽게 하기 위해서 간단한 테스트용 job을 만들고, 아래와 같이 Execute shell을 설정해준다 실행을 시켜보면 아래와 같은 Console 결
labs.ssen.name
Sudo 권한 부여는 됬지만 Git 이슈는 해결되지 않음.
해당 작업 경로의 권한 변경
$ chown -R jenkins:jenkins [작업 경로]
Github 에서 온 메일
Hi @####
You recently used a password to access the repository at ### with git using git/###
Basic authentication using a password to Git is deprecated and will soon no longer work. Visit https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information around suggested workarounds and removal dates.
Thanks,
The GitHub Team
이제 아이디/비밀번호 형식으로 사용하지 못하는 듯 합니다.
SSH 방식으로 변경하니 잘 됩니다.
'Works > Web' 카테고리의 다른 글
[Web] 서버 이사: 라즈베리파이 Ubuntu Server 설치 (0) | 2021.01.28 |
---|---|
[Web] Maria DB 설치 및 사용 (0) | 2021.01.16 |
[Web] Mac OS 에서 SSL 인증 받기 (1) | 2021.01.02 |
[Web] 공통 HTML 코드 별도로 관리하기 (0) | 2021.01.02 |
[Web] Cloud FireStore 관리자 생성 및 관리자 접근 권한 부여 (0) | 2020.12.31 |
댓글