Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jan Paděra
    @paderka
    Hi all, I have several docker hosts which can run jenkins docker agents (https://plugins.jenkins.io/docker-plugin/). Each host can launch the container from one image that has the same label. Is there any way how to choose docker host randomly and no in order of docker host configurations inside "cloud configuration"? I would like to spread the load between each host.
    Tim Jacomb
    @timja
    I've raised qemu-project/qemu#588 for the QEMU ppc64le issue we hit a couple of weeks back
    Tim Jacomb
    @timja
    anyone able to review jenkinsci/docker#1198 please
    Nicholas
    @CyprowolfN

    Hi Everyone, hope all is doing well, I have what might be a fairly easy fix, but any help would be much appreciated

    So.. here's what my Dockerfile looks like:

    `FROM jenkins/jenkins:latest
    ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false
    ENV CASC_JENKINS_CONFIG /var/jenkins_home/casc.yaml
    COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
    RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
    COPY casc.yaml /var/jenkins_home/casc.yaml
    USER root
    RUN apt-get update && apt-get install wget \
    && apt-get install -y nodejs && apt-get install -y npm \

    # The current stable google-chrome version is 93 and so ill be installing version 93 for chromedriver
    && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
    && apt-get install -y ./google-chrome-stable_current_amd64.deb \
    && wget https://chromedriver.storage.googleapis.com/93.0.4577.15/chromedriver_linux64.zip \
    && unzip chromedriver_linux64.zip && mv chromedriver /usr/bin/chromedriver

    USER jenkins`

    Iv basically installed most of what is needed, I have switched back and forth with google-chrome and chromedriver versions always keeping them at supported versions... but that definitely does not seem to be my issue, until this:

    Request failed due to unknown error: Chrome failed to start: crashed (unknown error: DevToolsActivePort file doesn't exist) and linked it to this: https://bugs.chromium.org/p/chromedriver/issues/detail?id=2473 which is a reoccurring issue with Docker, please can someone give me an example of implementing the work around flags to get my Jenkins Jobs to build.. thank you so much in advance

    Yacine Smaoui
    @ysmaoui

    Hi everyone,
    I just noticed that the lts-jdk8 docker image is now using debian 11 ( bullseye )
    but I cannot find an announcement for it anywhere

    anything to consider with this change?

    2 replies
    Nicholas
    @CyprowolfN
    Hi @timja @paderka, will you be able to help me if you’re available?
    Nicholas
    @CyprowolfN
    Hi @here if anyone is available to help, it would be much appreciated, thank you 🙏
    Tim Jacomb
    @timja
    @CyprowolfN it was done as part of https://www.jenkins.io/blog/2021/08/17/docker-images-use-jdk-11-by-default/ but looks to be not mentioned
    7 replies
    there's a bug in 2.303.1 where it's using the wrong locale
    apart from that all is fine as far as I know
    Nicholas
    @CyprowolfN
    Hi @timja , so using an older version of Jenkins would solve my issue?
    Tim Jacomb
    @timja
    sorry tagged the wrong person
    no idea on your issue
    Nicholas
    @CyprowolfN
    Oh.. my bad thanks @timja
    Nicholas
    @CyprowolfN
    Hi, @MarkEWaite might you be familiar with this issue? :point_up: September 1, 2021 2:02 PM
    4 replies
    Tim Jacomb
    @timja
    I've released ssh-agent image now, we should have multi-arch available on at least one image for all the support repoes now
    along with java 8-> java 11 migration should be mostly complete
    I need to check some windows images out but i think it's all done
    Mark Waite
    @MarkEWaite
    Thanks so much @timja! Your work on the Java 8 to Java 11 transition has been amazing. Faster builds, faster tests, new operating systems, and new platforms
    LLLLimbo
    @LLLLimbo
    Hi all, I'm looking for a complete Jenkinsfile example of building Docker images and running containers in a pipeline using the Docker Pipeline plugin. Start by pulling the code from Git, then do a maven build, then build the image and run the container.
    LLLLimbo
    @LLLLimbo
    Here's my current Jenkinsfile:
    pipeline {
      agent none
      stages {
        stage('seeiner-device') {
          agent {
            docker {
              image 'maven:3.6.3-openjdk-8-slim'
              args '-v $HOME/.m2:/root/.m2'
            }
    
          }
          environment {
            MAVEN_CLI_OPTS = '-s .m2/settings.xml --batch-mode'
          }
          steps {
            git(url: 'http://xxxxx/citest/seeiner-device.git', branch: 'develop', credentialsId: 'fb10cc6f-04d9-40a5-96e8-7fbe6253339d')
            sh '''ls
    '''
            sh 'mvn $MAVEN_CLI_OPTS clean install'
            echo 'Building the docker image'
            script {
              def dockerImage = docker.build "seeiner/seeiner-device:latest"
            }
    
            script {
              docker.image('seeiner/seeiner-device:latest').withRun("-d --name seeiner-device -p 17011:17011")
            }
    
          }
        }
    
      }
    }
    image.png
    But I got this error
    Mark Waite
    @MarkEWaite

    @LLLLimbo wouldn't you be better served calling the docker commands directly to perform the desired operations rather than using plugin to run attempt to run them?

    In the Jenkinsfile definition that you list, the seeiner-device stage is running inside the docker image maven:3.6.3-openjdk-8-slim and then you're trying to execute a docker command with the docker.build step. As far as I understand it, the maven:3.6.3-openjdk-8-slim image does not include the docker command inside that image. A Docker image generally is not used to build another Docker image, at least not as far as I understand it.

    1 reply
    When I want to build a Docker image, I define the job to run on an agent with the label docker. That agent is a machine where the agent process allowed to run docker commands. It is not a Docker process that is then trying to run another Docker process inside the Docker process
    shakenfr
    @shakenfr
    hello, I need a little help on jenkins/jenkins:lts-jdk11 image. I use it as a kubernetes image and I succeed to install additional plugins automaticaly using doc. but after the first time launch I have to put initial password and install recommended plugin and create an admin user
    Is it possible to automatise the user creation without GUI setup ?
    DoofusCanadensis
    @kenrachynski:matrix.org
    [m]
    if you're using jcasc to define your configuration, you can disable the first run wizard
    I'm aware that this exists, still learning how to actually do it
    i think there's a propery to do it though
    shakenfr
    @shakenfr
    @halkeye:g4v.dev thanks for the clue, I see your github repo and try to understand but your jenkins.yaml is not simple to read. Could you include another simple one to disable wizard and a simple user admin creation. (yes I'm a neebie :-) ). Each time I deploy mine, the secret is not the same and the admin password is encrypt using it so It would be necessary to no how to create and admin password without wizard)
    halkeye
    @halkeye:g4v.dev
    [m]
    oh to create users you need either to setup groovy scripts, or configuration as code
    i thought you just wanted to disable the wizard
    configuration as code repo has a demos directory full of examples
    btw, this channel is for developing the docker plugin, and making the official images, you'll get more eyes in the general jenkinsci/jenkins channel
    lifehackerhansol
    @lifehackerhansol:hansol.ca
    [m]
    Is there a way to install packages on the inbound agent docker?
    there's no sudo package and dpkg is locked so I can't do that via script like, say, GitHub Actions would normally do
    I'm missing practically every package that is used by this single shell script (wget, curl, jq, zip, unzip)
    halkeye
    @halkeye:g4v.dev
    [m]
    FROM inboundagent\nUSER root\ninstall stuff\nUSER jenkins?
    lifehackerhansol
    @lifehackerhansol:hansol.ca
    [m]
    So I have to manually edit the docker one way or another, then?
    I was just straight up running the container
    Tim Jacomb
    @timja
    @lifehackerhansol:hansol.ca you should extend from the docker file
    not edit the main one
    but yeah what halkeye said
    lifehackerhansol
    @lifehackerhansol:hansol.ca
    [m]
    How does one do that lol
    oh I think I get it
    Tim Jacomb
    @timja
    windows tests have been failing for the last 5 days =/
    https://github.com/jenkinsci/docker
    no code changes
    Expected regular expression 'junit.jpi' to match <empty>, but it did not match.