From: robert.tomczyk Date: Wed, 20 Dec 2023 13:09:16 +0000 (+0000) Subject: Upgrade Jenkins agent version to 4.14 X-Git-Url: https://gerrit.nordix.org/gitweb?p=infra%2Ftools.git;a=commitdiff_plain;h=c87a83621d6d7e3816527647b1aed846a8636c89 Upgrade Jenkins agent version to 4.14 The new version of Jenkins LTS 2.426.1 requires agent version 4.13 or newer Jenkins Slaves docker image was upgraded with Jenkins agent version 4.14 Change-Id: I4480cd7ef904af70f013f6aebc86cbf942f61dfb --- diff --git a/infra/jenkins/slave-setup/docker-slave/Dockerfile b/infra/jenkins/slave-setup/docker-slave/Dockerfile index 81e4bc8..a356c31 100644 --- a/infra/jenkins/slave-setup/docker-slave/Dockerfile +++ b/infra/jenkins/slave-setup/docker-slave/Dockerfile @@ -21,13 +21,12 @@ # use as Jenkins Slaves for Nordix Infra. The image is configured # and tested for running # - Jenkins Job Builder Verify and Merge jobs using tox -# - Cloud Infra Engine ansible-lint, yamllist, and shellcheck using tox # - ONAP report generation # -# The image built using this Dockerfile is currently being stored on Docker Hub +# The image built using this Dockerfile is currently being stored on Nordix registry # with the name nordixorg/infra-tools-docker-slave-ubuntu1804 which can be seen # using the link below. -# https://hub.docker.com/repository/docker/nordixorg/infra-tools-docker-slave-ubuntu1804 +# https://registry.nordix.org/harbor/projects/29/repositories/infra-tools-docker-slave-ubuntu1804 # The images are automatically attached to Jenkins as slaves using Jenkins # Docker plugin with a name that looks like infra-ubuntu1804- # @@ -36,6 +35,15 @@ # which gets provisioned by Jenkins Docker plugin. Please note that it takes few # seconds before the slave becomes ready and job starts running. #------------------------------------------------------------------------------- +# Please use this docker file to build new Nordix docker slave image. +# Here are the steps required to build and upload the new image to Nordix registry +# 1. Login to Nordix Harbor with account that have write access to nordixorg repository +# $ docker login registry.nordix.org +# 2. Build new image using the correct path and tag version. For example: +# $ docker build . -t "registry.nordix.org/nordixorg/infra-tools-docker-slave-ubuntu1804:5-jdk11" +# 3. Upload new image to Nordix registry +# $ docker push registry.nordix.org/nordixorg/infra-tools-docker-slave-ubuntu1804:5-jdk11 +#------------------------------------------------------------------------------- FROM jenkins/jnlp-slave:latest-jdk11 USER root # we need few basic packages in order to use base image as Jenkins slave @@ -45,6 +53,11 @@ RUN apt upgrade -o Dpkg::Options::=--force-confdef -o \ RUN apt install -o Dpkg::Options::=--force-confdef -o \ Dpkg::Options::=--force-confnew -q=3 -y git vim sudo \ software-properties-common wget jq gnupg +# FixMe: New version of Jenkins LTS 2.426.1 requires agent version 4.13 or newer +# 13 Dec 2023: The latest jnlp-slave base image contains agent 4.9 +# https://hub.docker.com/r/jenkins/jnlp-slave/tags +ENV VERSION=4.14 +RUN curl --create-dirs -fsSLo /usr/share/jenkins/agent.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar && chmod 644 /usr/share/jenkins/agent.jar && chown jenkins:jenkins /usr/share/jenkins/agent.jar # add ubuntu repos for python3.6-minimal and the key RUN add-apt-repository 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu bionic main' RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 3B4FE6ACC0B21F32