In a multi-branch environment we don't get the parameters input for the first build after pushing a new branch. It is working correctly in the default environment, but not in BlueOcean (the build is started immediately without the popup that appears at the second build).
As far as I see this should have been fixed in 2017, so I think we do something wrong.
We have Jenkins 2.337 and BlueOcean 1.25.8
How do we get the parameters for the first build working?
Or: has anyone a working situation that the parameter popup apears for the first build of a new branch, derived from a branch that was build with the same set of parameters?
Related
I have a build job on Bamboo that has parameterized branches. All branches (for e.g. feature branches created by developers at will) have a default set of parameters, and specific branches override some of them. Note that once I set a variable for a given branch to a certain value, every build of that branch takes that value. I'm trying to recreate this in Jenkins, but there doesn't seem to be a way to do so.
I created a multibranch pipeline and defined the parameters in my Jenkinsfile with suitable defaults. However, the only way I can override the parameters for a branch is to click "Build with parameters" and update them. That works for that build, but next build that gets triggered reverts back to using the default values. This seems like such a basic use case that I feel like I must be missing something or misconfigured the project somehow, considering I don't have any experience using Jenkins before trying this. Thanks in advance for your help!
We have a Jenkins job that is parameterized that we run every night for our testing. We'd like to be able to check the results of this build in Jenkins in the morning via either the Downstream Build View, or the Build Pipeline View, as we want to see which sub-components passed and failed.
The problem is, we also sometimes run this build manually in the morning using the rebuild button so that we get the same parameters. When this happens, the previous nightly build seems to get overridden with the results of the new build. If someone runs a sub-job with the rebuild button, that sub-job and it's children's results from the previous nightly build now show as the newest run.
I've been looking into the rebuild plugin and how it works, but I can't find this answer. Does re-building always build on top of a previous build, or is there some way to re-build with the same parameters, but to give the new build a unique build number so as to preserve the results of the previous run?
Basically what I'm looking for is "New build with same parameters as the old build" instead of "Re-run the old build". Any help you could give would be greatly appreciated.
The Rebuild Plugin always starts a new build (but keeps the old parameteters , although you're able to edit them before the build starts). This means that a new $BUILD_NUMBER is set.
Actually it sets a new build number for the next build . You should be , however, be able to edit or keep the same parameters imo.
I am using the Parameterized Trigger Plugin on my Jenkins server and I am trying to use a pre-defined parameter used while triggering my downstream build. Unfortunately, I can't get it to work the way I want so I wanted to see if someone could point out what I am doing wrong. Here is my parameterized trigger:
And here is where I try to consume the build parameter in a downstream build:
However, this does not seem to work an the project name shows up as blank when the build gets triggered. Is this doable? Am I doing this right? Any help would be appreciated. Thanks!
There are documented issues of this type of behavior in Jenkins version 2.3
However, the following worked for me:
You need to extend your triggered/downstream jobs (every "Job B") to accept additional parameters. Enable in project B the option "This project is parameterized" and add parameters with the same name as the one passed by the project A.
I want to have Jenkins CI test every branch but not all existing one, solely the ones which received a recent push.
I have set up a GitHub web hook which triggers new builds. This works fine for the branch specifier set to master. Now I tried ** so every branch is built.
The problem: on the first push it tries to build every branch, which is simply too much and would take ages. Is there a way to limit this?
There is no configuration which supports the feature you are requested and since it looks like there is no plugin yet. Your best shot would be to implement your own plugin that can specify a certain date threshold for branches.
Having said that, to solve your problem I would simply:
Empty the shell script for your job
Trigger a new build
Set your shell script again
This way all remote branches get checked out, run and marked as successful within no time due to the empty shell script. After re-enabling your actual shell script you are good to go.
I am using TFS 2010 and have a build machine that contains a single build controller running 2 agents.
I have worked out that I can assign a tag of "Nightly" to my 2nd agent and then edit the Build Definition for my Nightly Builds in TFS to only use an agent that has the tag of "Nightly".
Easy enough.
However, the issue here is that if a normal build (Such as dev/CI) came along, it could - in theory- use my nightly agent, which I don't want to happen.
I could go around all our development builds (20+) and add in a tags=normal and tag my primary build agent with normal, but this then relies on people remembering to tag up new builds in the future.
Is there a way to set up my build agent in TFS's Server Admin, so that it will ONLY run items with specific tags? Or is my "go around the houses" approach the only logical way?
Edit
I got around this in the end by making all my builds look for "matchExactly" on empty tags, which means my "nightly" tagged agent will never be used for CI.
I believe the default for build definitions says MatchExactly and has an empty Tags Filter field. This means that by default build definitions will only run on Build Agents that have ZERO tags. So the behavior you desire should be the default, when you tag your build agent with the Nightly tag, no builds will run on that agent unless somebody explicitly goes in and changes the default Agent settings for that build def.
I expect that this agent is already running on it's own server, otherwise there'd be no reason to single it out.
You could give this specific build agent it's own build controller, that way chances of a build associated to the "CI" build controller are zero. unless people chose the incorrect Build Controller for their build definition.
This way you also won't have to go about changing the current build definitions.