일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- intent
- 16197
- spring
- insert
- Algorithm
- github
- Jenknis
- activity
- 데이터
- 안드로이드
- 알고리즘
- goland
- broadcastreceiver
- 단축키
- Java
- vscode
- 큐빙
- ubuntu
- 17837
- Android
- 두 동전
- 백준
- service
- IntelliJ
- data
- 프로그래머스
- 제어반전
- 데이터전달
- mysql
- git
- Today
- Total
해보자
[Jenkins] local git pipeline 실행하기 본문
1. Jenkins download
https://www.jenkins.io/download/
Jenkins download and deployment
Jenkins download and deployment The Jenkins project produces two release lines: Stable (LTS) and regular (Weekly). Depending on your organization's needs, one may be preferred over the other. See the links below for more information and recommendations abo
www.jenkins.io
jenkins.war 파일을 다운로드 받는다.
2. Jenkins 실행
sudo java -Dmail.smtp.starttls.enable=true -Dhudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT=true -jar jenkins.war -httpListenAddress=127.0.0.1 --httpPort=9090
- GitSCM.ALLOW_LOCAL_CHECKOUT=true : local git을 허용한다는 옵션
- httpPort : default는 8080. 자주 사용하는 port이므로 9090을 사용하도록 설정
- java가 설치되어 있어야 한다.
localhost:9090으로 접속해서 기본 셋팅을 한다. (이 부분은 생략.. 아래 Reference 사이트에도 잘 나와있음)
3. jenkinsfile 작성
1) 실행할 프로젝트 폴더를 만든다.
2) git init
3) jenkinsfile 작성한다.
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building..'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
}
4. 새로운 Item(pipeline)생성
- 새로운 Item > pipeline
- Pipeline > pipeline script from Scm 선택 > SCM : git > Repository URL : ${project 경로}
- 저장 후 build 하면 pipeline이 동작한다.
Reference
https://blog.devops.dev/jenkins-introduction-setup-22cb341f1935
Jenkins: Introduction & Setup
Jenkins is among the top choice due to its open-source code, and its general acceptability to integrate with external services (e.g…
blog.devops.dev
'CICD' 카테고리의 다른 글
[Jenkins] Pipeline post 활용하기 (0) | 2022.08.23 |
---|