How can I sync code from perforce to directories which is not workspace?

2017-04-12 Thread Zongliang
Hi guys, Is there a way that can sync code from perforce to different directories? For example, I want the following mapping: jenkins view map //depot/a/... //workspace/a/... //depot/b/... //another_dir/b //depot/c/... //workspace/c/... The `workspace' is actually /var/lib/jenkins/jobs/, I wan

Re: [Declarative Pipeline] Option to override --entry-point cat

2017-04-12 Thread Dan Tran
I ended up to start mongod in background at my Jenkinsfile -D -- 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

Re: Declarative pipelines per branch and reusable stages (keeping it DRY)

2017-04-12 Thread Kenneth Brooks
oh, and thanks for the tip on the readTrusted! Totally missed that one, and yes, load is problematic because it requires the workspace (and thus a node) On Wednesday, April 12, 2017 at 4:53:23 PM UTC-4, Patrick Wolf wrote: > > Feel free to open a JIRA ticket but I'm not a huge fan of this because

Re: Declarative pipelines per branch and reusable stages (keeping it DRY)

2017-04-12 Thread Kenneth Brooks
Quickly trying out your suggestion of pipeline directly inside the if. It sees the stages, but something is not right. It doesn't see/execute the environment section (which means the use of credentials('cred') isn't being loaded. Here is what I see when the pipeline {} is on it's own: [Pipeline

Re: Declarative Syntax: ability to run multiple stages inside a single agent

2017-04-12 Thread Kenneth Brooks
Thanks for the quick reply. Unfortunately no. We will have lots of other stages down the line that require different capabilities. Here is a little larger example for illustrative purposes (using script syntax so you can see where the nodes exist) ** Note - Each node will be spun up with exactl

Re: Getting an exception when using Job import plugin

2017-04-12 Thread Christopher Orr
Sounds like https://issues.jenkins-ci.org/browse/JENKINS-40577 On Tue, 11 Apr 2017, at 00:21, Prasu S wrote: > I'm trying to import jobs from Jenkins 1.658 to Jenkins 2.45 . I receive > the below error. Can anyone please help. > > java.lang.NoClassDefFoundError: > com/google/inject/internal/gu

Re: [Declarative Pipeline] Option to override --entry-point cat

2017-04-12 Thread Dan Tran
Please disregard the below incorrect statement :-) On Wednesday, April 12, 2017 at 2:12:27 PM UTC-7, Dan Tran wrote: > > I meant to run /usr/bin/mongonot the mongod > > >> -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from

Re: [Declarative Pipeline] Option to override --entry-point cat

2017-04-12 Thread Dan Tran
I meant to run /usr/bin/mongonot the mongod > -- 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 d

Re: Declarative pipelines per branch and reusable stages (keeping it DRY)

2017-04-12 Thread Patrick Wolf
Feel free to open a JIRA ticket but I'm not a huge fan of this because it is counter to the KISS principle we wanted with Declarative and breaks the Blue Ocean editor. We have discussed having multiple "stages" blocks but rejected that because it quickly becomes needlessly complex without addin

Re: Declarative Syntax: ability to run multiple stages inside a single agent

2017-04-12 Thread Andrew Bayer
Are you wanting to use the same node for most, if not all, of the pipeline? If so, just use the top level agent directive. A. On Wed, Apr 12, 2017 at 1:18 PM Kenneth Brooks wrote: > As a user, I want to run multiple stages inside a single agent. > > Today we use the mesos plugin and spin up and

Declarative Syntax: ability to run multiple stages inside a single agent

2017-04-12 Thread Kenneth Brooks
As a user, I want to run multiple stages inside a single agent. Today we use the mesos plugin and spin up and spin down an agent on demand. I want to have 3 stages all run on that same agent before it spins down. That way all stages can leverage that workspace before it is trashed. Current abili

Declarative Syntax: agent scope

2017-04-12 Thread Kenneth Brooks
When I specify an agent inside a stage, it then also applies to everything in the 'post' section. I'm not sure that is alway the behavior I want. Is there a way around this? Specifically, we have the ability to take a checkpoint (similar to the enterprise edition checkpoint feature) but that s

[Declarative Pipeline] Option to override --entry-point cat

2017-04-12 Thread Dan Tran
Hi, This is my docker agent declaration agent { docker { image "*xxx*/**-build:1.0.0" *args* "--*entrypoint* /*usr*/bin/*mongod*" } } However, docker pipeline ignores it. Here is the command from log $ docker run -t -d -u 29307:1002 --entrypoint

How to template HTML to create custom report?

2017-04-12 Thread Trever
I want to be able to have an HTML template of some sort the I can populate with values from another source (in my case, a yaml file). Then I would use HTML publish plugin to add the HTML to my job result. I've googled around to see what kind of options I may have to do this but nothing stands

Re: How to start a job from another job in a declarative pipeline?

2017-04-12 Thread Idan Adar
Yep, found "build" as well. I thought maybe it's done differently in declarative pipelines... Ended up with the following, however despite this, it did not start. post { // Run end-to-end tests, if requested success { script { if (BRANCH_NAME == "develop") { resu

Re: How to start a job from another job in a declarative pipeline?

2017-04-12 Thread Danny Rehelis
This is how I do this, should be easy enough - pipeline { stages { stage ('xxx') { steps { ... ... build job: '', parameters: [ string(name: 'PARAM1', value: "xxx"), string(name: 'PARAM2, value: "yyy") ]

How to start a job from another job in a declarative pipeline?

2017-04-12 Thread Idan Adar
Hi, Lets assume there are two job: 1. a job for a micro-service repository 2. a job for end-to-end tests I'd like, in specific cases, to start the end-to-end tests job from the micro-service job. For example, after introducing a change that even though passed unit testing and integration testi