Declarative Pipeline - Selecting agent based on branch

2017-08-14 Thread Abishek Manoharan
I have a multi-branch pipeline setup and would like to execute more stages when building on the "master" branch. This means, I also have to run the pipeline on a different agent when running on the master branch. Is it possible to specify the agent based on a condition in the Jenkinsfile? Someth

Re: How to group and sort tests and run in parallel without Parallel Test Executor Plugin

2017-08-14 Thread Michael Pailloncy
Hi, thanks for the full explanation of your use case :-) How do you keep the Groovy file containing your previous builds result ? inside an agent's workspace ? 2017-08-09 14:52 GMT+02:00 Viacheslav Dubrovskyi : > Hi Michael, > > We have list of tests which I would like run in parallel. The Parall

Stop the slave.jar process in slave machine

2017-08-14 Thread Krishna Yemineni
Hello, I recently started playing with jenkins and I have successfully created a linux slave for my jenkins master. Now I don't need that machine to be jenkins slave anymore. So I deleted the linux node. But java -jar salve.jar process is still running in my linux machine. I tired killing it wi

Re: How to setup multibranch project with external triggers

2017-08-14 Thread Rainer Hörbe
I tried this with the python-jenkins library. Same problem. Pripeline jobs builds can be triggered, but multibranch jobs fail. I tried also 2 variants with the API, the buildByToken as anonymous user and the default API path for authenticated uses. -- You received this message because you are

Re: Failed to create docker image exception (Docker Slaves plugin)

2017-08-14 Thread Hugo Alfonso Zúñiga Calvo
Hello, Thanks for the fast answer. But this doesn't seem to be the issue. I tried removing the "/" from the jenkins/agent/ but it keeps giving the same error. What I don't understand is why it is trying to create the container without even building the image. Because it doesn't seem to be clonin

Re: Image name and version of containerTemplate by variable created during execution of pipeline?

2017-08-14 Thread YAN-HONG WANG
Hello Carlos, Thanks for your hint. I will try to create new container in other new pod. Hong Am Montag, 14. August 2017 21:20:03 UTC+2 schrieb Carlos Sanchez: > > You can not add containers to a pod after the pod is created, that doesn't > work in kubernetes nor docker swarm > > On Mon, Aug 14

Need Jenkins build info in a html file

2017-08-14 Thread Imtiaz Shaik
HI, I need to input the Jenkins build id , job name, build url, build date, in a html file. Could you please if any sample html file? Thanks, Imtiaz -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop rec

Re: Certificate Issue while cloning mercurial Repository

2017-08-14 Thread Victor Martinez
It doesn't look like a Jenkins issue but an environmental issue. If you google you can find further references: - https://www.mercurial-scm.org/wiki/CACertificates Cheers -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from th

Re: Image name and version of containerTemplate by variable created during execution of pipeline?

2017-08-14 Thread Carlos Sanchez
You can not add containers to a pod after the pod is created, that doesn't work in kubernetes nor docker swarm On Mon, Aug 14, 2017 at 8:44 PM, YAN-HONG WANG wrote: > Hello Carlos, > > If I use the container created function like below: > > def dbImage = *docker.image*( "myregistry:5000/imagenam

Re: Image name and version of containerTemplate by variable created during execution of pipeline?

2017-08-14 Thread YAN-HONG WANG
Hello Carlos, If I use the container created function like below: def dbImage = *docker.image*( "myregistry:5000/imagename:1.0.0.1" ) def c = *dbImage.run*("--network jenkins-network --name mycontainer") But, this container seems will be created *in host* side, *not in* Kubernetes side, right?

Re: Image name and version of containerTemplate by variable created during execution of pipeline?

2017-08-14 Thread YAN-HONG WANG
Hello Carlos, Thanks for correction. But, if containerTemplate can't be defined outside of podTemplate. How could I *create* a container in the *execution of pipeline*? And that container can also *stay* in the *same* pod. Is there some other *syntax* or some *container creation function* could b

Q: what stage/branch failed when using failfast with declarative pipelines?

2017-08-14 Thread Victor Martinez
Hi there, Does the currentbuild variable stores where the pipeline failed when using Stages with parallel and failFast = true? For instance: pipeline { agent any stages { stage('Stage 1') { steps { parallel( afs_release: { ... }, afs_format

Re: How to prevent concurrent builds across all branches in a multibranch pipeline project?

2017-08-14 Thread Viacheslav Dubrovskyi
Hi Mark, You can use env.EXECUTOR_NUMBER in DB user name or in port of connection string. 14.08.2017 17:00, Mark Allison пишет: Yes we have a database server for testing new database changes, and I want to serialise all database project builds across branches so they don't interfere. I will

Re: How to prevent concurrent builds across all branches in a multibranch pipeline project?

2017-08-14 Thread Mark Allison
Yes we have a database server for testing new database changes, and I want to serialise all database project builds across branches so they don't interfere. I will look into the lockable resources plugin. Is there a way to tie an executor to a particular database server? For example have 10 exe

Re: Failed to create docker image exception (Docker Slaves plugin)

2017-08-14 Thread 'Björn Pedersen' via Jenkins Users
Hi, this is a know bug, see discussion here: https://groups.google.com/forum/#!topic/jenkinsci-users/k14ZkFV69CA In global config, you need to remove the final slash from jenkins/agent/ Björn Am Montag, 14. August 2017 08:42:19 UTC+2 schrieb Hugo Alfonso Zúñiga Calvo: > > Hello, I am ex

Certificate Issue while cloning mercurial Repository

2017-08-14 Thread Raghavi
Hi Team, We have configured Jenkins and added Mercurial plugin to it. After setting required details in Global tool configuration, below error is coming while trying to clone the mercurial repository by creating a new job " --debug clone --rev default --noupdate https://userRepositoryCloneURL/

Re: How to prevent concurrent builds across all branches in a multibranch pipeline project?

2017-08-14 Thread Michael Pailloncy
Why do you want to prevent this ? Do you have a shared resource for all your builds ? If yes, I think that this plugin will fit your needs https://wiki.jenkins.io/display/JENKINS/Lockable+Resources+Plugin 2017-08-14 12:37 GMT+02:00 Mark Allison : > I have tried to use > > properties[(disableConcu

Re: The format of key of containerEnvVar within Jenkins Kubernetes Plugin

2017-08-14 Thread YAN-HONG WANG
Hello Carlos, I found out some other way to avoid to use *dot *in variable name. Thanks. Hong Am Freitag, 11. August 2017 16:27:24 UTC+2 schrieb YAN-HONG WANG: > > Hello Carlos, > > Thanks for hint. > > But, something interesting is if I set this *environment variable *into > Dockerfile. > That

How to prevent concurrent builds across all branches in a multibranch pipeline project?

2017-08-14 Thread Mark Allison
I have tried to use properties[(disableConcurrentBuilds)] but that only prevents concurrent builds within one branch in a multibranch pipeline project. Is there a way to prevent concurrent builds across all branches in a project? Thanks -- You received this message because you are subscribe

Re: Image name and version of containerTemplate by variable created during execution of pipeline?

2017-08-14 Thread Carlos Sanchez
you can't define containers outside podTemplate On Fri, Aug 11, 2017 at 11:55 PM, YAN-HONG WANG wrote: > Hello Carlos, > > I tried it already with all *plain hard code*. And insert in the > execution of pipeline. > > Something like this below: > > podTemplate( > > label: "pod", > > container