Add deploy

This commit is contained in:
Mario 2018-11-27 15:23:49 -08:00
parent be68067140
commit 507080a398

36
Jenkinsfile vendored
View file

@ -1,38 +1,26 @@
pipeline { pipeline {
agent any agent any
stages { stages {
stage("Test") { stage('Build') {
steps { steps {
sh 'echo "Running tests"' echo 'Building'
} }
} }
stage("Build") { }
stage('Test') {
steps { steps {
sh 'echo "Hello World"' echo 'Testing'
sh '''
echo "Multiline shell steps work too"
ls -lah
pwd
'''
} }
} }
stage('Deploy - Staging') {
steps {
sh './deploy staging'
sh './run-smoke-tests'
} }
post {
always {
echo 'This will always run'
} }
success { stage('Deploy - Production') {
echo 'This will run only if successful' steps {
} sh './deploy production'
failure {
echo 'This will run only if failed'
}
unstable {
echo 'This will run only if the run was marked unstable'
}
changed {
echo 'This will run only if the state of the Pipeline has changed'
echo 'For example, if the Pipeline was previously failing but is now successful'
} }
} }
} }