-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0fe7590
commit f090d16
Showing
1 changed file
with
51 additions
and
39 deletions.
There are no files selected for viewing
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
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' | ||
|
||
} | ||
|
||
} | ||
} |