Skip to content

Instantly share code, notes, and snippets.

@domdorn
Last active March 14, 2021 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domdorn/9d53f37da39d18dc689b440a63951143 to your computer and use it in GitHub Desktop.
Save domdorn/9d53f37da39d18dc689b440a63951143 to your computer and use it in GitHub Desktop.
SBT, Artifactory Credentials + Jenkins Pipeline
pipeline {
environment {
ARTIFACTORY_ACCESS_TOKEN = credentials('acme-jenkins-artifactory-access-token')
}
stages {
stage('Compile & test & stage') {
steps {
script {
sh "echo 'credentials += Credentials(\"Artifactory Realm\", \"artifactory.power.inet\", \"${ARTIFACTORY_ACCESS_TOKEN_USR}\", \"${ARTIFACTORY_ACCESS_TOKEN_PSW}\")' > credentials.sbt"
}
script {
sh "sbt ';compile;test:compile;docker:stage;'"
}
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment