Skip to content

Instantly share code, notes, and snippets.

@domdorn

domdorn/Jenkinsfile Secret

Last active Mar 14, 2021
Embed
What would you like to do?
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