-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jenkins 학습하기 #5
Labels
Comments
|
jenkins docker container 실행하기
Jenkins???
Jenkins 특징
docker coontainer 에서 젠킨스 실행시키기1. jenkins 이미지 다운로드docker pull jenkins/jenkins:lts 2. jenkins docker container 실행docker run -d \
--name jenkins-docker \
-p 7979:8080 -p 50000:50000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v jenkins_home:/var/jenkins_home \
-u root \
jenkins/jenkins:lts
3. jenkins 내부에서 docker 명령어를 사용하기 위해 도커를 설치# jenkins container bash 실행
docker exec -it jenkins-docker bash
curl https://get.docker.com/ > dockerinstall && chmod 777 dockerinstall && ./dockerinstall
# docker-compose 명령어를 사용하기 위해 필요
apt install docker-compose 4. dokcer.sock 파일 권한 666으로 변경해서 다른 사용자도 접근 가능하도록 변경exit # 컨테이너 접속해제 후 진행
sudo chmod 666 /var/run/docker.sock
5. jenkins 접속
|
EC2 에서 jenkins CI 구축하기
배포 환경
Steps1. yum 패키지 매지너 최신 업데이트sudo yum -y update 2. yum 이 설치할 jenkins repository 경로 추가sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo 3. Jenkins GPG key 추가
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key 4. Jenkins 설치
5. jenkins 시작
6. 서버 포트 확인
7. init password 확인
8. customize jenkins > Install suggested plugins9. create user |
파이프라인 practice
1. pipeline sample
2. scripted 문법 소개(1) 문법
|
jenkins ssh key 를 통해 인증하기
1. SSH 키 생성 및 등록
ssh-keygen -t rsa -f id_rsa
(출처 : Ssh-keygen - 리눅스 명령 - 유닉스 명령) 키 확인
2. Jenkins > Credentials/System > Add Credentials 설정
3. repository deploy key 설정
4. repository webhook 설정# 예시
http://ec12345678.compute-1.amazonaws.com/github-webhook/
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: