1234567891011121314151617181920212223242526272829303132333435363738394041 |
- pipeline {
- agent {
- dockerfile {
- filename 'Dockerfile'
- registryUrl 'https://registry.docker-cn.com'
- args '-p 8081:8080 --security-opt apparmor=unconfined'
- }
- }
- stages {
- stage('Maven Test and Deploy') {
- steps {
- sh "mvn clean install"
- }
- }
- 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/catalina.sh run'
- }
- }
- stage('Deliver'){
- steps {
- input message: 'Finished using the server site? (Click "Proceed" to continue)'
- }
- }
- }
- post {
- always {
- cleanWs()
- }
- }
- }
|