TODO
https://juyeonee826.tistory.com/180
NodeJS 애플리케이션 Docker 배포하는 Jenkins Pipeline 생성
* 아래 강의 학습 중📚 Udemy - DevOps 학습: 파이프라인 및 Docker를 이용한 Jenkins 와의 CI/CD 환경 jenkins 2.401.3 TODO https://juyeonee826.tistory.com/177 Jenkins로 NodeJs 애플리케이션 Docker 배포 * 아래 강의 학습 중
juyeonee826.tistory.com
여기서 UI로 생성하는 Pipeline Project를 Job DSL로 생성해보려고 한다.
job dsl 코드 작성
docker_demo_pipeline.groovy
pipelineJob('nodejs pipeline dsl') {
definition {
cpsScm {
scm {
git {
remote {
url('https://github.com/%%%%%/docker-demo.git')
}
branch('*/master')
scriptPath('misc/Jenkinsfile')
}
}
lightweight()
}
}
}
시드 프로젝트 생성
job dsl로 작성한 pipeline 프로젝트를 생성해줄 기반이 될 seed 프로젝트 생성하기
script names may only contain letters, digits and underscores, but may not start with a digit
빌드 했더니 숫자, 문자, _ 이렇게만 가능하다구 한다.
script approve
스크립드 승인까지 하면 완료.
+
seed project 삭제해도 child project 삭제 안 된다!
참고
https://plugins.jenkins.io/job-dsl/
Job DSL
This plugin allows Jobs and Views to be defined via DSLs
plugins.jenkins.io
Jenkins Job DSL: How to read Pipeline DSL script from file?
I want to generate my pipeline plugin based jobs via Job DSL, which is contained in a git repository that is checked out by Jenkins. However, I think it is not very nice to have the pipeline scri...
stackoverflow.com
'DevOps > Jenkins' 카테고리의 다른 글
[AWS CLI] ECS 서비스 우선순위 기반 Task 분배 자동화 (0) | 2025.04.04 |
---|---|
[Jenkins] 스케줄 직관적으로 확인하기 위한 Calendar View 플러그인 설치 (0) | 2023.08.01 |
[Jenkins/Java17] Jenkins Java 17 프로젝트 배포(JDK 추가, Jib image JDK) (0) | 2022.12.31 |
[AWS/Jenkins] Spring Boot Jenkins+ECR+ECS를 이용한 CI/CD (0) | 2022.10.23 |
[Jenkins] 젠킨스 배치 실패 시 재시도 플러그인 설치(Naginator) (0) | 2022.04.27 |