docker-pipeline | Python tool to run docker containers | BPM library
kandi X-RAY | docker-pipeline Summary
kandi X-RAY | docker-pipeline Summary
Python tool to run docker containers in sequence, for reproducible computational analysis pipelines
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Configure YAML loader .
- Run the pipeline .
- Translate local path to remote
- Make a dictionary of volumes .
- Get the result of a container .
- Parse a mount specification .
- Return True if path can access the given permission .
- Extracts the values from the leftovers .
- Main entry point .
- Return the string representation of the pipeline .
docker-pipeline Key Features
docker-pipeline Examples and Code Snippets
Community Discussions
Trending Discussions on docker-pipeline
QUESTION
I want to run the Jenkins pipeline inside a docker container, like running all the tests, doing sonar scanning, etc.
This is what my pipeline looks like.
...ANSWER
Answered 2020-Mar-31 at 06:34After carefully looking at the logs of the pipeline job I saw this line
QUESTION
Here's the situation:
I have a docker container (jenkins). I've mounted the sockets to my container so that I can perform docker commands inside my jenkins container.
Manually, everything works in the container. However, when Jenkins executes the job, it doesn't "wait" for the docker exec
command to run to completion.
Below, is an extract from the Jenkinsfile. The short-lived printenv
command runs correctly, and prints the environment variables. The next command (python) just gets run and then Jenkins moves on immediately, not waiting for completion. The Jenkins agent (slave) is running on an Ubuntu image. Running all these commands outside Jenkins work as expected.
ANSWER
Answered 2020-Feb-19 at 15:36Ugh. This was down to the way that I'd set up docker support on the slave container.
I'd used socat
to provide a TCP server proxy. Instead, switched that out for a plain old docker.sock
volume between host & container.
QUESTION
Jenkins with docker-pipeline is downloading my git repository, and installing it.
...ANSWER
Answered 2019-Nov-15 at 19:13You may want to use dockerfile
agent instead of the docker
one. It uses a Dockerfile that is part of your project to build the local docker image. All image layers will be cached, so the next time you run the build, it won't spend time on re-building the image. It is also useful to put commands like npm install -production
inside the Dockerfile, so those dependencies are downloaded and installed only one time.
Take a look at the following example.
Dockerfile:
QUESTION
I recently ran into my disk limits on a Jenkins server. I decided to solve this permanently by mounting a larger volume and move the Jenkins home directory to that volume. I used this wiki page as a reference for the move: https://wiki.jenkins.io/display/JENKINS/Administering+Jenkins. I am using init.d to start Jenkins and changed the JENKINS_HOME directory in /etc/default/jenkins (the init script refers to this location to get its defaults).
After rebooting Jenkins I could confirm it was running in the new Home directory. My build works initially (scm checkout->docker build->test->push to docker registry). However, when arriving at the push stage, an error is generated saying that the directory /var/lib/jenkins could not be created. This is the old JENKINS_HOME (as the new JENKINS_HOME is set at /mnt/jenkins). The full stacktrace can be seen below.
What did I miss here? Is there another setting relevant in the move? I am using the docker-commons and docker-pipeline plugins. Any help is highly appreciated.
...ANSWER
Answered 2019-Jan-23 at 15:02TLDR; Solution: Move any credential files and dirs back to the original location OR change the jenkins user home dir [usermod -d /new/dir jenkins
] (this is what I have done). Make sure to move the files out of the way first as the usermod command cannot be run on an existing directory.
After some fiddling around I found the issue. Maybe this is helpful for others.
The jenkins users' home directory was still set at /var/lib/jenkins. This is the directory where the credentials for dockerhub are stored. During the job, Jenkins tried to access the credentials on the old location because by default it looks in the jenkins user home directory.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install docker-pipeline
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page