Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
added release through ssh key
Browse files Browse the repository at this point in the history
  • Loading branch information
Joaquimmnetto committed Jul 8, 2021
1 parent e155c22 commit ee69269
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ pipeline {
ATLAS_GITHUB_INTEGRATION = credentials('github_integration')
ATLAS_GITHUB_INTEGRATION_USERNAME = "${ATLAS_GITHUB_INTEGRATION_USR}"
ATLAS_GITHUB_INTEGRATION_PASSWORD = "${ATLAS_GITHUB_INTEGRATION_PSW}"
GRGIT_USER = "${ATLAS_GITHUB_INTEGRATION_USR}"
GRGIT_PASS = "${ATLAS_GITHUB_INTEGRATION_PSW}"

}
parameters {
choice(name: 'releaseType', choices: ['NONE', 'MAJOR', 'MINOR', 'PATCH'],
Expand All @@ -39,6 +38,10 @@ pipeline {
agent any
stages {
stage("Check") {
environment {
GRGIT_USER = "${ATLAS_GITHUB_INTEGRATION_USR}"
GRGIT_PASS = "${ATLAS_GITHUB_INTEGRATION_PSW}"
}
steps { gradleWrapper "check" }
post {
always {
Expand All @@ -51,23 +54,22 @@ pipeline {
"-Dsonar.tests=test/ " +
"-Dsonar.jacoco.reportPaths=build/jacoco/test.exec"
}
failure {
cleanWs()
}
}
}
stage("Release") {
when {
expression { !(params.releaseType in [null, "", "NONE"]) }
}
steps {
gradleWrapper "branchVersion -P version.updateType=${params.releaseType}"
}
post {
cleanup {
cleanWs()
sshagent(['atlas_jenkins_pipeline_deploy_key']) {
gradleWrapper "branchVersion -P version.updateType=${params.releaseType}"
}
}
}
}
post {
cleanup {
cleanWs()
}
}
}

0 comments on commit ee69269

Please sign in to comment.