From f090d164553e18c47219deba9e5d9fd9a1a8c460 Mon Sep 17 00:00:00 2001 From: Samuel Dudley Date: Mon, 17 Dec 2018 22:28:05 +1030 Subject: [PATCH] attempt to deploy on tag --- Jenkinsfile | 90 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5d6043e..bb4f3ef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' + + } + + } +} \ No newline at end of file