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

If your branch name isn't prefixed with "origin/" in your job, it's not getting replaced #8

Closed
tednaleid opened this issue Jun 14, 2012 · 0 comments
Assignees

Comments

@tednaleid
Copy link
Contributor

Bug report from Titas Norkunas:

See all_projects.png:

  1. this is template
  2. This is specific job that was run (one of the correctly fetched
    remote branches)

Now check out project_config.png:

  1. title is correct, using branch name
  2. why is it building master branch?

Btw documentation is pretty clear, was able to setup so far without
much confusion (ah, it was not transparent what to do with gradle for
me, I installed plugin and did apt-get, but then it was failing, so I
just used "wrapper" option and symlinked gradlew to
/opt/gradle/bin/gradle). But I am new to jenkins, for people who use
jenkins it might be obvious that after installing plugin they need to
go to manage jenkins and configure gradle there

Attached png files show that the job isn't getting the branch name properly replaced, after some digging I found that we're expecting the branch name to start with "origin/" in our code. This should be refactored from this:

config = config.replaceAll(">origin/${templateJob.templateBranchName}<", ">origin/${missingJob.branchName}<")

to something that replaces either if the branch name has a "/" or a ">" to it's left (and still has a "<" on the right).

@ghost ghost assigned tednaleid Jun 14, 2012
jabbrwcky pushed a commit to jabbrwcky/jenkins-build-per-branch that referenced this issue Jun 15, 2012
…ame or no remote name (previously required "origin/" prefix)
titas pushed a commit to titas/jenkins-assembla-merge-request-builder that referenced this issue Jun 29, 2012
fixes entagen#8, don't require remote on branch name in job
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant