| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- pipeline {
- agent {
- dockerfile {
- filename 'Dockerfile'
- registryUrl 'https://registry.docker-cn.com'
- args '-p 84:84 -p 8081:8080 --security-opt apparmor=unconfined'
- }
- }
- stages {
- stage('Confirm to Proceed') {
- steps {
- input message: 'Proceed? (Click "Proceed" to continue)'
- }
- }
- stage('Maven Test and Deploy') {
- steps {
- sh "mvn clean package"
- }
- }
- stage('SonarQube Analysis') {
- steps {
- sh 'sonar-scanner'
- }
- }
- stage('Import to Webapps')
- steps {
- sh 'cp ./target/BI.war /apache-tomcat9/webapps'
- }
- stage('Start Tomcat9'){
- steps {
- sh '/apache-tomcat9/bin/startup.sh'
- }
- }
- stage('Deliver'){
- steps {
- input message: 'Finished using the server site? (Click "Proceed" to continue)'
- }
- }
- }
- post {
- always {
- cleanWs()
- }
- }
- }
|