Tag: jenkins

First execution of Docker on a new EC2 Jenkins Slave does not work

I’m using the EC2 Plugin in Jenkins to spin up slave instances when we need them. Recently I’ve wanted to play around with Docker so I installed it on the AMI we use as a slave – but the first run on the slave never seems to work. + docker ps time=”2015-04-17T15:38:20Z” level=”fatal” msg=”Get http:///var/run/docker.sock/v1.16/containers/json: […]

How to link jenkins pipeline job to label on docker slaves containers

I’m looking for a way to run Jenkins jobs/build inside Jenkins slaves, dynamically (on-demand) started by docker. The scenario is the following: I have one physical slave (node name: jenkins-slave-01 and label: mySlave) which I can easily trigger jobs to it by using this code on my jenkins pipeline script: node (‘jenkins-slave-01’) { stage (‘Checkout […]

When pushing an image in GitLab registry using jenkins, the error fails: Invalid repository name

If you manually use the following commands: docker build -t company.domain:5000/root/dockerimages/image:tag . docker push company.domain:5000/root/dockerimages/image:tag That’s okay. And in gitlab we get images. But if I run from jenkins, we get an error: Invalid repository name (dockerimages / image), only [a-z0-9-_.] Are allowed

Advantages/Disadvantages of Running Jenkins Slaves for Dev/Test/Prod?

Let’s start by agreeing that we want to adhere to typical Docker/DevOps principles. Therefore, we want to keep tasks isolated, configurations versions controlled, and overall customization to a minimum. The Landscape: Jenkins is being used as the CI/CD tool on your cloud instance of choice. The Plan: Create separate instances for test/staging/prod, each with Docker […]

When building Jenkins in Docker plugins fail to install

I have a Dockerfile for a custom Jenkins master like so: FROM jenkins MAINTAINER me USER root RUN echo 2.0 > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state RUN apt-get update \ && apt-get install -y sudo \ && apt-get install -y vim \ && rm -rf /var/lib/apt/lists/* RUN echo “jenkins ALL=NOPASSWD: ALL” >> /etc/sudoers USER jenkins # COPY plugins.txt /usr/share/jenkins/plugins.txt […]

Jenkins inside a Docker container

Why is there a lot of resources (and recommendations) to run Jenkins inside a Docker container? Am I correct if I think it is because the Docker container represents the production environment? The Continuous integration is there inside the container to pull changes from the repository and run the tests?

Jenkins trigger on-demand slaves in dockers

I’m looking for a way to run Jenkins jobs/build inside Jenkins slaves, dynamically (on-demand) started docker. Attaching schema for visual understanding. What I’m actually looking for and my flow looks like: 1) Triggering Jenkins job (manually/git/gerrit) 2) Jenkins master (running in docker) starts slave machine docker (and pass script/instructions of the build) 3) Build is […]

Docker doesn't save data in host mounted volume

I’m trying to start jenkins in a docker container using Docker Toolbox on Windows 7. I run docker run –name jenkins -p 8080:8080 -p 50000:50000 -v “//C/Users/myname/.jenkins:/var/jenkins_home” jenkins The jenkins starts up nicely, however there is nothing created under C:/Users/myname/.jenkins. I’ve created the folder but it stays empty. When I now stop and remove the […]

Jenkins user using docker (inside docker container)

I have a dockerfile: FROM jenkins:1.651.1 COPY plugins.txt /usr/share/jenkins/plugins.txt RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt USER root RUN groupadd docker RUN usermod -a -G docker jenkins USER jenkins I add my user jenkins to the group docker. When I access my container: jenkins@bc145b8cfc1d:/$ docker ps Cannot connect to the Docker daemon. Is the docker daemon running on this […]

Docker Jenkins & Sonar setup

I am trying to setup Jenkins:latest & Sonarqube:latest in Docker. I have configured both system in docker. I have downloaded all needed Jenkins plugins. it is up and running. Also done GIT repo code configuration. I am able to take to build. I am getting below error message while taking build. which plugin do I […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.