-
-
Save unixnut/de500a60739f6ba05179e94b0841c64d to your computer and use it in GitHub Desktop.
Jenkinsfile for demo app-pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
stages { | |
stage('Build') { | |
steps { | |
echo 'Build demo-app' | |
sh 'sh run_build_script.sh' | |
} | |
} | |
stage('Linux Tests') { | |
parallel { | |
stage('Linux Tests') { | |
steps { | |
echo 'Run Linux tests' | |
sh 'sh run_linux_tests.sh' | |
} | |
} | |
stage('Windows Tests') { | |
steps { | |
echo 'Run Windows tests' | |
} | |
} | |
} | |
} | |
stage('Deploy Staging') { | |
steps { | |
echo 'Deploy to staging environment' | |
input 'Ok to deploy to production?' | |
} | |
} | |
stage('Deploy Production') { | |
post { | |
always { | |
archiveArtifacts(artifacts: 'target/demoapp.jar', fingerprint: true) | |
} | |
failure { | |
emailext(subject: 'Demoapp build failure', to: 'ci-team@example.com', body: 'Build failure for demoapp Build ${env.JOB_NAME} ') | |
} | |
} | |
steps { | |
echo 'Deploy to Prod' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment