diff --git a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy index fbacba5d..2c306ce2 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy @@ -1,5 +1,7 @@ package com.freeleaps.devops +import java.net.URLEncoder + class SemanticReleasingExecutor { def steps def workspace @@ -25,7 +27,9 @@ class SemanticReleasingExecutor { steps.dir(steps.env.workroot) { steps.withCredentials([steps.usernamePassword(credentialsId: credentialsId, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) { - steps.env.GIT_CREDENTIALS = "${steps.env.GIT_USERNAME}:${steps.env.GIT_PASSWORD}" + def credentials = "${steps.env.GIT_USERNAME}:${steps.env.GIT_PASSWORD}" + def encodedCredentials = URLEncoder.encode(credentials, 'UTF-8') + steps.env.GIT_CREDENTIALS = encodedCredentials steps.writeFile file: '.releaserc.json', text: steps.libraryResource(config) steps.log.info("SemanticReleasingExecutor", "Installing semantic-release requirements...") steps.sh "apt-get -y update && apt-get install -y --no-install-recommends git apt-transport-https ca-certificates curl wget gnupg"