Tag: jenkins

Pre Configured Environment variables in Jenkins

I am running Jenkins though the docker image. I want my Jenkins Installation to come up with few pre configured enviroment variables. Is there any way I can copy some of my environment variables, so that when I bring my jenkins up, it should come with these pre-configured environment variables ? Or Where are the […]

Change Jeninks build status on specific error

i’ve got a Jenkins job that should simply start a docker container using the Docker plugin. If the container is stopped, the job runs correctly, but if the container is already running, the build step returns a failure due to an com.github.dockerjava.api.exception.NotModifiedException error. This is basically the expected behavior of Jenkins but in my case, […]

Api-Testing getting a mess with vagrant

Im doing API-testing (no web-API). I feel that I have a complicated setup. For Development: We are using a vagrant-box (suse) for development that gets all its files via an ansible playbook. Included are instructions to clone some repositories from git (license keys, startscripts, and the tests themselves that are written in ruby and then […]

docker tool in jenkins container (with mounted docker socket) is not finding docker daemon to connect to

I just started a jenkins docker container with a mounted docker socket like the following: docker run -d \ –publish 8080:8080 \ –publish 50000:50000 \ –volume /my_jenkins_home:/var/jenkins_home \ –volume /var/run/docker.sock:/var/run/docker.sock \ –restart unless-stopped \ –name my_jenkins_container \ company/my_jenkins:latest Then I bash into the container like this: docker exec -it my_jenkins_container bash A tool ‘docker’ command […]

Jenkins Slave can't read settings.xml

I have created a jenkins slave image for Docker, which I want to use to build all of my Java projects, however, I can’t work out how to reference the .m2/settings.xml file to tell it where to pull from. My Dockerfile is: FROM openjdk:8 MAINTAINER Chris Hudson <chudson@amelco.co.uk> RUN apt-get -qqy update && \ apt-get […]

Jenkins – Dockerfile build upon another dockerfile in private repo

I have a Jenkins install using the ‘Docker build & publish’ plugin however it seems to have an issue building a Dockerfile that references another Dockerfile in a private repository in Docker Hub. For example, my project builds upon a ‘project_base’ image that has dependencies that don’t change. When my project dockerfile tries to pull […]

Running Integration tests from a Docker image for Java project

I am new to Docker and currently working on a project which uses docker for build and deployment. I have installed Docker for windows on my Windows 10 machine and currently running docker in windows environment. I am using Jenkins for creating the docker image for a project which has Integration tests coded inside it. […]

Jenkins pipeline groovy string compare

When I use Jenkins pipeline through with Docker, I want to compare string value with Groovy script, but the compare result was wrong, the follow script is my groovy script and the output result: Is there anyone can tell me how resolve this problem? String runningContainerId = sh(script: “docker ps –filter=\”name=${appEnv}-${env.JOB_NAME}-${env.BUILD_NUMBER}\” -q | xargs”, returnStdout: […]

Error when pushing docker image to registry in Jenkinsfile

I’m using a Jenkinsfile to try to push a docker image to my local docker registry in the Jenkins build pipeline plugin. I understand from reading the docs that you should be able to push an image with an optional tagname: Image.push([tagname]) I’ve got the following code at the moment stage(‘Initialise environment’) { checkout scm […]

(docker-compose + nginx load balancing) + Jenkins?

Hey my fellow brogrammers :0 Currently experimenting the nginx load balancing with docker-compose. I’ve got 2 node services ping1: ports: – “80” build: context: ./node dockerfile: Dockerfile networks: – front-t ping2: build: context: ./node dockerfile: Dockerfile networks: – front-t And an nginx service inside of which I’ve configured the load balancing, and it’s perfectly working! […]

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