Skip to content

Commit

Permalink
attempt to deploy on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelDudley committed Dec 17, 2018
1 parent 0fe7590 commit f090d16
Showing 1 changed file with 51 additions and 39 deletions.
90 changes: 51 additions & 39 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
pipeline {
agent any

stages {
stage('Build') {
steps {
echo 'Building'
}
}
stage('Test') {
steps {
echo 'Testing'
}
}
stage('Deploy') {
when { tag "v*" }
steps {
echo 'Deploying only because this commit is tagged...'
}
}
}
post {
always {
echo 'This will always run'
}
success {
echo 'This will run only if successful'
}
failure {
echo 'This will run only if failed'
}
unstable {
echo 'This will run only if the run was marked as 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'
}
}
}
agent any
stages {
stage('Build') {
steps {
echo 'Building'
}
}
stage('Test') {
steps {
echo 'Testing'
}
}
stage('Deploy') {
when {
tag 'v*'
}
steps {
echo 'Deploying only because this commit is tagged...'
git(url: 'https://github.com/goodrobots/maverick-api.git', branch: 'stable', changelog: true)
}
}
}
post {
always {
echo 'This will always run'

}

success {
echo 'This will run only if successful'

}

failure {
echo 'This will run only if failed'

}

unstable {
echo 'This will run only if the run was marked as 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'

}

}
}

0 comments on commit f090d16

Please sign in to comment.