Re: Bitbucket Branch Source Plugin: I/O error when accessing URL

2018-05-03 Thread Antonio Muñiz
> HTTP request error. Status: 503: Service Unavailable.

Your Bitbucket Server is returning HTTP 503. Something is wrong there.

On 2 May 2018 at 22:40, Victor Martinez 
wrote:

> Although my answer is quite generic it might be helpful:
>
> You might be able to debug those issues if you add some loggers in the
> jenkins instance:
> - see https://wiki.jenkins.io/display/JENKINS/Logging and
> https://wiki.jenkins.io/display/JENKINS/Logger+Configuration
>
> and you can add this logger:
> - https://github.com/jenkinsci/bitbucket-branch-
> source-plugin/blob/master/src/main/java/com/cloudbees/
> jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java#L113
>
> To debug:
> - https://github.com/jenkinsci/bitbucket-branch-
> source-plugin/blob/master/src/main/java/com/cloudbees/
> jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java#
> L624-L625
>
>
> Cheers
>
>
> --
> 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/8d2257ca-783d-44f0-8387-3656cafc3fa5%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/8d2257ca-783d-44f0-8387-3656cafc3fa5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzQV3ySevq2%2BUdO7EURigvOm4fRMihnP2b7A%3D%2Bq18B2L7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Bitbucket Branch Source Plugin broken?

2018-02-14 Thread Antonio Muñiz
Hi,

I think this is related to JENKINS-49295
<https://issues.jenkins-ci.org/browse/JENKINS-49295>, which there is a fix
in progress for.



On 30 January 2018 at 17:21, Björn Rohlén  wrote:

> Hello.
>
> Running Bitbucket Branch Source Plugin v2.2.9 (latest as of this writing)
> paired with Jenkins 2.89.3 on RHEL7.3.
>
> Anyone else noticed that the "Script Path" is no longer working? If i use
> "Script Path" in the (new item -> Bitbucket Team/Project) configurationbox,
> it just never finds the Jenkinsfile.
>
> I tried with myFolder/Jenkinsfile, myFolder/, myFolder,
> ./MyFolder/Jenkinsfile -- no go fiddling with it. Leaving it blank finds
> Jenkinsfile in root of branchtree, it will also find it if I put in
> Jenkinsfile -- but any folder is a no go, it will point straight at it and
> say "no such file or diretory".
>
> What gives?
>
> Kind regards,
>
> --
> 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/192f08fe-46e6-4ba6-9efc-643a7a7db9a7%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/192f08fe-46e6-4ba6-9efc-643a7a7db9a7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzTrXC9Y%2BMV1fbybLtVgw2PYdZgryFx8wYOkknhkQ5EqaA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Broken SAML

2017-08-07 Thread Antonio Muñiz
r.HandlerWrapper.handle(HandlerWrapper.java:132)
>>  at 
>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
>>  at 
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
>>  at 
>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
>>  at 
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
>>  at 
>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
>>  at 
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
>>  at 
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
>>  at 
>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
>>  at 
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
>>  at 
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>>  at 
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
>>  at org.eclipse.jetty.server.Server.handle(Server.java:564)
>>  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
>>  at 
>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
>>  at 
>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
>>  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
>>  at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
>>  at 
>> org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
>>  at 
>> org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
>>  at 
>> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
>>  at 
>> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
>>  at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
>>  at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>>  at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>  at java.lang.Thread.run(Thread.java:748)
>>
>> --
>> 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/ms
>> gid/jenkinsci-users/CAGkg-ek_B5hvYCC4FYesK-6O86Dk%2BrMaQ8cN
>> T-NDWcujs0EQ9Q%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAGkg-ek_B5hvYCC4FYesK-6O86Dk%2BrMaQ8cNT-NDWcujs0EQ9Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> -
> Arnaud Héritier
> http://aheritier.net
> Mail/GTalk: aheritier AT gmail DOT com
> Twitter/Skype : aheritier
>
> --
> 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/ms
> gid/jenkinsci-users/CAFNCU--iadET9Ro-J4zJ1subOCiQ6Q5mi-gSkTx
> HEzn-tAPibQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAFNCU--iadET9Ro-J4zJ1subOCiQ6Q5mi-gSkTxHEzn-tAPibQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzR-hsiL4YGpWB9mg%2BTrb-%2BVEnjp3o007ZxSuZ5b0ZxY%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: locks vs stage w/concurrency

2016-10-03 Thread Antonio Muñiz
This is the idiom to get what you are looking for:
https://github.com/jenkinsci/workflow-aggregator-plugin/blob/master/demo/repo/Jenkinsfile#L22-L36

On Wed, Sep 28, 2016 at 12:49 AM, James Nord  wrote:

> The new way to do this is with a milestone.
>
> https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Milestone+Step+Plugin
>
> --
> 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/a5a52abd-4e15-46c3-9d3b-4ca5522fe110%40googlegroups.
> com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzR9fhh14iA6DZc0TmMZvwHfgYD3m-EpbaRqtOASPVdAJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline or/and Github Organization ? How to get the best of all worlds ?

2016-07-20 Thread Antonio Muñiz
All that should be done by `github-organization-plugin` (and its
dependencies) out of the box. Nothing special required (other than
appropriated credentials configured).

On Wed, Jul 13, 2016 at 7:10 AM, Nat  wrote:

> Hi,
> Like many others in the group (judging by the amount of thread on that
> topic). I'm very interested in the features recently released with Jenkins
> 2. That said, I'm a bit lost with regards to what I'd like to see. The
> Multibranch pipeline and github organization are somewhat eye opening with
> regards to how the standard job make it confusing to know the state of each
> branch but I can't quite figure out how to do the following:
>
>1. I'd like for new branch or even better, new pull requests to be
>automatically tested through the jenkinsfile in the branches. I've seen
>reference of pull requests in the Github Organization but couldn't find out
>how to have that behaviour.
>2. Similarly when branches are deleted, I don't see them being deleted
>in jenkins.
>3. Github has that super cool API with statuses, which some plugins
>uses but how do I get my multibranch or pipeline / jenkinsfile to set a
>pending state while the pipeline runs and then, later, updated to success
>or failure ?
>
> Thanks,
> Nat
>
> --
> 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/24040847-b11d-4e69-9356-89d542d95889%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/24040847-b11d-4e69-9356-89d542d95889%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzRjQMRdnWb0h6gzzraamPxxpMpKYd2TDcj11sQbj%3D79wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pipeline] publishHtml failed with file present

2016-07-20 Thread Antonio Muñiz
On Tue, Jul 12, 2016 at 8:08 PM, Jérôme Godbout  wrote:
> If I make my Jenkinsfile now, can I assume it will still work for any
> Jenkins 2.x version? Just to give myself an idea of the API stability at
> this point?


I believe so. Backward compatibility is taken very seriously by
Pipeline developers, it's broken only when there is no other option.

-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzR6gyT3wnfz8FPt%3D2kW08GAJ%3D8iVDa%2BPODQpwACtQpa1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: call a Jenkins plugin from a pipeline

2016-07-20 Thread Antonio Muñiz
On Wed, Jul 6, 2016 at 8:04 PM, Attila Vangel  wrote:
> CoberturaPublisher


`cobertura-plugin` is not compatible with Pipeline yet. It requires
some code fixes.

-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzSkNZfWYvKU1PAga34Z7YYTyC0kdASzrDTrxCJ8yNC3PA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: A build can start before the last one has finished?

2016-07-20 Thread Antonio Muñiz
> This is an issue, because they're building in the same folders, which could 
> cause a right mess with compilation.

If two calls to `node` (from the same job) matching the same node are
done concurrently then two separated workspaces will be allocated, so
there is no risk.

> On the other hand, I can see the benefit in being able to start the 
> compilation stage of the next build once the previous one is in the testing 
> phase.

Use the `lock` step (from `lockable-resources-plugin`):

stage 'Build'
lock ('compile-env') {
  [...]
}
stage 'Test'
lock ('test-env') {
  [...]
}

This way only one build will be inside a `lock` block concurrently.

On Tue, Jul 5, 2016 at 5:09 PM, Jonathan Hodgson  wrote:
> Hi,
>
> I trigger builds of my pipeline project remotely using the /build page of
> the job (using a python script that sends various options as parameters)
>
> This is working fine, but I just noticed that I could launch a new build
> while the last one was still running, and rather than waiting for the
> previous build to finish, it started building immediately.
>
> This is an issue, because they're building in the same folders, which could
> cause a right mess with compilation.
>
> Have I missed something?
>
> On the other hand, I can see the benefit in being able to start the
> compilation stage of the next build once the previous one is in the testing
> phase.
>
> I would have thought this is a fairly normal thing to want to do?
>
> --
> 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/e5c534a7-5fec-4464-b65f-760430dbd385%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzTb4HvPGQBWStrAACkmUsw5Mu7dwo1GDDdXAeGTNV-B3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline - Avoiding repeating work if nodes execute on same build executor?

2016-07-20 Thread Antonio Muñiz
Put 1 and 2 inside a `node`, then `stash` anything you will need later
and `unstash` it on any subsequent `node`.

On Tue, Jul 5, 2016 at 1:28 PM, Jonathan Hodgson  wrote:
> Hi,
>
> My project workflow is
>
> 1) Checkout revision from repository
> 2) Apply patch
> 3) Build various versions (debug/release, 32/64 bit etc).
>
> Now right now I only have one executor, so the various builds will have to
> happen sequentially, but I would prefer to write the script such that if I
> add extra executors at a later date, it will use them
>
> So it seems to make sense to divide the building between nodes, in a
> parallel block.
>
> However, I don't want to be repeating steps 1 and 2 if they've already been
> done on that executor.
>
> Is there a standard way to do this?
>
> regards
>
> Jon
>
> --
> 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/aa0a352e-3eba-4e30-a62e-c5795d8e88ed%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzTXp3eO4bnByc_1eR4Pm%2B0Ld%3DagOdhQ5pQ_68evnjftog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline / Git question -- Use same information as used to retrieve Jenkinsfile

2016-07-01 Thread Antonio Muñiz
On Fri, Jul 1, 2016 at 5:08 PM, KP  wrote:

> Or extend "checkout scm" so that I can use a subdirectory?


Try this:

dir('a_subdirectoty') {
    checkout scm
}


-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzSbo0g7T%2B8eeO1R_exygi5aETUCdmHynrXxBOGqUNNARA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline and SonarQube

2016-06-27 Thread Antonio Muñiz
To get a similar UX for SonarQube when using Pipeline, the SonarQube
Jenkins Plugin needs to be adapted to Pipeline (i.e. a `sonar` step that
prepares the environment and execute the analysis using any predefined
goals (with any predefined options).

On Mon, Jun 27, 2016 at 9:06 AM, Lionel Orellana  wrote:

> Hi,
>
> I have a job where I use the SonarQube plugin option to "Prepare
> SonarQube Scanner environment" and then run the sonar maven goal like this:
>
> $SONAR_MAVEN_GOAL -Dsonar.host.url=$SONAR_HOST_URL $SONAR_EXTRA_PROPS
>
> How can I do this in Pipeline? I would image I can Prepare SonarQube
> environment using a step?
>
> Thanks
>
> Lionel.
>
>
> --
> 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/79d501b5-bcf6-44ee-953e-1bb2ee0684ac%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/79d501b5-bcf6-44ee-953e-1bb2ee0684ac%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzS1P%3DXmK9BW_bAG4-_k7fgkN0s-8U-%2BnZXWSUgfGr5c-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What are the rules for Jenkins Pipeline to allocate workspaces, are ephemeral workspaces possible?

2016-06-22 Thread Antonio Muñiz
> every workspace assigned is allowed to contain anything - from other jobs

No, only for the same job.

> Is there a way to request a empty workspace

No, you have to use deleteDir() to be sure.

> that is also deleted after the node{} block completes

No, again, use deleteDir() as the last step in `node` or `ws` (however,
having deleteDir() as first step you don't need this one).

If you don't want to delete the entire workspace, you can use `dir` step to
create a directory inside the workspace (and clean it up by
`dir('dir_name') { deleteDir() }`

BTW, all this information is in the snippet generator help tips (navigate
to http://[JENKINS]/job/[job_name]/pipeline-syntax/).

On Wed, Jun 22, 2016 at 3:13 PM, James Read  wrote:

> Hi Antonio,
>
> So what I think you're saying, is that every workspace assigned is allowed
> to contain anything - from other jobs, and always deleteDir() should be
> used if a clean environment is needed?
>
> Is there a way to request a empty workspace, that is also deleted after
> the node{} block completes when using the Pipeline plugin?
>
> - James
>
> On Tuesday, 21 June 2016 16:30:22 UTC+1, Antonio Muñiz wrote:
>>
>>
>> On Tue, Jun 21, 2016 at 3:20 PM, James Read  wrote:
>>
>>> It seems that actually the Pipeline makes the whole Jenkinsfile 1x
>>> logical job, and the node{} blocks just allow different node selections
>>> during that job.
>>
>>
>> Not. Every `node` call has its workspace (and it can be erased at any
>> time by Jenkins core, so you never know if the workspace contains what you
>> think). Which means that the Jenkinsfile has to be idempotent and don't
>> rely on workspace contents from previous builds. Actually every node block
>> should remove/put whatever it needs (you can move things from one node to
>> another by using `stash`).
>>
>> If you request for two nodes in the same Jenkinsfile using different
>> labels, you would be using two nodes with two separated workspaces (even in
>> different physical machines!).
>>
>>
>> --
>> Antonio Muñiz
>> Software Engineer
>> CloudBees, Inc.
>>
> --
> 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/77432682-e150-469f-bef9-fc28297ddbb1%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/77432682-e150-469f-bef9-fc28297ddbb1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzTExdOqmyGFP8vUu5%2BqWDOg1CxffJxRAv2S%3D2UV2zvtbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What are the rules for Jenkins Pipeline to allocate workspaces, are ephemeral workspaces possible?

2016-06-21 Thread Antonio Muñiz
On Tue, Jun 21, 2016 at 3:20 PM, James Read  wrote:

> It seems that actually the Pipeline makes the whole Jenkinsfile 1x logical
> job, and the node{} blocks just allow different node selections during that
> job.


Not. Every `node` call has its workspace (and it can be erased at any time
by Jenkins core, so you never know if the workspace contains what you
think). Which means that the Jenkinsfile has to be idempotent and don't
rely on workspace contents from previous builds. Actually every node block
should remove/put whatever it needs (you can move things from one node to
another by using `stash`).

If you request for two nodes in the same Jenkinsfile using different
labels, you would be using two nodes with two separated workspaces (even in
different physical machines!).


-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzRbz79%3DPmVpT4n0G1CLVnd4fhNA56FYBLkhy_4mupw3gw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: stash includes with git directory

2016-06-21 Thread Antonio Muñiz
g.UserRequest.perform(UserRequest.java:152)
> at hudson.remoting.UserRequest.perform(UserRequest.java:50)
> at hudson.remoting.Request$2.run(Request.java:332)
> at
> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> at ..remote call to master-sles11-x86_64(Native Method)
> at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
> at hudson.remoting.UserResponse.retrieve(UserRequest.java:252)
> at hudson.remoting.Channel.call(Channel.java:781)
> at hudson.FilePath.act(FilePath.java:1007)
> ... 13 more
> Caused by: java.io.FileNotFoundException:
> /home/build/jenkins/workspace/projectA/master/.git/objects/pack/pack-dc9fd69196e6d0296658954add908b642e5b18f9.idx
> (Permission denied)
> at java.io.FileOutputStream.open(Native Method)
> at java.io.FileOutputStream.(FileOutputStream.java:221)
> at java.io.FileOutputStream.(FileOutputStream.java:171)
> at hudson.util.IOUtils.copy(IOUtils.java:38)
> at hudson.FilePath.readFromTar(FilePath.java:2318)
> at hudson.FilePath.access$400(FilePath.java:195)
> at hudson.FilePath$10.invoke(FilePath.java:730)
> at hudson.FilePath$10.invoke(FilePath.java:728)
> at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2772)
> at hudson.remoting.UserRequest.perform(UserRequest.java:152)
> at hudson.remoting.UserRequest.perform(UserRequest.java:50)
> at hudson.remoting.Request$2.run(Request.java:332)
> at
> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> ... 1 more
>
>
>
> torsdag 16. juni 2016 09.59.16 UTC+2 skrev Sverre Moe følgende:
>>
>> I need the git directory stashed because I need git archive, which does
>> not work unless the git repository is present.
>>
>> I have tried several patterns, but been unsuccessful.
>> stash includes: '**', name: 'root'
>> stash includes: '**/*', name: 'root'
>> stash includes: '**/.*, **/*', name: 'root'
>> stash includes: '**/.git, **/*', name: 'root'
>>
> --
> 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/9bdbc5ab-e47f-4080-aa4e-69b76716b446%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/9bdbc5ab-e47f-4080-aa4e-69b76716b446%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzSYYzdZERxdTZPQPq%3D28WDzv46xut23LJFGXFecBpzNxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What are the rules for Jenkins Pipeline to allocate workspaces, are ephemeral workspaces possible?

2016-06-21 Thread Antonio Muñiz
Right, the workspace will be reused for the same job in the while running
in the same node.

You can use `deleteDir()` step as the very first call on every node block.
It will clean the workspace.

On Thu, Jun 16, 2016 at 4:43 PM, James Read  wrote:

> Hey folks,
>
> I went poking around in the Jenkins source, and it seems that
> WorkspaceList.allocate() allows for workspace re-use if executor threads
> share the same context. Given that I've got a single master with some
> executors (small environment) and a single pipeline, I assume that my
> executor context never changes (or changes rarely). I didn't find out if a
> single executor is allocated to a pipeline, or node{} calls create
> new/reuse executors.
>
> I see that in start() WorkspaceStepExecution.java, the call to
> getWorkspaceList().allocate(baseWorkspace) seems like it would always allow
> this reuse. Gonna go hunting around on the bug tracker to see if this is
> just me or I'm doing something horribly wrong though :P
>
> - James
>
>
> On Wednesday, 15 June 2016 15:54:32 UTC+2, James Read wrote:
>>
>> Hey folks,
>>
>> I'd like to understand how Jenkins Pipeline allocates workspaces - I'm
>> alarmed that subsequent node {} elements in a Jenkinsfile appears to
>> allocate the same workspace. It's causing problems with conflicting or
>> missing files. My Jenkinsfile looks like this;
>>
>> stage "Testing"
>>
>> node {
>> // This will allocate a "default" workspace.
>> writeFile file: "workspace_1st_node_block.txt", text:
>> "${pwd()}"
>> }
>>
>> node {
>> // I think this *should* create another workspace, but it
>> doesn't, it reuses the 1st workspace.
>> writeFile file: "workspace_2nd_node_block.txt", text:
>> "${pwd()}"
>> }
>>
>> node { ws {
>> writeFile file: "workspace_subworkspace.txt", text: "${pwd()}"
>> }}
>>
>>
>> When the build of this Jenksinfile completes, if I do a `tail` on the
>> contents of these workspaces from the Jenkins master, it looks like this;
>>
>> ==> workspace@2/workspace_subworkspace.txt <==
>>
>> /var/lib/jenkins/jobs/jamesread/jobs/testcase-jenkins-pipeline-workspaces-reuse/branches/master/workspace@2
>>
>>
>> ==> workspace/workspace_1st_node_block.txt <==
>>
>> /var/lib/jenkins/jobs/jamesread/jobs/testcase-jenkins-pipeline-workspaces-reuse/branches/master/workspace
>>
>> ==> workspace/workspace_2nd_node_block.txt <==
>>
>> /var/lib/jenkins/jobs/jamesread/jobs/testcase-jenkins-pipeline-workspaces-reuse/branches/master/workspace
>>
>>
>> I would have expected 3 workspaces to be created, but instead just 2 were
>> created (one by the 1st node{} declaration, one by the ws {} declaration).
>> I've created this as a testcase in the following GitHub repo;
>> https://github.com/jamesread/testcase-jenkins-pipeline-workspaces-reuse/
>>
>> In my real project, I've resorted to wrapping each step in a "node { ws
>> {" to force new workspaces to be created, but now it seems that even these
>> workspaces are being reused! Just to restate, my questions are;
>>
>> 1) Is workspace re-use expected, and I just have the wrong expectation?
>>
>> 2) An ideal situation would be that the worksapces are ephemeral, and are
>> deleted when the job completes. But I could not find a reliable way to do
>> this yet in a Jenkinsfile. Is this possible?
>>
>> 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/fb31cd9e-ec39-42c8-ab10-ebe94b820916%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/fb31cd9e-ec39-42c8-ab10-ebe94b820916%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzS4Np_aHX0-b9Ji6s3%2BY2UcN97hCCkF8mvYV45pfNh1jA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Fails reading build cause

2016-06-21 Thread Antonio Muñiz
You need to do all the work with non-serializable objects inside the
@NonCPS annotated function and return a serializable object.

In your example you are storing the result of `getLastBuildCause` outside
the non-cps function. Try return a `String` there.

On Tue, Jun 21, 2016 at 8:32 AM, Sverre Moe  wrote:

> I found a JENKINS issue dealing with NonCPS
> https://issues.jenkins-ci.org/browse/JENKINS-31314
>
> Tried the suggestion in the last comment and only call the NonCPS methods from
> the master node.
> Seems I really need to define a heavyweight executor on the master.
> Reading the build cause on a flyweight executor fails or any other
> heavyweight executor than master.
>
>
> tirsdag 21. juni 2016 08.11.43 UTC+2 skrev Sverre Moe følgende:
>>
>> I have tried reading the build cause as suggested in this example
>>
>> https://github.com/jenkinsci/pipeline-examples/tree/master/pipeline-examples/get-build-cause
>>
>> Accessing the build cause outside of a node causes the pipeline to fail
>> right after entering the first stage and without an error or exception.
>> void main(def args) {
>>   def causes = currentBuild.rawBuild.getCauses()
>>   stage 'Checkout'
>>   node {
>> scm checkout
>>   }
>> }
>>
>>
>> Accessing the build cause within a node throws exception 
>> java.io.NotSerializableException:
>> hudson.model.Cause$UserIdCause
>> void main(def args) {
>>   stage 'Checkout'
>>   node {
>> def causes = currentBuild.rawBuild.getCauses()
>> scm checkout
>>   }
>> }
>>
>>
>> So I put it within a @NonCPS method, but it still fails the same way as
>> before.
>> void main(def args) {
>> stage 'Checkout'
>> node {
>>   def cause = getLastBuildCause()
>> scm checkout
>> }
>> }
>>
>> @NonCPS
>> def getLastBuildCause() {
>> def causes = currentBuild.rawBuild.getCauses()
>> return causes.last()
>> }
>>
>>
>> I need to find out who or what caused the build, to find out if it is an
>> upstream project. Unless there is some other access methods for this?
>>
> --
> 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/5b3f9231-a257-4160-a6c3-987604e72331%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/5b3f9231-a257-4160-a6c3-987604e72331%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzSVEFybtn%3DTbo20wbC0nvaKbi%3Dm7MrYkh%3DwfcF7X6ahnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline: Stop building all branches after Branch indexing

2016-06-21 Thread Antonio Muñiz
Right, only branches with changes should be built (and new branches fall in
this category).

If you want to suppress automatic SCM triggering on all branches (maybe
useful if you are using webhooks to trigger builds), you can use the
"Suppress automatic SCM triggering" property in the Multibranch
configuration.

Or you can also set this property filtering by branch names, for example:
trigger automatic builds for master and PR-* but not for any other. Use
"Named branches get different properties" to activate this.

You need branch-api-plugin 1.9+ to get this feature.

On Tue, Jun 21, 2016 at 12:46 PM, Arnaud Héritier 
wrote:

> I'm surprised but job which are already existing shouldn't be rebuilt ?
> If this is the case I think it may be considered as a bug..
>
> On Mon, Jun 20, 2016 at 8:51 AM, Sverre Moe  wrote:
>
>> When performing branch indexing on Multibranch Pipeline I only want it to
>> start building the new branches that become available and not all the other
>> previous added branches.
>>
>> Not sure if this is possible currently. Perhaps add a feature request to
>> make i configurable.
>>
>> --
>> 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/7f778613-9ebf-4d9f-975c-c76db36ca733%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/7f778613-9ebf-4d9f-975c-c76db36ca733%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> -
> Arnaud Héritier
> http://aheritier.net
> Mail/GTalk: aheritier AT gmail DOT com
> Twitter/Skype : aheritier
>
> --
> 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/CAFNCU-8EFreV9bEu9vtab8qk8hFbX9YSZ%3DZvW%2Badr%2BKLVByz7Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAFNCU-8EFreV9bEu9vtab8qk8hFbX9YSZ%3DZvW%2Badr%2BKLVByz7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzRydoyWujH1Ti6smv0rLSE05mN-j4a6LeokY6JkfxCUcg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch job - configure post build groovy event in Jenkinsfile

2016-06-21 Thread Antonio Muñiz
The build status is set normally as the build finishes successfully or not.

To explicitly control de status you can use `currentBuild.result` as Arnaud
said. You can set de build display name by using
`currentBuild.displayName='whatever'`.

On Tue, Jun 21, 2016 at 12:38 PM, Arnaud Héritier 
wrote:

> Hi Mike,
>
>   AFAIK currentBuild.result is never set automatically in pipeline jobs.
> You have to explicitly set it with something like
>
> try {
>   // do something
>   currentBuild.result = 'SUCCESS'
> } catch (Exception err) {
>   currentBuild.result = 'FAILURE'
> }
>
> it may explain why it is null in your post build task
>
> On Mon, Jun 13, 2016 at 8:52 PM, Mike  wrote:
>
>> Hi,
>>
>> I'm looking to try and setup a post build groovy script event with my
>> Jenkinsfile for my multibranch job. Is this possible? I'm looking to try
>> and update the build display name with the svn revision number used at the
>> time of the build. This is the jenkinsfile script im using:
>>
>> node()
>> {
>>  stage 'SVN'
>>  checkout scm
>>  stage 'Compile Win32'
>>  //bat 'call make\\jenkins\\jenkins_build_win32.bat'
>>  stage 'Archive Artifacts'
>>  //archive '_archive/**'
>>  stage 'Post Build'
>>  echo 'Result: ' + manager.build.result.toString()
>>  //if (manager.build.getResult() == 'SUCCESS')
>>  //{
>>  def buildNum = manager.build.number
>>  def buildRev = manager.build.envVars['SVN_REVISION']
>>  def buildSvn = manager.build.envVars['SVN_URL']
>>  def buildUrl = manager.build.envVars['BUILD_URL']
>>  def buildLabel = manager.build.getDisplayName()
>>  echo 'Num: ' + buildNum + ' Rev: ' + buildRev + ' SVN Url: ' + buildSvn
>> + ' URL: ' + buildUrl
>>
>>  manager.build.setDisplayName(buildLabel + ' - Revision: ')
>>  //}
>>
>>
>> }
>>
>>
>> manager.build.result is always null. I imagine its because the build has
>> not completed. both buildRev and buildSvn are also null at this time.
>>
>> Any help would be appreciated.
>>
>> Mike
>>
>> --
>> 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/8cd195b3-07c8-49fe-8df1-440b9a8294e0%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/8cd195b3-07c8-49fe-8df1-440b9a8294e0%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> -
> Arnaud Héritier
> http://aheritier.net
> Mail/GTalk: aheritier AT gmail DOT com
> Twitter/Skype : aheritier
>
> --
> 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/CAFNCU-9N1Wn8hf7_F-O%3DR-FYO7ctnMHEb%2BoxMRURvAKiW11HnQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAFNCU-9N1Wn8hf7_F-O%3DR-FYO7ctnMHEb%2BoxMRURvAKiW11HnQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzRXWB6TmnEY%3D5niaKonLdi9yAYn_rJKe84eEMggoKoBHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multibranch Pipeline / Git question -- Use same information as used to retrieve Jenkinsfile

2016-05-31 Thread Antonio Muñiz
You can use `checkout scm` which will clone the repository at the same
revision than the previously fetched Jenkinsfile.

On Tue, May 31, 2016 at 5:00 PM, Greg Smith  wrote:

>
> Hello,
>
> I have a question that is probably obvious, but I couldn't seem to find it
> anywhere.  Apologies for my newbie question:
>
> If I have a multibranch Pipeline job, does my Jenkinsfile need to do the
> git extract?  Or should that be assumed as part of the retrieval of the
> Jenkinsfile?
>
> For example, lets say I have project "MyProject", with branch "master",
> with a Jenkins file like this:
>
> node() {
>stage 'Checkout'
>// git -- Do I need to do the git checkout here??
>git credentialsId: '1ab8712b-28f4-498e-af0f-433b409675ea', url:
> 'g...@github.com:smithgcovert/MyProject.git'
>
>   // build stuff
> }
>
> Now I branch master to "newtestbranch" -- it has the same Jenkinsfile at
> the top.
>
> 1)  Do I even need the git extract step?  It would seem to be implied by
> the fact that the Jenkins file was found in that branch... but it seems i
> do from the testing I've done
> 2)  How can I pass the url and branch into the git step, so that I do not
> put a path to the repo in the file that is checked in?
>
> IE, I want the repo URL, and the branch being built, and the credentials
> used to do the extract to all be defined by the same url, branch, creds
> that were used to retrieve the Jenkinsfile.  It seems wrong to have any
> url, branch or credential information in the Jenkinsfile -- is there a way
> to say "extract the same as used to retrieve the Jenkinsfile"?
>
> Thanks,
> Greg
>
> --
> 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/549e1e95-d6f2-4c40-83b4-b731fdbf2ba6%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/549e1e95-d6f2-4c40-83b4-b731fdbf2ba6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzQLySkhg_EV8KQBmJACDLBxFu3hff6iyBzBP7tLcn%2BT6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline post-action in Jenkinsfile ?

2016-05-06 Thread Antonio Muñiz
Take special precautions about unexpected exceptions thrown inside the
finally block.
In that case script-security-plugin is not going to interpret approval
requests correctly.

On Thu, May 5, 2016 at 9:47 PM, Mike Caspar  wrote:

> Awesome.
>
> This worked great.
>
> I managed to simply wrap a try around my whole file and then a
> catch/finally for success and failure.
>
> Craig, I'll look at the example. Thanks
>
> I did figure out that I needed to use the error tag with some text during
> my catch block and that properly set it the status to failed.. Cool.
>
> Where would be a good place to put this as an example in the docs for
> others  ?
>
> Craig, any suggestions where I might put a section for try/catch and
> "simulating" what was there before for others who will no doubt find
> themselves in similar transitions ? Any thoughts are a good place to start.
>
> Mike
>
> Oh.. thanks again to Craig Rodrigues and Baptiste Mathus
>
>
> On 2016-05-05 3:38 PM, Craig Rodrigues wrote:
>
> Hi,
>
> Yes, in your pipeline script, you need to catch exceptions for what you
> want to do.  Be careful, if the build fails, you will need to set
> currentBuild.status and re-throw the exception in order for the build to be
> marked as failed.
>
> Look at this example which I wrote:
>
> https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test.groovy
>
> --
> Craig
>
> On Thu, May 5, 2016 at 12:24 PM, Mike Caspar < 
> m...@caspar.com> wrote:
>
>
>> try {
>> step 1
>> step 2
>> step 3
>> step 4
>> step 4
>> }
>> catch
>> {
>> task {send email of build status}
>> }
>> finally
>> {
>> task {send email of build status}
>> }
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/5sN7BR7daOs/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAG%3DrPVfqa72x317P1OO9zZnyvmP73vPcQyoH7PsH7OVfaRTRmQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> https://groups.google.com/d/msgid/jenkinsci-users/CAG%3DrPVfqa72x317P1OO9zZnyvmP73vPcQyoH7PsH7OVfaRTRmQ%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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/a2bd3ac9-2a99-af64-bbee-3c403f0dfa13%40caspar.com
> <https://groups.google.com/d/msgid/jenkinsci-users/a2bd3ac9-2a99-af64-bbee-3c403f0dfa13%40caspar.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzRsWdJoUqKwJA7SR2VbwSPj%3DJ-ii9GwWucBqV2LdjuytA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Workflow manual input step: how do I use it the right way?

2016-05-06 Thread Antonio Muñiz
On Thu, May 5, 2016 at 3:45 PM, Guest  wrote:

> because I'm unable to start second pipeline instance while the first one
> is waiting for input


It should not be the behavior, unless you explicitly disabled "Execute
concurrent builds if necessary".


-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzSS%2B80sv_EzN2s_6TxWYtMqMCYE4DGUvNxEA-rB3_PnBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: 2.0 Pipeline - input step with choice param fails

2016-05-04 Thread Antonio Muñiz
On Sun, May 1, 2016 at 4:21 PM, Lionel Orellana  wrote:

> Any ideas?


Filed https://issues.jenkins-ci.org/browse/JENKINS-34590 (there is a
workaround in a comment).


-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzSUM4mnnyK1jauz6kaVzUY1CW21LktxTobJxcEh%3D3i8LA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkinsfile to clone a remote repository

2016-04-29 Thread Antonio Muñiz
You should use https://github.com/jenkinsci/workflow-remote-loader-plugin
to load an external script.

On Thu, Apr 28, 2016 at 11:51 PM, Jeeva Chelladhurai  wrote:
> Hello All,
>
> I am planning to organize my source code in one github repository, and the
> Jenkinsfile and the configuration/topology file in a different github
> repository.. Would it be possible to clone/check out the remote repository
> using my Jenkinsfile? I tried something as show below but it does not seem
> to be working... Your help is greatly appreciated ..
>
> node ('docker') {
> stage "SCM Synch"
> checkout scm
>
> stage "Main Src"
> git url: 'https://github.com//.git'
> checkout scm
>
> stage "Next Stage"
> sh "echo yet to write"
>
> }
>
>
>
> Thanks,
> Jeeva
>
> --
> 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/46730175-e8d4-4d68-aadf-16fb3e170ea7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Antonio Muñiz
Software Engineer
CloudBees, Inc.

-- 
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/CAJc7kzSYp1oWnSAzr_%2B34mSLdG%2BegNpwyOqmQQz5%3DLOi2vhs3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.