Skip to content

Commit

Permalink
Merge pull request #3129 from AdamBrousseau/fix_artifactory_setup
Browse files Browse the repository at this point in the history
Only set Artifactory env variables if they are not null
  • Loading branch information
Shelley Lambert authored Oct 3, 2018
2 parents b7d953b + ffe0bbb commit 1fe87fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions buildenv/jenkins/common/variables-functions
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,12 @@ def set_slack_channel() {
}

def set_artifactory_config() {
env.ARTIFACTORY_SERVER = VARIABLES.artifactory_server
env.ARTIFACTORY_REPO = VARIABLES.artifactory_repo
// Set Creds to env so that the parent pipeline can retireve them.
env.ARTIFACTORY_CREDS = VARIABLES.artifactory_creds
env.ARTIFACTORY_NUM_ARTIFACTS = VARIABLES.artifactory_num_artifacts
if (ARTIFACTORY_SERVER) {
if (VARIABLES.artifactory_server) {
env.ARTIFACTORY_SERVER = ARTIFACTORY_SERVER
env.ARTIFACTORY_REPO = VARIABLES.artifactory_repo
// Set Creds to env so that the parent pipeline can retireve them.
env.ARTIFACTORY_CREDS = VARIABLES.artifactory_creds
env.ARTIFACTORY_NUM_ARTIFACTS = VARIABLES.artifactory_num_artifacts
echo "Using artifactory server/repo: ${ARTIFACTORY_SERVER} / ${ARTIFACTORY_REPO}"
echo "Using artifactory credentials: ${ARTIFACTORY_CREDS}"
echo "Keeping '${ARTIFACTORY_NUM_ARTIFACTS}' artifacts"
Expand Down

0 comments on commit 1fe87fa

Please sign in to comment.