Brilliant! That worked. I'm onto the next error now, but the pipeline
script appears to be doing what I want it to :) For reference, the finished
JEnkinsfile looks like this:
def git_url = "g...@github.com:myorg/my_project.git""
def git_branch
node {
stage "Check out from git"
checkout scm
In groovy, variable substitution is only done in double quoted strings, not
single quoted strings. Try replacing the single quotes with double quotes.
On Tue, Jun 14, 2016, 07:52 Jerry Steele wrote:
> Hello again. So, my Jenkinsfile now looks like this, and I'm having some
> success:
>
> def git
Hello again. So, my Jenkinsfile now looks like this, and I'm having some
success:
def git_url = "g...@github.com:myorg/my_project.git"
def git_branch
node {
stage "Check out from git"
checkout scm
stage "Make sure our git branch var is accessible"
sh 'git rev-parse --abbrev-ref HEAD
That makes absolute sense, but I just tried that and got the same error..
On 13 June 2016 at 12:42, Mark Waite wrote:
> By default, the git plugin checks out a "detached head" rather than
> checking out to a named local branch. If you add the "Additional
> Behaviours" to do a "Checkout to spe
By default, the git plugin checks out a "detached head" rather than
checking out to a named local branch. If you add the "Additional
Behaviours" to do a "Checkout to specific local branch" and assign it the
value "**", then the plugin will attempt to checkout to a local branch
which matches the br
Thanks for the info re: In-process script approval, that worked :)
@Mark, I'm pretty sure that I need to glean info about the branch from the
current build, because this has to be passed as an argument to my build
tool. I was hoping that this could be done via an environment variable, but
this
For the multi-branch development work I've been doing, it has been better
to avoid placing branch information inside the Jenkinsfile. The problem I
had was that most of my branches are short-lived. They exist long enough
to allow me to validate a pull request, but then they are merged to the
mast
Pipelines with Jenkinsfile runs in a sandbox and thus you need to approve
certain functions.
Manage Jenkins -> In-process Script Approval
mandag 13. juni 2016 12.32.14 UTC+2 skrev Jerry Steele følgende:
>
> Thanks for getting me started on this. If you don't mind helping me
> troubleshoot, I'll
Thanks for getting me started on this. If you don't mind helping me
troubleshoot, I'll carry on:
I think the parameterized version is the one I need, as I would like the
build tool to run with the $gitBranch argument of the new branch that has
just been created. However, when I attempt to run t
Hi,
You can try something like this to get started:
def gitUrl = "https://github.com/twisted/twisted.git";
def gitBranch = "trunk"
node {
stage "Check out from Git"
git branch: "$gitBranch", url: "$gitUrl"
stage "Build code"
sh "sudo -Hs build_tool arg1 $gitUrl subproject_a $gi
Hello,
I’m not sure to understand correctly but your needs seems quite straightforward.
To achieve that, you want to create a multibranch pipeline job (as you have
already done I see) which will scan all your project’s branches looking for
Jenkinsfiles.
In those Jenkinsfiles, you’ll have to d
Hello,
I'm looking into getting Jenkins to build feature branches for our github
projects, but I'm not entirely sure where to start. Pipeline looks like it
might fit the bill, but I'm having trouble getting my head round the
Jenkinsfile. I've found the online docs and the "Groovy" generator but
12 matches
Mail list logo