Tag: jenkins

docker swarm 1.12 auto stop service

I want to use docker swarm cluster in my CI environment. The swarm cluster is based on docker 1.12. For example, I want to use docker cluster to run a maven build, and return the build result to Jenkins, and then Jenkins return the verify result to Gerrit. However, I find when I create a […]

OS X – how to give permissions to jenkins user to run docker command

In Unix , I’ve to add jenkins user to Docker group explicitly so that I can run docker commands through shell step. I couldn’t find answer about how to achieve same on OS X ( mac mini 2012 ). Thanks in advance. Regards, Vikram

Jenkins shell command wait for docker container downloaded , up , running

I’m using Docker steps as below to bring up selenium grid My query is how to gracefully wait till particular container is downloaded , up and running. docker run -ti -m 150M –memory-swap 300M –cpu-shares=104 -d -p 4444:4444 –name selenium-hub -e GRID_BROWSER_TIMEOUT=15000 selenium/hub sleep 10 for i in {1..2} do echo "Starting Node: $i" docker […]

Choice architecture docker for continious integration using docker

I want to move my contininous integration tool in containers dockers. Which architecture is more interessent beetween : 1. Having a image of a OS like centos and install in all my tools (jenkins, sonarqube, …) OR 2. Have a container foreach tool (jenkins, sonarqube, gitlab, …) ? My integration tools are stable and there […]

Cannot deploy docker containers from different hosts

I’m integrating Docker into the Continous Integration of a project, so with each commit, it builds a docker image, pushes it to a private registry and runs that container on a machine running in OpenStack. We’re using Ansible (v2.1) for the automation, so to interact with Docker, I’m using the docker_container module. Aside from just […]

adding jenkins user to docker group usermod vs gpasswd

For running docker command in jenkins , I need to add jenkins user to docker group. Below are the 2 ways I found through googling but I’m not clear if they will do same thing or has got any differences at all ? sudo usermod -aG docker jenkins sudo gpasswd -a $USER docker Please clarify […]

Running Jenkins in a Docker Container

Im trying to get some hands on experience in Jenkins and wanted to run it in a docker container. I was following the tutorial here. I have docker installed on my machine and using Kitematic I launched the official Jenkins docker image (tag: latest) using: docker run -p 8080:8080 jenkins However once the container is […]

how does env.BUILD_URL in jenkins running inside Docker container get the outside network port number correctly?

Trying out jenkins from official docker image of jenkins docker run -d -p 8090:8080 jenkins Note that I have chosen my host’s 8090 port to map to the docker container’s 8080 port. Now, inside jenkins, i am running a sample pipeline where I have only one line echo “${env.BUILD_URL}” As a result of this pipeline […]

Jenkins run docker image with wrong image name

I’m Trying to create a jenkins job that run unittest of my app on a jenkins docker slave I filled all the required fields in jenkins: This is my Dockerfile located at .buildscript/Dockerfile : #STEP 1 FROM python:2.7.11-alpine #STEP 2 RUN easy_install setuptools && apk –no-cache add python ca-certificates #STEP 3 RUN mkdir -p /app […]

Jenkins deploying war file to tomcat docker container

I’m trying deploy a WAR file to tomcat docker container. Here config.xml : <?xml version=’1.0′ encoding=’UTF-8′?> <project> <actions/> <description></description> <keepDependencies>false</keepDependencies> <properties/> <scm class=”hudson.plugins.git.GitSCM” plugin=”git@2.4.3″> <configVersion>2</configVersion> <userRemoteConfigs> <hudson.plugins.git.UserRemoteConfig> <url>https://github.com/spring-projects/spring-petclinic.git</url> </hudson.plugins.git.UserRemoteConfig> </userRemoteConfigs> <branches> <hudson.plugins.git.BranchSpec> <name>*/master</name> </hudson.plugins.git.BranchSpec> </branches> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <submoduleCfg class=”list”/> </scm> <canRoam>true</canRoam> <disabled>false</disabled> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <triggers/> <concurrentBuild>false</concurrentBuild> <builders> <hudson.tasks.Maven> <targets>clean package</targets> <mavenName>3.3.9</mavenName> <usePrivateRepository>false</usePrivateRepository> <settings class=”jenkins.mvn.DefaultSettingsProvider”/> <globalSettings class=”jenkins.mvn.DefaultGlobalSettingsProvider”/> […]

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