Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Tim Jacomb
    @timja
    should hopefully just be a matter of switching the image
    Mark Waite
    @MarkEWaite
    The jenkinsci/blueocean Docker images are deprecated. They were used in the past for tutorials on jenkins.io. Those tutorial references were replaced by references to the jenkins/jenkins docker containers in October 2020. Switch the FROM argument and assure that you install the plugins you need for your installation.
    Marc Runkel
    @mrunkel
    Thank you!
    Emil Wallentin
    @Kvixen
    Hi! I've deployed Jenkins in a EKS kluster on AWS. I've a windows nodegroup in the cluster as well where I'm trying to run some windows containers. My template is using "jenkins/inbound-agent:windowsservercore-ltsc2019" which it pulls just fine and spins up. But it also tries to spin up another image after the first container is started, "jenkins/inbound-agent:4.11-1-jdk11". It fails because "no matching manifest for windows/amd64 10.0.17763 in the manifest list entries". My EC2 nodes are running the following ami: Windows_Server-2019-English-Full-EKS_Optimized-1.22-2022.08.09 ami-02a30b67f82cdda7a. Am I understanding it correctly that I'm using a not-supported version of windows?
    Tim Jacomb
    @timja
    it shouldn't be trying to spin the second tag, that tag is linux only
    your version of windows should be supported fine
    Emil Wallentin
    @Kvixen
    I missed the line about naming my container jnlp if I wanted to override the default one, so the issue above was fixed
    Sam Martin
    @sammartin:matrix.org
    [m]
    hi , i have installed jenkins on docker, need to ask what is the best practice to use plugins.txt to install plugins .Due to some reasons we are using jdk8 image . So will it create any issue if use plugins with latest tag (ws-cleanup:0.42 or ws-cleanup:latest) ? or should i use versioned plugins in plugins.txt. and how plugins are handled in jenkins according to their jdk . Can using latest plugins cause issue for jenkins on jdk8 centos image.
    Tim Jacomb
    @timja
    you should use the jdk 11 image, prefer versioned plugins for reproduce-able builds / the ability to roll back
    4 replies
    dduportal
    @dduportal:matrix.org
    [m]
    Sam Martin: there is a nice official documentation at https://www.jenkins.io/doc/book/managing/nodes/ to get started. Then it depends on your infrastructure:
    • If you use a Cloud system which has an associated Jenkins plugin, then you should use it (such as "Amazon EC2", "Azure VM", "Azure ACI", "Openstack", etc.). Jenkins would create build agent programattically.
    • If you use a system that is code managed (Using Terraforma, Ansible, Puppet, whatever infra as code tool), then you might want to manage programmatically the VMs and use "Jenkins Configuration as Code" plugin to define a permanent build agent using a YAML definition
    Sam Martin: Please note that:
    • Executing builds on the Jenkins controller is a bad practise: it means that your build can access all the Jenkins credentials and controller Jenkins home
    • It is strongly recommended to create a build agent to execute build. There is no problem to have this build agent executing with JDK11 (same as Jenkins's controller JDK), but providing a default JDK8 through the environement variables "JAVA_HOME'" and "PATH"
    Sam Martin
    @sammartin:matrix.org
    [m]
    our requirement is, as soon as the Jenkins container is up we want to make the docker engine host machine as its slave automatically .
    3 replies
    Sam Martin
    @sammartin:matrix.org
    [m]
    and docker-compose
    dduportal
    @dduportal:matrix.org
    [m]
    good, then docker-compose can easily be used. I got a working example here: https://github.com/dduportal/jenkins-examples/blob/main/docker/docker-compose.yml#L15. Fundamentals are:
    1 reply
    Sam Martin
    @sammartin:matrix.org
    [m]
    hi , casc is failing for docker compose but working with docker run , Can anyone please help here !
    getting this error:
    second | 2022-08-26 21:36:14.111+0000 [id=30] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed ConfigurationAsCode.init
    second | io.jenkins.plugins.casc.ConfiguratorException: Invalid configuration: '/var/jenkins_home/casc.yaml' isn't a valid path.
    4 replies
    Sam Martin
    @sammartin:matrix.org
    [m]
    yes
    halkeye
    @halkeye:g4v.dev
    [m]
    are you sure? cause its saying its not there, I would try running docker-compose run jenkins ls -l /var/jenkins/home to confirm. Also this channel is for creating the jenkins packaging, not for jenkins help, I would recommend going to jenkinsci/jenkins room
    Sam Martin
    @sammartin:matrix.org
    [m]
    ok thanks
    Carlos Carvalho
    @cccarv82
    i'm trying to run a pipeline using docker agent in a jenkins/jenkins:lts-jdk11 docker image but the pipeline fails to run.
    /var/jenkins_home/workspace/rf-web-poc@tmp/durable-2d5d64cb/script.sh: 1: docker: not found
    halkeye
    @halkeye:g4v.dev
    [m]
    @cccarv82: jenkins docker image doesn't have docker cli. You'll have to extend the image, or use an agent outside of your controller (recommended)
    mangitkaur
    @mangitkaur
    Hi Team , please help, I am unable to update my kubernetes cluster with latest plugins, even though I have copied over newer version plugins via plugin-manager cli tool
    I am trying to upgrade few plugins because their older versions are causing dependencies issue, however when add them using plugin manager jar, they dont get updated in Kubernetes container, however they are in my image
    João Gabriel Bortot Cadore
    @joaobortotcadore

    Hi team.. I'm working with a project that uses espressif and to build it on my machine with docker way I do the following:

    docker run --rm -v $PWD:/project -w /project espressif/idf:v4.2.2 idf.py build (note that, first of all I make a cd to the project directory and then the PWD environment variable passes the correct path for mounting the volume)

    I would like to elaborate a declarative pipeline, and I would like to execute the command equivalent to the one above. The way I implemented it based on other examples that worked, and the log result below.

    I don't understand why the way to pass these 'idf.py build' arguments in the 'steps' block is not working. Does anyone have any ideas?

    My pipeline:

    pipeline {
        agent any
    
        environment {
            PROJ_NAME = 'test'
        }
        stages {
            stage('Checkout') {
                steps {
                    git url: 'ssh://git@bitbucket.org/joaogbc/iot-project.git'
                }
            }
            stage('Build') {
                agent {
                    docker {
                        image 'espressif/idf:v4.2.2'
                        args '--rm -v $PWD:/project -w /project'
                        reuseNode true
                    }
                }
                steps{
                    sh 'idf.py build'
                }
            }
        }
    }

    Error snippet:

    [Pipeline] withDockerContainer
    Jenkins does not seem to be running inside a container
    $ docker run -t -d -u 1000:1000 --rm -v $PWD:/project -w /project -w /var/lib/jenkins/workspace/iot-project-TEST -v /var/lib/jenkins/workspace/iot-project-TEST:/var/lib/jenkins/workspace/iot-project-TEST:rw,z -v /var/lib/jenkins/workspace/iot-project-TEST@tmp:/var/lib/jenkins/workspace/iot-project-TEST@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** espressif/idf:v4.2.2 cat
    $ docker top 81920a1146eabe9bf5c08339a682d81ac23777de0421895e1184d2a8ef27fc8c -eo pid,comm
    ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
    Alternatively you can force image entrypoint to be disabled by adding option `--entrypoint=''`.
    [Pipeline] {
    [Pipeline] sh
    + idf.py build
    /var/lib/jenkins/workspace/iot-project-TEST@tmp/durable-b8bf6ce0/script.sh: 1: /var/lib/jenkins/workspace/iot-project-TEST@tmp/durable-b8bf6ce0/script.sh: idf.py: not found
    [Pipeline] }
    $ docker stop --time=1 81920a1146eabe9bf5c08339a682d81ac23777de0421895e1184d2a8ef27fc8c
    $ docker rm -f 81920a1146eabe9bf5c08339a682d81ac23777de0421895e1184d2a8ef27fc8c
    [Pipeline] // withDockerContainer
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] }
    [Pipeline] // withEnv
    [Pipeline] }
    [Pipeline] // node
    [Pipeline] End of Pipeline
    ERROR: script returned exit code 127
    Finished: FAILURE
    I've already managed to successfully headless-build with the eclipse image as follows:
    stage('Build') {
        agent {
            docker {
                image 'tool/stm32-cubeide-image:1.0'
                reuseNode true
            }
        }
        steps {
            sh '/opt/stm32cubeide/headless-build.sh -importAll $WORKSPACE -data $WORKSPACE -cleanBuild  $DIR/$OPT_BUILD'
        }
    }
    dduportal
    @dduportal:matrix.org
    [m]
    @timja: I'm not sure to understand why is jenkinsci/docker#1456 a docker (image) issue? If I understand correctly, it's the jenkins-plugin-cli which fails the plugin installation?
    Tim Jacomb
    @timja
    no it's a bash function that does version comparison bundled in the image
    dduportal
    @dduportal:matrix.org
    [m]
    @timja: i thought we got rid of the shell script install-plugins.sh (which was using the versionLT() bash function as far as I remember) ?
    7 replies
    Tim Jacomb
    @timja
    yes but plugins aren't in the image outside of the volume and then there's a script here that copies them:
    https://github.com/jenkinsci/docker/blob/00d1edcbf6e0bd78ff5b359731310b91bdac9b07/jenkins-support#L42
    dduportal
    @dduportal:matrix.org
    [m]
    oh I see, it's the "copy plugins at startup" script. Thanks for the explanation!
    halkeye
    @halkeye:g4v.dev
    [m]
    its kinda a jenkins core + docker issue. install plugin ci puts it in jenkins ref, and jenkins core only copies ref if the file doesn't exist.
    oh my bad, not core, is purely docker?
    dduportal
    @dduportal:matrix.org
    [m]
    Pure docker (pure shell even!)
    Rein Petersen
    @ReinsBrain
    Hi all, ive made a docker-compose.yml and Dockerfile for jenkins with the hope that I'll be able to locally test jobs and have it all automated so i don't need the web UI ... not immediately apparent is the best way to go about automation of creating jobs. Ive been trying to use jenkins-cli and a little bit hung up on auth ... or should i just place files in the right places in jenkins_home? Any advice is greatly appreciated :)
    another thing i'd like to do is just pass the admin password as a build arg ( or better way? )
    hervelemeur
    @hervelemeur:matrix.org
    [m]
    Rein Petersen
    @ReinsBrain

    have it all automated

    Use https://www.jenkins.io/projects/jcasc/ with job-dsl-plugin: https://github.com/jenkinsci/job-dsl-plugin/blob/master/docs/JCasC.md :)

    Well... that's just super-interesting and super-helpful - thanks a whole bunch :)

    hervelemeur
    @hervelemeur:matrix.org
    [m]
    there is even a dedicated channel for it if you need additional help: https://matrix.to/#/#jenkinsci\_configuration-as-code-plugin:gitter.im
    Rein Petersen
    @ReinsBrain

    there is even a dedicated channel for it if you need additional help: https://matrix.to/#/#jenkinsci\_configuration-as-code-plugin:gitter.im

    Im having trouble with the link, says "does not exist"

    hervelemeur
    @hervelemeur:matrix.org
    [m]
    I think it depends what you're using to view irg/gitter channels (I'm using Element for example)
    Try searching it from whatever you're using
    Rein Petersen
    @ReinsBrain
    thanks i will try d/l Element client
    Rein Petersen
    @ReinsBrain
    image.png
    @hervelemeur:matrix.org i have the element client for windows but the link doesn't seem to work out still:
    hervelemeur
    @hervelemeur:matrix.org
    [m]
    🤷
    search it manually ;)
    hervelemeur
    @hervelemeur:matrix.org
    [m]
    :point_up: Edit: 🤷
    search "jenkinsci/configuration-as-code" manually ;)
    Rein Petersen
    @ReinsBrain

    :point_up: Edit: 🤷
    search "jenkinsci/configuration-as-code" manually ;)

    found it! thanks :)

    Mayhem Bill
    @MayhemBill
    okay, I'm not sure what I'm doing wrong, but I am running Jenkins in Docker, and I am trying to create an image from a dockerfile, but when I try to run the docker command in the container I get a permission denied, and anything I change in the Jenkins container just gets reset after a reboot