Closed zlippard closed 6 years ago
Thanks for this issue report, it does look like a bug. The stack trace you included looks like it is missing a couple of lines, can you just update that so it's complete?
Sure thing, fixed the stack trace. Thanks!
Thanks. Can you also either post some more screen shots of your configuration, or attach a sanitized config.xml for the job? I'm not 100% sure I understand what you're doing in the config.
Attached is the XML file and extra screenshots.
How is this going to work without any Git SCM configured? I'm going to guess that's why you get this error... I think Jenkins wants to confirm that the branch you're specifying actually exists in the repo.
Re-reading your original issue post... I don't think I would advise you to use this pattern. Can you explain why you don't do the clone and build all in the same Jenkins job?
Apologies for the delayed reply. The thought was that I would use one job to clone and build the repo and then other jobs could use the first job's workspace for running tests, beta builds, release builds, etc off of that workspace. This way I wouldn't have to clone the repo separately in to each work space and I could cut down the number of steps in each job.
@zlippard I would say that in my experience with Jenkins, what you are suggesting is kind of an anti-pattern. It can seem appealing to reduce steps in jobs, but IMO the workspace should almost never be shared across jobs.
For these and other reasons, I would always discourage people from having jobs share a workspace.
@omehegan gotcha. That's what I ended up doing. Longer term, I wouldn't want to use the same workspace for shared code in case there are concurrent jobs running that need to do tests, perhaps on different branches of the codebase. It makes more sense to have each job hold on to the code. Thanks for the help! Will close this ticket.
Issue
I have two jobs set up in Jenkins. One, called 'android_source', which downloads my gitlab Android project and holds the source code and another, called 'android_beta', which sets the custom workspace to 'android_source' and attempts to build against it to create a beta APK. I also have a configuration set up in 'android_beta' to only run when changes are pushed to a branch called develop. However, the configuration errors out when attempting to put any text in the Include field. See below for the stack trace and image of the issue.
If I copy the Source Code Management git settings from 'android_source' in to 'android_beta' and remove the custom workspace configuration, then the error goes away.
I believe the "Filter branches by name" feature needs to be updated to support custom workspaces.
Context
Images & Traces
Image of error:
Stack Trace: