global option to always build with clean a workspace when using pipelines

2017-03-06 Thread sleipnir
Hi

I want to start building with a clean workspace in my pipelines, and I 
can't find a way to do it globally.
I did a bit of research, and saw the step 'deleteDir()' is the proposed way 
of doing it.
My problem with that is I need to add a call to this step for every nodes 
(I have parralel work and several stages) and it leads to a deleteDir() 
clutter in my Jenkins files.

Is there a better way that I missed to always build from scratch ? (using 
pipelines and organization folders in my case)

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/178139d7-43a6-4a15-b207-a2c69c05744f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Recommended to inject self-signed certificates in Jenkins official docker image

2016-10-09 Thread sleipnir
Thanks for the answer.
I was precisely trying to avoid maintaining a custom image just for the 
certificates, but if I don't have a choice, I'll go with it.


On Sunday, October 9, 2016 at 12:42:02 PM UTC-4, Victor Martinez wrote:
>
> If I understood correctly you don't need to custom anything but using the 
> FROM instruction in your Dockerfile to specify what Jenkins official image 
>  you would like to use and on the top of it you can set your certificates 
> accordingly:
>
> FROM jenkins:2.19.1
> COPY whatever_credentials /whatever_location
>  
> That's the advantage of using docker, reusing someone else's images and 
> specify your configuration by using the other docker instructions. It's 
> worth using some SCM tool to track any changes in your Dockerfile.
>
> Cheers
>
>
> On Sunday, 9 October 2016 16:43:50 UTC+1, sleipnir wrote:
>>
>> Hi there
>>
>> I am using the official jenkins image available here 
>> https://hub.docker.com/_/jenkins/ and everything is fine so far.
>> But in order to run my builds I need to install some self-signed 
>> certificates to access some internal servers, and I would rather keep using 
>> the default image and not create a custom one.
>>
>> What would be the proper clean way to tell the jenkins image to install 
>> my certificates ? 
>>
>> Thanks
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9440eb9f-ed02-40d1-b48f-4bb7d2f38f7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Recommended to inject self-signed certificates in Jenkins official docker image

2016-10-09 Thread sleipnir
Hi there

I am using the official jenkins image available here 
https://hub.docker.com/_/jenkins/ and everything is fine so far.
But in order to run my builds I need to install some self-signed 
certificates to access some internal servers, and I would rather keep using 
the default image and not create a custom one.

What would be the proper clean way to tell the jenkins image to install my 
certificates ? 

Thanks




-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/cb117954-cc9f-4c3a-b35a-394b40dc1b3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Does 'scm checkout' always give the same result with parallel builds in JenkinsFiles ?

2016-09-21 Thread sleipnir

Thanks for the quick reply.
Any info about the recommended way to get the sha that was actually used ?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/23b09958-5f34-46ac-b0f8-715be4fd5f06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Does 'scm checkout' always give the same result with parallel builds in JenkinsFiles ?

2016-09-21 Thread sleipnir
Hi

I was playing with JenkinsFiles and Organization folders (multi-branch 
pipeline) and I was wondering:
Is there is any guarantee the 'checkout scm' command would checkout the 
exact same revision on all node, even if new commits are pushed before the 
build is finished ?
Also, I saw an environment variable that gives the branch name 
(BRANCH_NAME) but nothing for the revision. 
Do I have to call a git command after the 'checkout scm' command to extract 
the sha1 so I can stamp the build output properly ? (something like 'git 
rev-parse HEAD')

Here's a test jenkinsfile I'm using:

stage 'build'

parallel (
  BuildDebug: { node {
checkout scm

 
 }},
  BuildRelease: { node {
checkout scm
 
 }}
)

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/4fb3bb94-a954-4e2e-aecf-5786432aa08b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.