| 1234567891011121314151617181920212223242526272829303132333435363738 |
- 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 -version"
- sh "mvn test"
- sh "mvn deploy"
- }
- }
- stage('SonarQube Analysis') {
- steps {
- sh 'sonar-scanner'
- }
- }
- stage('Deliver'){
- steps {
- input message: 'Finished using the server site? (Click "Proceed" to continue)'
- }
- }
- }
- post {
- always {
- cleanWs()
- }
- }
- }
|