Created
September 12, 2018 17:54
-
-
Save satishgadhave/18df95ec799a7ef28a63c6c6c333e8f1 to your computer and use it in GitHub Desktop.
This a test groovy code to create Jenkins 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 | |
triggers { | |
cron('5 0 * * *') | |
} | |
stages { | |
stage('Process Price Feed') { | |
steps { | |
timeout(time: 10, unit: 'MINUTES') { | |
retry(3) { | |
echo 'Running shell commands to process feed' | |
// ... commands | |
} | |
} | |
} | |
} | |
stage('Update cache storage') { | |
steps { | |
retry(3) { | |
echo 'Running shell commands update cache' | |
// ... commands | |
} | |
} | |
} | |
stage('Calculate discounts') { | |
steps { | |
timeout(time:15, unit: 'MINUTES') { | |
retry(3) { | |
echo 'Running jenkins job to calculate discounts' | |
// ... commands | |
} | |
} | |
} | |
} | |
stage('Assign discounted products to SALE category') { | |
steps { | |
retry(3) { | |
echo 'Running jenkins job to assign products to SALE category' | |
// ... commands | |
} | |
} | |
} | |
} | |
post { | |
always { | |
// send email notification | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment