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

Commit

Permalink
Fix URLEncoder issue related to JENKINS-34973
Browse files Browse the repository at this point in the history
  • Loading branch information
tfennelly committed Nov 4, 2016
1 parent 781f9d5 commit 540dc68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Expand Up @@ -43,6 +43,9 @@ node ('docker') {
// Run selenium in a docker container of its own on the host.
sh "./start-selenium.sh"

// Encode the branch name. Need to do it out here because of JENKINS-34973.
def urlEncodedBranchName = URLEncoder.encode(branchName, "UTF-8").replace("+", "%20");

try {
// Build an image from the the local Dockerfile
def athImg = docker.build('blueocean-ath-builder')
Expand Down Expand Up @@ -100,9 +103,6 @@ node ('docker') {
// Let's copy and extract that tar to where the ATH would expect the plugins to be.
// Try checking out the Blue Ocean branch having the name supplied by build parameter. If that fails
// (i.e. doesn't exist ), just use the default/master branch and run the ATH tests against that.
// Need to URL encode the branch name to get rid of slashes etc. but can't use URLEncoded because
// the expected script approval is never added to /scriptApproval.
def urlEncodedBranchName = branchName.replace("/", "%2F").replace(" ", "%20");
try {
step ([$class: 'CopyArtifact',
projectName: "blueocean/${urlEncodedBranchName}",
Expand Down

0 comments on commit 540dc68

Please sign in to comment.