Created
June 12, 2018 12:31
-
-
Save evagonz/e9078b336cae20ae37e2f79dbb22712e to your computer and use it in GitHub Desktop.
Jenkinsfile example for: https://medium.com/devopslinks/a-hacky-hackers-guide-to-hacking-together-jenkins-scripted-pipelines-and-getting-them-to-do-things-a1e943cb8d11
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
stage('get code') { | |
node('jenkins-worker') { | |
// just by specifying your git credentials and repo, the pipeline knows to check it out and run the next steps from that repo | |
git credentialsId: '$key', url: 'git@github.com:$usr/$repo.git', branch: "${env.BRANCH_NAME}" | |
// this is a script in the root of the $repo.git repository | |
sh './run-me.sh' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment