Skip to content

Instantly share code, notes, and snippets.

@icheko
Last active July 26, 2019 21:58
Show Gist options
  • Save icheko/d238978a046d40d764e381ecc2ec4ef1 to your computer and use it in GitHub Desktop.
Save icheko/d238978a046d40d764e381ecc2ec4ef1 to your computer and use it in GitHub Desktop.
library identifier: 'icheko-jenkins-shared-lib@master',
retriever: modernSCM([
$class: 'GitSCMSource',
id: '13ebda5f-2be5-4751-83d4-4d4500603cc5',
remote: 'https://github.com/icheko/jenkins-shared-lib',
traits: [[$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait']]
]) _
pipeline {
agent any
stages {
stage('Define environment') {
agent any
steps{
script{
env.DEPLOY_ENV = readCommitVar('deploy')
println env.DEPLOY_ENV
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment