114 questions
0
votes
1
answer
58
views
how to add labels to the docker image build by jenkins docker API
I'm building docker image using jenkins docker API. Below is the full code for building docker image in stage.
node {
stage("build") {
checkout scm
def customImage = docker.build(&...
0
votes
1
answer
138
views
Jenkins Docker Error: Failed to run image the working directory is invalid, it needs to be an absolute path
Running Windows 11 with Docker in WSL
I'm learning CICD Jenkins and I'm the book section where I use Jenkins and Docker. treat me like I know nothing about docker. I'm facing this issue where the ...
1
vote
3
answers
328
views
Jenkins doesn’t have label - dockerhub cloud
I use Jenkins locally on Ubuntu 20.04. I have installed the following plugins:
Docker plugin
Docker pipeline
I have added a new docker cloud: Manage Jenkins -> Clouds -> New cloud -> Docker
...
0
votes
0
answers
145
views
Home directory missing in Docker container launched by Jenkins (Jenkins uses its own OS user in container)
I am just setting up Jenkins as a CI/build system on a host. Some pipelines would use Docker container for the build process. Jenkins itself is installed on the host system (so no Docker-in-Docker ...
0
votes
2
answers
1k
views
How to change default args for docker run in Jenkins Docker Pipeline plugin?
I'm trying to set up a docker agent for this pipeline, but I'm getting this error when running one of the commands inside my pipeline:
+ poetry shell
Spawning shell within /root/.cache/pypoetry/...
0
votes
1
answer
151
views
Jenkins while trying to execute job on docker cloud node: ‘/’ is an unsafe character
Jenkins system log:
Jul 14, 2023 7:56:31 AM INFO io.jenkins.docker.DockerTransientNode$2 println
Removed container 'aee593f554f96a40ac29269c6f5f80bc6368d7c6820aa899755064e485f6e41d' for node 'jenkins/...
0
votes
2
answers
563
views
Is it possible to get the docker container IP in Jenkins using the Docker plugin?
I am using the Jenkins Docker plugin in the pipeline to start a background mongodb container for testing, using:
stage('Start') {
steps {
script {
container = docker.image('mongo:latest')....
2
votes
0
answers
429
views
Using image built by kaniko in Jenkins
How can I use an image built by kaniko in Jenkins pipeline? I want to build the image, use that image to run tests for my app, and then push the image. With docker that would look something like this:
...
1
vote
1
answer
449
views
Jenkinsfile with Dockerfile: How to call a method before the Docker image is built?
I have a Jenkinsfile that looks something like the following:
void setBuildStatus(String message, String state) {
step([
$class: "GitHubCommitStatusSetter",
reposSource: [$...
0
votes
1
answer
902
views
Jenkins gets stuck when switching user within docker container
I am running Jenkins within a Docker container on a remote server. In one of my pipelines I am using a Yocto build container to build a image. In this case I have to change the user, because Bitbake ...
5
votes
1
answer
3k
views
Jenkins build agent docker specify docker file name
I was following this snippet to add to docker file for jenkins build agent (https://www.jenkins.io/doc/book/pipeline/docker/),
pipeline {
agent { dockerfile true }
stages {
stage('Test') {
...
1
vote
1
answer
937
views
How can I tell jenkins' junit-plugin to process test report files , that were created in a docker-container?
I have a project that does the building, testing and deployment process in Dockerfiles, and I want to apply a jenkins pipeline to it. I want to keep the jenkins-part as simple, slim and agnostic as ...
1
vote
1
answer
1k
views
Jenkins/Groovy: why does docker.image.withRun() fail where docker.image.run() does not?
Here is a simplification of Jenkins declarative pipeline I'm working with:
pipeline {
agent any
stages {
stage("demo") {
steps {
script {
def co_url = 'https:/...
1
vote
1
answer
1k
views
Dockerfile in Declarative pipeline job fails
Jenkins Version:-
Jenkins - 2.277.1 LTS.
My Dockerfile:-
FROM maven:3.6.0-jdk-13
RUN useradd -m -u 1000 -s /bin/bash jenkins
My Declarative Pipeline:-
pipeline {
agent {
label "VM-...
0
votes
1
answer
348
views
Docker and Jenkins integration [duplicate]
I've added the BitBucket server integration plugin (https://plugins.jenkins.io/atlassian-bitbucket-server-integration/) and can connect to the BitBucket cloud repo from Jenkins:
But I receive an ...
3
votes
1
answer
5k
views
Certificate issue for launching kubernetes pods for Jenkins (hosted outside of that kubernetes cluster)
I have been trying to configure jenkins kubernetes cloud agents on my existing jenkins setup (which is hosted outside k8s cluster).
My jenkins is hosted in Google Cloud Platform in a Windows VM. It is ...
0
votes
1
answer
204
views
Docker is listening to port specified in run command
I created a pipeline in Jenkins which takes an app from Github, builds the app, and then builds an image and then finally runs that image with the app.
the Dockerfile is:
FROM javastreets/mule:latest
...
0
votes
1
answer
126
views
Make a new container with a combination of two separate containers [duplicate]
I want a container which have both, docker application and jenkins application installed.
I have tried building a new container from a Dockerfile -
`
FROM :docker
FROM :jenkins/jenkins
but it only ...
1
vote
1
answer
194
views
docker.image...inside with dir and ansiblePlaybook results in java.lang.ArrayIndexOutOfBoundsException
Problem
If I combine docker.image...inside with dir and ansiblePlaybook I get an java.lang.ArrayIndexOutOfBoundsException and since my jenkins agent isn't using -XX:-OmitStackTraceInFastThrow that is ...
1
vote
1
answer
2k
views
docker-workflow-plugin (docker-pipeline-plugin) java.io.IOException: Failed to rm container
Is it possible to tune docker-workflow-plugin / docker-pipeline-plugin's cleanup routine? Perhaps leave the container and allow pipeline code to handle its removal in a retry block?
I've got a a job ...
2
votes
1
answer
973
views
Jenkins concurrent builds on docker slaves
I have a Jenkins Server (2.204.1) with Docker plugin (1.1.9) and a docker cloud API.
I work with Jenkins docker agents (slaves)
And i map the docker slave build workspace between the container and ...
0
votes
0
answers
263
views
Jenkins build of Gradle project only succeeds when starting Gradle Docker container as root
I have a Jenkins running as a standalone server, i.e. it is not running as a Docker container. For building my application with Gradle I'm using a Docker image as shown below.
stages {
stage('...
1
vote
0
answers
551
views
how to pass container arguments to jenkins docker cloud template
I'm using Docker plugin for Jenkins.
when I configure new docker cloud with docker template everything works as expected(Jenkins spins off a container and do the job)
but now I have a new build job ...
0
votes
0
answers
113
views
Jenkins to download build time dependencies
Currently all the Jenkins server both master and nodes have wide open internet access. Our security team is trying to narrow down the internet access on these servers by asking Jenkins admin team to ...
0
votes
1
answer
216
views
Dynamically created Jenkins Slave using Jenkins Docker Plugin get removed in the middle of Job execution
I am using Jenkins-Docker-Pluginhttps://wiki.jenkins.io/display/JENKINS/Docker+Plugin to dynamically create containers and use them as Jenkins Slaves. This is working fine for some jobs. However for ...