Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Jeeva Chelladhurai
> > I have not tried this, so, cannot vouch for this. Please be cautious about > the approach presented in this blog. > > http://niels.nu/blog/2017/continuous-blog-delivery-p2.html : you might be > interested in Docker-in-Docker. > > > Thanks for the suggestion.. Docker-in-Docker is been

Re: Translation between declaritive pipleline and groovy pipeline

2017-12-03 Thread Ramanathan Muthaiah
> > What would be the equivalent of this: > > post { > always { > echo 'One way or another, I have finished' > deleteDir() /* clean up our workspace */ > } > success { > echo 'I succeeeded!' > } > unstable { >

Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Ramanathan Muthaiah
Hi Jeeva, > I would like to build Docker images from a Dockerized Jenkins. There are > multiple solution out there but what is the recommended solution... > > I have been using ssh node as a work around, but I was told to use > https://wiki.jenkins.io/display/JENKINS/Docker+Slaves+Plugin . In

Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Jeeva Chelladhurai
Hi Nicolas, Thanks for your input. Using Java API is an excellent idea. There is hackathon planned for Jenkins this week https://www.meetup.com/jenkinsBLR/events/240212894/ Perhaps, this requirement could be prioritized at the hackathon if you could give a helping hand.. Thanks, Jeeva On Mon,

Translation between declaritive pipleline and groovy pipeline

2017-12-03 Thread Peter Berghold
What would be the equivalent of this: post { always { echo 'One way or another, I have finished' deleteDir() /* clean up our workspace */ } success { echo 'I succeeeded!' } unstable { echo 'I am unstable :/'

Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Jacob Larsen
I wouldn't use Docker Slaves for this. Just install the docker client in your Jenkins image and bind mount /var/run/docker.sock. Then a simple sh step with docker build + docker push should do the trick. If you don't want to use your jenkins master for this, you could make a slave container

RE: How can I inject environment variables into my groovy class?

2017-12-03 Thread Daniel Butler
If you’re dealing with a stubborn library that’s forcing you to use environment variables to pass in parameters you’re in for more pain than it’s worth trying to run it within the pipeline script environment. Use it by running a groovy script externally, e.g. sh “groovy MyScript.groovy” and

Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread nicolas de loof
There's no "recommended" solution, each plugin comes with it's own vision, benefits and drawbacks. docker-plugin can be used to run dockerized agents, it can run from a dockerized jenkins master with /var/run/docker.sock without docker CLI installed, as it uses a java client library for docker

Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Jeeva Chelladhurai
Hello All, I would like to build Docker images from a Dockerized Jenkins. There are multiple solution out there but what is the recommended solution... I have been using ssh node as a work around, but I was told to use https://wiki.jenkins.io/display/JENKINS/Docker+Slaves+Plugin . In order for