-
jenkins (maven pipeline ssh)docker 2023. 10. 19. 14:40
https://www.jenkins.io/blog/2017/02/07/declarative-maven-project/ (참고사이트)
Declarative Pipeline for Maven Projects
The next thing we’ll add in this Pipeline is a tools section to let us use Maven. The tools section is one of several sections we can add under pipeline, which affect the configuration of the rest of the Pipeline. (We’ll look at the others, including a
www.jenkins.io
pipeline {
agent any
tools {
maven 'maven3.9.5'
}
stages {
stage('github clone') {
steps {
git branch: 'main', url: 'https://github.com/qkrwo8520/jenkins.git';
}
}
stage('build') {
steps {
sh '''
echo build start
mvn clean compile package -DskipTests=true
'''
}
}
}
}
pipeline {
agent any
tools {
maven 'maven3.9.5'
}
stages {
stage('github clone') {
steps {
git branch: 'main', url: 'https://github.com/qkrwo8520/jenkins.git';
}
}
stage('build') {
steps {
sh '''
echo build start
mvn clean compile package -DskipTests=true
'''
}
}
stage(deploy) {
steps {
deploy adapters: [tomcat9(credentialsId: 'deployeruser01', path: '', url: 'http://192.168.2.1:8081')], contextPath: null, war: '**/*.war';
}
}
}
}docker server 이미지 올리기
ssh 생성
빌드 성공 오류가 나오면 오류 내용 확인
docker-server2 전달 확인'docker' 카테고리의 다른 글
ansible laC (0) 2023.10.16 docker (자동빌드) (0) 2023.10.12 docker (ubuntu tomcat) (0) 2023.10.11 docker (tomcat) (0) 2023.10.11 docker (maven),(tomcat) (0) 2023.10.10