diff --git a/.gitignore b/.gitignore index 5f31d3ec7..d38ac07bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,12 @@ 2/Dockerfile.localdev.version +2/Dockerfile.rhel8.version +2/Dockerfile.rhel9.version agent-maven-3.5/Dockerfile.rhel7.version agent-maven-3.5/Dockerfile.localdev.version slave-base/Dockerfile.localdev.version slave-base/Dockerfile.rhel7.version slave-base/Dockerfile.rhel8.version +slave-base/Dockerfile.rhel9.version out logs kubeconfig diff --git a/2/Dockerfile.localdev b/2/Dockerfile.localdev index d73212aa7..6cd4e48c6 100644 --- a/2/Dockerfile.localdev +++ b/2/Dockerfile.localdev @@ -1,24 +1,23 @@ ############################################## # Stage 1 : Build go-init ############################################## -FROM openshift/origin-release:golang-1.12 AS go-init-builder +FROM registry.access.redhat.com/ubi9/go-toolset:1.21 AS go-init-builder ARG jenkins_version=latest WORKDIR /go/src/github.com/openshift/jenkins COPY . . WORKDIR /go/src/github.com/openshift/jenkins/go-init -RUN go build . && cp go-init /usr/bin +RUN GO111MODULE=off go build -o /usr/bin/go-init . ############################################## # Stage 2 : Build slave-base with go-init ############################################## -FROM quay.io/openshift/origin-cli:4.16 +FROM registry.access.redhat.com/ubi9:latest ARG jenkins_version=latest -MAINTAINER Akram Ben Aissi COPY --from=go-init-builder /usr/bin/go-init /usr/bin/go-init # Jenkins image for OpenShift # # This image provides a Jenkins server, primarily intended for integration with -# OpenShift v3. +# OpenShift v4. # # Volumes: # * /var/jenkins_home @@ -31,31 +30,35 @@ ENV JENKINS_VERSION=2 \ HOME=/var/lib/jenkins \ JENKINS_HOME=/var/lib/jenkins \ JENKINS_UC=https://updates.jenkins.io \ - OPENSHIFT_JENKINS_IMAGE_VERSION=4.10 \ + OPENSHIFT_JENKINS_IMAGE_VERSION=4.17 \ LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 \ INSTALL_JENKINS_VIA_RPMS=false -LABEL k8s.io.description="Jenkins is a continuous integration server" \ - k8s.io.display-name="Jenkins 2" \ - openshift.io.expose-services="8080:http" \ - openshift.io.tags="jenkins,jenkins2,ci" \ +LABEL io.k8s.description="Jenkins is a continuous integration server" \ + io.k8s.display-name="Jenkins 2" \ + maintainer="Prashant Dhamdhere , Vinu Kochukuttan " \ + io.openshift.expose-services="8080:http" \ + io.openshift.tags="jenkins,jenkins2,ci" \ io.jenkins.version="${jenkins_version}" \ - io.openshift.s2i.scripts-url=image:///usr/libexec/s2i + io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" # 8080 for main web interface, 50000 for slave agents EXPOSE 8080 50000 -RUN rm /etc/yum.repos.d/* -COPY contrib/openshift/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo -RUN curl http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-Official -o /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS && \ - INSTALL_PKGS="dejavu-sans-fonts rsync gettext git git-lfs tar zip unzip openssl bzip2 java-21-openjdk java-21-openjdk-devel java-17-openjdk java-17-openjdk-devel jq xmlstarlet" && \ - DISABLES="" && \ - yum $DISABLES -y --setopt=tsflags=nodocs --disableplugin=subscription-manager install epel-release && \ - yum $DISABLES -y --setopt=tsflags=nodocs --disableplugin=subscription-manager install $INSTALL_PKGS && \ - yum update --excludepkgs redhat-release -y && \ +RUN INSTALL_PKGS="dejavu-sans-fonts wget rsync gettext git git-lfs tar zip unzip openssl bzip2 java-21-openjdk java-21-openjdk-devel java-17-openjdk java-17-openjdk-devel jq glibc-locale-source xmlstarlet glibc-langpack-en" && \ + yum install -y $INSTALL_PKGS && \ + yum update -y && \ rpm -V $INSTALL_PKGS && \ yum clean all && \ + mkdir -p /usr/share/openshift/bin/oc-41{2..7} && \ + curl -sL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.12/openshift-client-linux.tar.gz | tar zxf - -C /usr/share/openshift/bin/oc-412/ oc && \ + curl -sL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.13/openshift-client-linux.tar.gz | tar zxf - -C /usr/share/openshift/bin/oc-413/ oc && \ + curl -sL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.14/openshift-client-linux.tar.gz | tar zxf - -C /usr/share/openshift/bin/oc-414/ oc && \ + curl -sL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.15/openshift-client-linux.tar.gz | tar zxf - -C /usr/share/openshift/bin/oc-415/ oc && \ + curl -sL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.16/openshift-client-linux.tar.gz | tar zxf - -C /usr/share/openshift/bin/oc-416/ oc && \ + curl -sL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.17/openshift-client-linux.tar.gz | tar zxf - -C /usr/share/openshift/bin/oc-417/ oc && \ + localedef -f UTF-8 -i en_US en_US.UTF-8 && \ alternatives --set java $(alternatives --display java | grep 'family java-21-openjdk' | cut -d ' ' -f 1) && \ alternatives --set javac $(alternatives --display javac | grep 'family java-21-openjdk' | cut -d ' ' -f 1) && \ alternatives --family $(alternatives --display java | grep 'family java-21-openjdk' | cut -d ' ' -f 4) --install /usr/bin/jar jar $(alternatives --display java | grep 'family java-21-openjdk' | cut -d' ' -f1 | sed 's,/[^/]*$,/jar,') 1 && \ @@ -67,7 +70,7 @@ ADD ./contrib/s2i /usr/libexec/s2i ADD release.version /tmp/release.version RUN /usr/local/bin/install-jenkins-core-plugins.sh /opt/openshift/bundle-plugins.txt && \ - rmdir /var/log/jenkins && \ + rm -rf /var/log/jenkins && \ chmod -R 775 /etc/alternatives && \ chmod -R 775 /var/lib/alternatives && \ chmod -R 775 /usr/lib/jvm && \ @@ -81,6 +84,7 @@ RUN /usr/local/bin/install-jenkins-core-plugins.sh /opt/openshift/bundle-plugins /usr/local/bin/fix-permissions /var/lib/jenkins && \ /usr/local/bin/fix-permissions /var/log + VOLUME ["/var/lib/jenkins"] USER 1001 diff --git a/2/cccp.yml b/2/cccp.yml deleted file mode 100644 index cfd9b3b64..000000000 --- a/2/cccp.yml +++ /dev/null @@ -1,41 +0,0 @@ -# This is for the purpose of building containers on the CentOS Community Container -# Pipeline. The containers are built, tested and delivered to registry.centos.org and -# lifecycled as well. A corresponding entry must exist in the container index itself, -# located at https://github.com/CentOS/container-index/tree/master/index.d -# You can know more at the following links: -# * https://github.com/CentOS/container-pipeline-service/blob/master/README.md -# * https://github.com/CentOS/container-index/blob/master/README.rst -# * https://wiki.centos.org/ContainerPipeline - -# This will be part of the name of the container. It should match the job-id in index entry -job-id: jenkins-2-centos7 - -#the following are optional, can be left blank -#defaults, where applicable are filled in -#nulecule-file : nulecule - -# This flag tells the container pipeline to skip user defined tests on their container -test-skip : True - -# This is path of the script that initiates the user defined tests. It must be able to -# return an exit code. -test-script : null - -# This is the path of custom build script. -build-script : null - -# This is the path of the custom delivery script -delivery-script : null - -# This flag tells the pipeline to deliver this container to docker hub. -docker-index : True - -# This flag can be used to enable or disable the custom delivery -custom-delivery : False - -# This flag can be used to enable or disable delivery of container to local registry -local-delivery : True - -Upstreams : - - ref : - url : diff --git a/2/contrib/jenkins/install-jenkins-core-plugins.sh b/2/contrib/jenkins/install-jenkins-core-plugins.sh index 20d59ab68..da210a36e 100755 --- a/2/contrib/jenkins/install-jenkins-core-plugins.sh +++ b/2/contrib/jenkins/install-jenkins-core-plugins.sh @@ -18,6 +18,7 @@ if [[ "${INSTALL_JENKINS_VIA_RPMS}" == false ]]; then echo "jenkins.war already exists, skipping upstream RPM installation" else echo "Installing jenkins.war from upstream RPM" + mkdir -p /etc/yum.repos.art/ci curl https://pkg.jenkins.io/rpm-stable/jenkins.repo | tee /etc/yum.repos.d/jenkins.repo /etc/yum.repos.art/ci/jenkins.repo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins-ci.org.key rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key diff --git a/2/contrib/jenkins/install-plugins.sh b/2/contrib/jenkins/install-plugins.sh index 6bb8ecb56..b0f4eba95 100755 --- a/2/contrib/jenkins/install-plugins.sh +++ b/2/contrib/jenkins/install-plugins.sh @@ -5,7 +5,7 @@ # # Usage: # -# FROM openshift/jenkins-2-centos7 +# FROM registry.redhat.io/ocp-tools-4/jenkins-rhel9:v4.17.0 # COPY plugins.txt /plugins.txt # RUN /usr/local/bin/install-plugins.sh /plugins.txt # diff --git a/2/contrib/openshift/CentOS-Base.repo b/2/contrib/openshift/CentOS-Base.repo deleted file mode 100644 index 892eb4344..000000000 --- a/2/contrib/openshift/CentOS-Base.repo +++ /dev/null @@ -1,38 +0,0 @@ -# CentOS-Base.repo -# -# The mirror system uses the connecting IP address of the client and the -# update status of each mirror to pick mirrors that are updated to and -# geographically close to the client. You should use this for CentOS updates -# unless you are manually picking other mirrors. -# -# If the mirrorlist= does not work for you, as a fall back you can try the -# remarked out baseurl= line instead. -# -# -[BaseOS] -name=CentOS-8 - Base -mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=$basearch&repo=BaseOS&infra=$infra -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS -#released updates - -#additional packages that may be useful -[extras] -name=CentOS-8 - Extras -mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=$basearch&repo=extras&infra=$infra -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS - -#additional packages that extend functionality of existing packages -[centosplus] -name=CentOS-8 - Plus -mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=$basearch&repo=centosplus&infra=$infra -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS - -#appstream -[appstream] -name=CentOS-8 - Plus -mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=$basearch&repo=AppStream&infra=$infra -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS diff --git a/2/contrib/openshift/configuration/init.groovy.d/oc-tools.groovy b/2/contrib/openshift/configuration/init.groovy.d/oc-tools.groovy new file mode 100644 index 000000000..6fdb8107b --- /dev/null +++ b/2/contrib/openshift/configuration/init.groovy.d/oc-tools.groovy @@ -0,0 +1,56 @@ +import jenkins.model.Jenkins +import hudson.slaves.EnvironmentVariablesNodeProperty +import hudson.slaves.EnvironmentVariablesNodeProperty.Entry +import com.openshift.jenkins.plugins.OpenShiftClientTools +import jenkins.model.Jenkins + +println "Configuring node property ..." + +def instance = Jenkins.instance + +def nodeProps = instance.nodeProperties +def envProp = nodeProps.get(EnvironmentVariablesNodeProperty) + +if (envProp == null) { + def newEnv = new EnvironmentVariablesNodeProperty( + new Entry("PATH+OC", "/usr/share/openshift/bin/oc-417"), + ) + nodeProps.add(newEnv) +} else { + def envVars = envProp.envVars + + envVars.put("PATH+OC", "/usr/share/openshift/bin/oc-417") +} + +instance.save() + +println "Environment variables updated." + +println "Configuring oc tools ..." + +def descriptor = Jenkins.instance.getDescriptor(OpenShiftClientTools) + +def toolsToAdd = [ + "oc-412": "/usr/share/openshift/bin/oc-412", + "oc-413": "/usr/share/openshift/bin/oc-413", + "oc-414": "/usr/share/openshift/bin/oc-414", + "oc-415": "/usr/share/openshift/bin/oc-415", + "oc-416": "/usr/share/openshift/bin/oc-416", + "oc-417": "/usr/share/openshift/bin/oc-417" +] + +def existing = descriptor.getInstallations() as List + +toolsToAdd.each { name, path -> + if (!existing.any { it.name == name }) { + existing << new OpenShiftClientTools(name, path, []) + println "Added: $name -> $path" + } else { + println "Skipped (already exists): $name" + } +} + +descriptor.setInstallations(existing.toArray(new OpenShiftClientTools[0])) +descriptor.save() + +println "All done!" diff --git a/2/test/jenkins_test.go b/2/test/jenkins_test.go index 462ebdeff..9e89c5d6e 100644 --- a/2/test/jenkins_test.go +++ b/2/test/jenkins_test.go @@ -33,7 +33,7 @@ var _ = BeforeSuite(func() { imageName = os.Getenv("IMAGE_NAME") if imageName == "" { - imageName = "openshift/jenkins-2-centos7-candidate" + imageName = "openshift/jenkins-2-rhel9-candidate" } }) diff --git a/ADVANCED_USAGE.md b/ADVANCED_USAGE.md index ec66f8b5e..211bbb23c 100644 --- a/ADVANCED_USAGE.md +++ b/ADVANCED_USAGE.md @@ -12,7 +12,7 @@ A quick recipe of how to do that via layering would be: * create a Dockerfile with (adjusting the image ref as you see fit) ``` -FROM registry.access.redhat.com/ocp-tools-4/jenkins-rhel8:latest +FROM registry.redhat.io/ocp-tools-4/jenkins-rhel9:v4.17.0 COPY ./contrib/openshift /opt/openshift ``` @@ -23,13 +23,13 @@ the existing run script your new image inherits from this repositories Jenkins i Usage --------------------------------- -For this, we will assume that you are using an `quay.io/openshift/origin-jenkins` for v4.x. +For this, we will assume that you are using an `registry.redhat.io/ocp-tools-4/jenkins-rhel9` for v4.x. If you want to set only the mandatory environment variables and store the database in the `/tmp/jenkins` directory on the host filesystem, execute the following command: ``` -$ docker run -d -e JENKINS_PASSWORD= -v /tmp/jenkins:/var/lib/jenkins openshift/jenkins-2-centos7 +$ docker run -d -e JENKINS_PASSWORD= -v /tmp/jenkins:/var/lib/jenkins ocp-tools-4/jenkins-rhel9:v4.17.0 ``` diff --git a/Makefile b/Makefile index fee87b01f..63772f512 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # The master images follow the normal numbering scheme in which the # major version is used as the directory name and incorporated into -# the image name (jenkins-2-centos7 in this case). For the slave +# the image name (jenkins-2-rhel9 in this case). For the slave # images we are not versioning them (they actually pull their # jars from the jenkins master, so they don't have a jenkins version, # so the only thing we'd version is the maven/nodejs version). @@ -13,10 +13,12 @@ VERSIONS="2 slave-base" BUNDLE_PLUGINS="$(shell pwd)/2/contrib/openshift/bundle-plugins.txt" REF=$(shell mktemp -d) JENKINS_WAR="$(shell mktemp -d)/jenkins.war" -ifeq ($(TARGET),rhel8) +ifeq ($(TARGET),rhel9) + OS := rhel9 +else ifeq ($(TARGET),rhel8) OS := rhel8 - else - OS := centos8 +else + OS := ubi endif .PHONY: build diff --git a/PLUGINS.md b/PLUGINS.md index 6f521e13d..fe0af772d 100644 --- a/PLUGINS.md +++ b/PLUGINS.md @@ -3,13 +3,12 @@ ### Base set of plugins An initial set of Jenkins plugins are included in the OpenShift Jenkins images. The general methodology -is that the CentOS7 image if first updated with any changes to the list of plugins. After some level -of verification with that image, the RHEL7 image is updated. -``` +is that the UBI image if first updated with any changes to the list of plugins. After some level +of verification with that image, the RHEL9 image is updated. -#### Plugin installation for CentOS7 V4 +#### Plugin installation for V4 In v4, that call has been moved to [this script](2/contrib/jenkins/install-jenkins-core-plugins.sh), which is called from -both `Dockerfile.localdev`, `Dockerfile.rhel7` and `Dockerfile.rhel8`. +`Dockerfile.localdev`, `Dockerfile.rhel8` and `Dockerfile.rhel9`. Where both [base-plugins.txt](2/contrib/openshift/base-plugins.txt) and [install-plugins.sh](2/contrib/jenkins/install-plugins.sh) are copied into the image prior to that invocation. @@ -17,42 +16,9 @@ are copied into the image prior to that invocation. The running of `install-plugins.sh` will download the files listed in `base-plugins.txt`, and then open each plugin's manifest and download any needed dependencies listed, including upgrading any previously installed dependencies as needed. -#### Plugin installation for CentOS7 V4.10+ -Starting from `release-4.10`, the `base-plugins.txt` file is instead used to generate `bundle-plugins.txt` which is the comprehensive -list of plugins used by the Jenkins image. To generate this list, developers must run `make plugins-list` prior to commit `base-plugins.txt`. -A git hook is provided to enforce that `bundle-plugins.txt` is always newer than `base-plugins.txt` on every commit attempt. And `openshift-ci` -also runs the `make plugins-list` to be sure that the locally generated list of plugins does not change between the developer commit and the -ci run. -The `bundle-plugins.txt` becomes then the source of truth for the ran, tested and verified plugins list. This file is intended to be used by -anyone who wants to build a Jenkins Image with the exact same set of plugins. Hence, this file is used by the Red Hat internal release -team (ART) and does not alter the existing release process, except that instead of getting the list of plugins from a succesful build, we now get it -from a predefined, pre-test and historized file written to the code repository. - - - -To update the version of a plugin or add a new plugin, construct a PR for this repository that updates `base-plugins.txt` appropriately. -Administrators for this repository will make sure necessary tests are run and merge the PR when things are ready. - -When PRs for this repository's `openshift-3*` branches are merged, they kick off associated builds in the [`push_jenkins_images` job on OpenShift's public -Jenkins CI/CD server](https://ci.openshift.redhat.com/jenkins/view/All/job/push_jenkins_images/). When those builds complete, -new versions of the CentOS7 based versions of the images produced by this repository are pushed to Docker Hub. See the top of the README for the precise list. - -For v4.0, the job definitions for this repository in https://github.com/openshif/release result in our Prow based infrastructure to eventually -mirror the image content on quay.io. - -#### Plugin installation for RHEL7 V3 and V4 - -Only OpenShift developers working for Red Hat can update the list of plugins for the RHEL7 image. For those developers, visit this -[internal Jenkins server](https://buildvm.openshift.eng.bos.redhat.com:8443/job/devex/job/devex%252Fjenkins-plugins/) and log in (contact our CD team for permissions to this job). Click the `Build with parameters` link, update the `PLUGIN_LIST` field, and submit the build. The format of the data for the `PLUGIN_LIST` field is the same as `base-plugins.txt`. - -The complete list of plugins (i.e. including dependencies) needs to be provided though. The most straight forward approach is to mine the output of the CentOS7 build which passed verification for the complete list. Just search for `Installed plugins:` and leverage copy/paste to compile what is needed. - -Although this document will refrain on detailing the precise details, once the build on the internal Jenkins server is complete, -the processes will be set in motion to build the `jenkins-2-plugins` RPM that is installed by the [RHEL7 Dockerfile](2/Dockerfile.rhel7) when the next version of the RHEL7 based OpenShift Jenkins image is built. When new versions of OpenShift are released, associated versions of the RHEL7 based versions of the images produced by this repository are pushed to the Docker registry provided to RHEL7 subscribers. +#### Plugin installation for V4.11+ -Some reference links for the OpenShift Jenkins developers and where things cross over with the CD/CL/Atomic/RHEL teams: -* http://pkgs.devel.redhat.com/cgit/rpms/?q=jenkins -* https://brewweb.engineering.redhat.com/brew/search?match=glob&type=package&terms=*jenkins* +Starting from `release-4.11`, manually update `base-plugins.txt` and `bundle-plugins.txt` to be the same. ### Adding plugins or updating existing plugins @@ -64,15 +30,14 @@ The specifics for each approach are detailed below. #### Installing using layering -In order to install additional Jenkins plugins, the OpenShift Jenkins image provides a way similar to how -the [initial set of plugins are added](#plugin-installation-for-centos7-v3-only) to this image that will allow one +In order to install additional Jenkins plugins, the OpenShift Jenkins image provides a way that will allow one to add or update by layering on top of this image. The derived image will provide the same functionality as described in this documentation, in addition it will also include all plugins you list in the `plugins.txt` file. To create a derived image in this fashion, create the following `Dockerfile`: ``` -FROM openshift/jenkins-2-centos7 +FROM registry.redhat.io/ocp-tools-4/jenkins-rhel9 COPY plugins.txt /opt/openshift/configuration/plugins.txt RUN /usr/local/bin/install-plugins.sh /opt/openshift/configuration/plugins.txt ``` @@ -114,7 +79,7 @@ folder, so you can also include additional files (like `credentials.xml`, etc.). To build your customized Jenkins image, you can then execute following command: ```console -$ s2i build https://github.com/your/repository openshift/jenkins-2-centos7 your_image_name +$ s2i build https://github.com/your/repository registry.redhat.io/ocp-tools-4/jenkins-rhel9 your_image_name ``` NOTE: if instead of adding a plugin you want to replace an existing plugin via dropping the binary plugin in the `./plugins` directory, make sure the filename ends in `.jpi`. diff --git a/README.md b/README.md index b41999b8d..366b6447d 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ These images are available via [quay.io](https://quay.io) and are community supp * [quay.io/openshift/origin-jenkins-agent-maven](https://quay.io/openshift/origin-jenkins-agent-maven) * [quay.io/openshift/origin-jenkins-agent-base](https://quay.io/openshift/origin-jenkins-agent-base) -**NOTE:** The jenkins-agent-maven and jenkins-agent-nodejs image are no longer maintained as of version 4.11 and no longer published as of version 4.14. +**NOTE:** The jenkins-agent-maven and jenkins-agent-nodejs image are no longer maintained as of version 4.11 and no longer published as of version 4.17. ### Red Hat OpenShift These images are available via the [Red Hat Catalog](https://catalog.redhat.com) for customers with subscriptions. @@ -26,11 +26,16 @@ These images are intended for OpenShift 4.10 and lower. * [openshift4/ose-jenkins-agent-maven](https://catalog.redhat.com/software/containers/openshift4/ose-jenkins-agent-maven/5cdd8fe55a13467289f615e7) * [openshift4/ose-jenkins-agent-nodejs-12-rhel8](https://catalog.redhat.com/software/containers/openshift4/ose-jenkins-agent-nodejs-12-rhel8/5f6c39da1fa29796579cdff7) -#### 4.11 and higher -These images are intended for OpenShift 4.11 and higher. +#### 4.11 to 4.15 +These images are intended for OpenShift 4.11 and 4.15. * [ocp-tools-4/jenkins-rhel8](https://catalog.redhat.com/software/containers/ocp-tools-4/jenkins-rhel8/5fe1f38288e9c2f788526306) * [ocp-tools-4/jenkins-agent-base-rhel8](https://catalog.redhat.com/software/containers/ocp-tools-4/jenkins-agent-base-rhel8/6241e3457847116cf8577aea) +#### 4.16 and higher +These images are intended for OpenShift 4.16 and higher. +* [ocp-tools-4/jenkins-rhel9](https://catalog.redhat.com/software/containers/ocp-tools-4/jenkins-rhel9/65dc9063b7db2e8b83a5b299) +* [ocp-tools-4/jenkins-agent-base-rhel9](https://catalog.redhat.com/software/containers/ocp-tools-4/jenkins-agent-base-rhel9/65dc9063b7db2e8b83a5b29e) + **NOTE:** The jenkins-agent-maven and jenkins-agent-nodejs image are no longer maintained or published as of version 4.11. ## Building diff --git a/TESTING.md b/TESTING.md index 52083b28f..b0545dcbd 100644 --- a/TESTING.md +++ b/TESTING.md @@ -4,25 +4,24 @@ Test This repository also provides a test framework which checks basic functionality of the Jenkins image. -With v3, users can choose between testing Jenkins based on a RHEL (where you are running on a platform with subscriptions) or CentOS image. -With v4, there is not CentOS vs. RHEL distinction, but we still use TARGET to control whether subscriptions are required when building the test image, -and we reuse the v3 values (i.e. `rhel7`) for that purpose. +The TARGET variable is used to determine whether ubi, rhel8, or rhel9 is selected +when building the test image. * **RHEL based image** - To test a RHEL7 based Jenkins image, you need to run the test on a properly + To test a RHEL based Jenkins image, you need to run the test on a properly subscribed RHEL machine. ``` $ cd jenkins - $ make test TARGET=rhel8 VERSION=2 - ``` + $ make test TARGET=rhel9 VERSION=2 + ``` -* **CentOS based image** +* **UBI image** ``` $ cd jenkins - $ make test VERSION=2 + $ make test TARGET=ubi VERSION=2 ``` **Notice: By omitting the `VERSION` parameter, the build/test action will be performed diff --git a/hack/build.sh b/hack/build.sh index f2f0ad2ab..c879f6562 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -1,7 +1,7 @@ #!/bin/bash -e # This script is used to build, test and squash the OpenShift Docker images. # -# $1 - Specifies distribution - "rhel7" or "centos7" for v3.x, "rhel7" only for 4.x +# $1 - Specifies distribution - "rhel8" or "rhel9" for 4.x # $2 - Specifies the image version - (must match with subdirectory in repo)# TEST_MODE - If set, build a candidate image and test it # TEST_MODE - If set, build a candidate image and test it # TAG_ON_SUCCESS - If set, tested image will be re-tagged as a non-candidate @@ -12,8 +12,8 @@ OS=$1 VERSION=$2 DOCKERFILE_PATH="" -BASE_IMAGE_NAME="docker.io/openshift/jenkins" -RHEL_BASE_IMAGE_NAME="registry.access.redhat.com/openshift3/jenkins" +BASE_IMAGE_NAME="quay.io/${USER}/jenkins" +RHEL_BASE_IMAGE_NAME="registry.redhat.io/ocp-tools-4/jenkins" BUILD_WITH=${BUILD_COMMAND:="podman build --no-cache"} # other possible values: "podman build --no-cache" or "buildah bud" JENKINS_VERSION_FILE=contrib/openshift/jenkins-version.txt @@ -59,7 +59,7 @@ for dir in ${dirs}; do fi done -if [ "$OS" == "rhel8" -o "$OS" == "rhel8-candidate" ]; then +if [ "$OS" == "rhel8" -o "$OS" == "rhel8-candidate" -o "$OS" == "rhel9" -o "$OS" == "rhel9-candidate" ]; then BASE_IMAGE_NAME=${RHEL_BASE_IMAGE_NAME} fi @@ -73,7 +73,9 @@ for dir in ${dirs}; do echo "-> Building ${IMAGE_NAME} ..." pushd ${dir} > /dev/null - if [ "$OS" == "rhel8" -o "$OS" == "rhel8-candidate" ]; then + if [ "$OS" == "rhel9" -o "$OS" == "rhel9-candidate" ]; then + docker_build_with_version Dockerfile.rhel9 + elif [ "$OS" == "rhel8" -o "$OS" == "rhel8-candidate" ]; then docker_build_with_version Dockerfile.rhel8 else docker_build_with_version Dockerfile.localdev diff --git a/openshift/imagestreams/jenkins-agent-base-centos.json b/openshift/imagestreams/jenkins-agent-base-centos.json deleted file mode 100755 index 7ec611f6a..000000000 --- a/openshift/imagestreams/jenkins-agent-base-centos.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "kind": "ImageStream", - "apiVersion": "image.openshift.io/v1", - "metadata": { - "name": "jenkins-agent-base" - }, - "spec": { - "tags": [ - { - "name": "latest", - "annotations": { - "description": "Provides a Jenkins Base Agent to extend Jenkins agents", - "iconClass": "icon-jenkins", - "openshift.io/display-name": "Jenkins Base Agent", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "jenkins" - }, - "from": { - "kind": "DockerImage", - "name": "quay.io/openshift/origin-jenkins-agent-base:4.13" - }, - "referencePolicy": { - "type": "Local" - } - } - ] - } -} diff --git a/openshift/imagestreams/jenkins-agent-base-centos.yaml b/openshift/imagestreams/jenkins-agent-base-centos.yaml deleted file mode 100644 index d16ec4315..000000000 --- a/openshift/imagestreams/jenkins-agent-base-centos.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: image.openshift.io/v1 -kind: ImageStream -metadata: - name: jenkins-agent-base -spec: - lookupPolicy: - local: false - tags: - - name: latest - annotations: - description: Provides a Jenkins Base Agent to extend Jenkins agents - iconClass: icon-jenkins - openshift.io/display-name: Jenkins Base Agent - openshift.io/provider-display-name: Red Hat, Inc. - tags: jenkins - from: - kind: DockerImage - name: quay.io/openshift/origin-jenkins-agent-base:4.13 - importPolicy: {} - referencePolicy: - type: Local diff --git a/openshift/imagestreams/jenkins-agent-base-rhel.json b/openshift/imagestreams/jenkins-agent-base-rhel.json old mode 100755 new mode 100644 index d7faa90ba..f8c457603 --- a/openshift/imagestreams/jenkins-agent-base-rhel.json +++ b/openshift/imagestreams/jenkins-agent-base-rhel.json @@ -17,7 +17,7 @@ }, "from": { "kind": "DockerImage", - "name": "registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel8:v4.13.0-1686680363" + "name": "registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel9:v4.17.0" }, "referencePolicy": { "type": "Local" @@ -35,7 +35,7 @@ }, "from": { "kind": "DockerImage", - "name": "registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel8:v4.13.0" + "name": "registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel9:v4.17.0" }, "referencePolicy": { "type": "Local" @@ -53,7 +53,7 @@ }, "from": { "kind": "DockerImage", - "name": "registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel8:v4.13.0" + "name": "registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel9:v4.17.0" }, "importPolicy": { "scheduled": true diff --git a/openshift/imagestreams/jenkins-agent-base-rhel.yaml b/openshift/imagestreams/jenkins-agent-base-rhel.yaml index 68858c448..fe393f455 100644 --- a/openshift/imagestreams/jenkins-agent-base-rhel.yaml +++ b/openshift/imagestreams/jenkins-agent-base-rhel.yaml @@ -13,7 +13,7 @@ spec: tags: jenkins from: kind: DockerImage - name: registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel8:v4.13.0-1686680363 + name: registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel9:v4.17.0 referencePolicy: type: Local - name: user-maintained-upgrade @@ -27,7 +27,7 @@ spec: tags: jenkins from: kind: DockerImage - name: registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel8:v4.13.0 + name: registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel9:v4.17.0 referencePolicy: type: Local - name: scheduled-upgrade @@ -40,7 +40,7 @@ spec: tags: jenkins from: kind: DockerImage - name: registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel8:v4.13.0 + name: registry.redhat.io/ocp-tools-4/jenkins-agent-base-rhel9:v4.17.0 importPolicy: scheduled: true referencePolicy: diff --git a/openshift/imagestreams/jenkins-centos.json b/openshift/imagestreams/jenkins-centos.json deleted file mode 100644 index fd97127f4..000000000 --- a/openshift/imagestreams/jenkins-centos.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "kind": "ImageStream", - "apiVersion": "image.openshift.io/v1", - "metadata": { - "name": "jenkins", - "annotations": { - "openshift.io/display-name": "Jenkins" - } - }, - "spec": { - "tags": [ - { - "name": "latest", - "annotations": { - "openshift.io/display-name": "Jenkins (Latest)", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a Jenkins server from quay.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.", - "iconClass": "icon-jenkins", - "tags": "jenkins" - }, - "from": { - "kind": "ImageStreamTag", - "name": "2" - }, - "referencePolicy": { - "type": "Local" - } - }, - { - "name": "okd-upgrade-redeploy", - "annotations": { - "openshift.io/display-name": "Jenkins (Latest)", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a Jenkins 2.X server from quay.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. This tag will will redeploy the Jenkins DeploymentConfig on an upgrade in OKD versions if the Jenkins image reference has changed.", - "iconClass": "icon-jenkins", - "tags": "jenkins" - }, - "from": { - "kind": "ImageStreamTag", - "name": "2" - }, - "referencePolicy": { - "type": "Local" - } - }, - { - "name": "2", - "annotations": { - "openshift.io/display-name": "Jenkins 2.X", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a Jenkins v2.x server from quay.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.", - "iconClass": "icon-jenkins", - "tags": "jenkins", - "version": "2.x" - }, - "from": { - "kind": "DockerImage", - "name": "quay.io/openshift/origin-jenkins:4.13" - }, - "referencePolicy": { - "type": "Local" - } - }, - { - "name": "user-maintained-upgrade-redeploy", - "annotations": { - "openshift.io/display-name": "Jenkins 2.X", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a Jenkins 2.X server from quay.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. A user must invoke 'oc import-image jenkins:user-maintained-upgrade-redeploy -n openshift' in order for the ImageStream controller to pull the latest digest for the image tag, and if a new digest exists, any running Jenkins DeploymentConfig will redeploy.", - "iconClass": "icon-jenkins", - "tags": "jenkins", - "version": "2.x" - }, - "from": { - "kind": "DockerImage", - "name": "quay.io/openshift/origin-jenkins:4.13" - }, - "referencePolicy": { - "type": "Local" - } - }, - { - "name": "scheduled-upgrade-redeploy", - "annotations": { - "openshift.io/display-name": "Jenkins 2.X", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a Jenkins 2.X server from quay.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. OpenShift will periodically check to ensure that the latest digest for this image tag is imported. If an update occurs, any running Jenkins DeploymentConfig will redeploy.", - "iconClass": "icon-jenkins", - "tags": "jenkins", - "version": "2.x" - }, - "from": { - "kind": "DockerImage", - "name": "quay.io/openshift/origin-jenkins:4.13" - }, - "importPolicy": { - "scheduled": true - }, - "referencePolicy": { - "type": "Local" - } - } - ] - } -} diff --git a/openshift/imagestreams/jenkins-centos.yaml b/openshift/imagestreams/jenkins-centos.yaml deleted file mode 100644 index 069a73205..000000000 --- a/openshift/imagestreams/jenkins-centos.yaml +++ /dev/null @@ -1,91 +0,0 @@ -kind: ImageStream -apiVersion: image.openshift.io/v1 -metadata: - name: jenkins - annotations: - openshift.io/display-name: Jenkins -spec: - tags: - - name: latest - annotations: - openshift.io/display-name: Jenkins (Latest) - openshift.io/provider-display-name: Red Hat, Inc. - description: |- - Provides a Jenkins server on CentOS. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. - - WARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates. - iconClass: icon-jenkins - tags: jenkins - from: - kind: ImageStreamTag - name: "2" - referencePolicy: - type: Local - - name: ocp-upgrade-redeploy - annotations: - openshift.io/display-name: Jenkins (Latest) - openshift.io/provider-display-name: Red Hat, Inc. - description: - Provides a Jenkins 2.X server from quay.io. For more information about - using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. - This tag will will redeploy the Jenkins DeploymentConfig on an upgrade in OCP versions if the Jenkins image reference has changed. - iconClass: icon-jenkins - tags: jenkins - from: - kind: ImageStreamTag - name: "2" - referencePolicy: - type: Local - - name: "2" - annotations: - openshift.io/display-name: Jenkins 2.X - openshift.io/provider-display-name: Red Hat, Inc. - description: - Provides a Jenkins v2.x server on CentOS. For more information - about using this container image, including OpenShift considerations, see - https://github.com/openshift/jenkins/blob/master/README.md. - iconClass: icon-jenkins - tags: jenkins - version: 2.x - from: - kind: DockerImage - name: quay.io/openshift/origin-jenkins:4.13 - referencePolicy: - type: Local - - name: "user-maintained-upgrade-redeploy" - annotations: - openshift.io/display-name: Jenkins 2.X - openshift.io/provider-display-name: Red Hat, Inc. - description: - Provides a Jenkins 2.X server from quay.io. For more information about - using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. - This tag will will redeploy the Jenkins DeploymentConfig on an upgrade in OKD versions if the Jenkins image reference has changed. - A user must invoke 'oc import-image jenkins:user-maintained-upgrade-redeploy -n openshift' in order for the ImageStream controller - to pull the latest digest for the image tag, and if a new digest exists, any running Jenkins DeploymentConfig will redeploy. - iconClass: icon-jenkins - tags: jenkins - version: 2.x - from: - kind: DockerImage - name: quay.io/openshift/origin-jenkins:4.13 - referencePolicy: - type: Local - - name: "scheduled-upgrade-redeploy" - annotations: - openshift.io/display-name: Jenkins 2.X - openshift.io/provider-display-name: Red Hat, Inc. - description: - Provides a Jenkins 2.X server from quay.io. For more information about - using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. - OpenShift will periodically check to ensure that the latest digest for this image tag is imported. If an update occurs, any running - Jenkins DeploymentConfig will redeploy. - iconClass: icon-jenkins - tags: jenkins - version: 2.x - from: - kind: DockerImage - name: quay.io/openshift/origin-jenkins:4.13 - importPolicy: - scheduled: true - referencePolicy: - type: Local diff --git a/openshift/imagestreams/jenkins-rhel.json b/openshift/imagestreams/jenkins-rhel.json index d6dcf6220..cb8e289b9 100644 --- a/openshift/imagestreams/jenkins-rhel.json +++ b/openshift/imagestreams/jenkins-rhel.json @@ -55,7 +55,7 @@ }, "from": { "kind": "DockerImage", - "name": "registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.13.0-1686682222" + "name": "registry.redhat.io/ocp-tools-4/jenkins-rhel9:v4.17.0" }, "referencePolicy": { "type": "Local" @@ -73,7 +73,7 @@ }, "from": { "kind": "DockerImage", - "name": "registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.13.0" + "name": "registry.redhat.io/ocp-tools-4/jenkins-rhel9:v4.17.0" }, "referencePolicy": { "type": "Local" @@ -91,7 +91,7 @@ }, "from": { "kind": "DockerImage", - "name": "registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.13.0" + "name": "registry.redhat.io/ocp-tools-4/jenkins-rhel9:v4.17.0" }, "importPolicy": { "scheduled": true diff --git a/openshift/imagestreams/jenkins-rhel.yaml b/openshift/imagestreams/jenkins-rhel.yaml index 1ece8e5f6..ec6164073 100644 --- a/openshift/imagestreams/jenkins-rhel.yaml +++ b/openshift/imagestreams/jenkins-rhel.yaml @@ -49,7 +49,7 @@ spec: version: 2.x from: kind: DockerImage - name: registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.13.0-1686682222 + name: registry.redhat.io/ocp-tools-4/jenkins-rhel9:v4.17.0 referencePolicy: type: Local - name: "user-maintained-upgrade-redeploy" @@ -67,7 +67,7 @@ spec: version: 2.x from: kind: DockerImage - name: registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.13.0 + name: registry.redhat.io/ocp-tools-4/jenkins-rhel9:v4.17.0 referencePolicy: type: Local - name: "scheduled-upgrade-redeploy" @@ -85,7 +85,7 @@ spec: version: 2.x from: kind: DockerImage - name: registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.13.0 + name: registry.redhat.io/ocp-tools-4/jenkins-rhel9:v4.17.0 importPolicy: scheduled: true referencePolicy: diff --git a/slave-base/Dockerfile.localdev b/slave-base/Dockerfile.localdev index e1381832a..96e7286a3 100644 --- a/slave-base/Dockerfile.localdev +++ b/slave-base/Dockerfile.localdev @@ -1,33 +1,36 @@ ############################################## # Stage 1 : Build go-init ############################################## -FROM openshift/origin-release:golang-1.12 AS go-init-builder +FROM registry.access.redhat.com/ubi9/go-toolset:1.21 AS go-init-builder WORKDIR /go/src/github.com/openshift/jenkins COPY . . WORKDIR /go/src/github.com/openshift/jenkins/go-init -RUN go build . && cp go-init /usr/bin +RUN GO111MODULE=off go build -o /usr/bin/go-init . ############################################## # Stage 2 : Build slave-base with go-init ############################################## -FROM quay.io/openshift/origin-cli:4.16 -MAINTAINER Akram Ben Aissi +FROM registry.access.redhat.com/ubi9:latest COPY --from=go-init-builder /usr/bin/go-init /usr/bin/go-init +LABEL io.k8s.display-name="Jenkins Slave Base" \ + io.k8s.description="The jenkins slave base image is intended to be built on top of, to add your own tools that your jenkins job needs. The slave base image includes all the jenkins logic to operate as a slave, so users just have to yum install any additional packages their specific jenkins job will need" \ + io.openshift.tags="openshift,jenkins,slave" \ + maintainer="Prashant Dhamdhere , Vinu Kochukuttan " + ENV HOME=/home/jenkins \ LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 USER root # Install headless Java -COPY contrib/openshift/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo -RUN curl http://mirror.centos.org/centos-7/7/os/x86_64/RPM-GPG-KEY-CentOS-7 -o /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 && \ - INSTALL_PKGS="bc gettext git git-lfs java-21-openjdk-headless java-17-openjdk-headless lsof rsync tar unzip which zip bzip2 jq" && \ - DISABLES="--disablerepo=rhel-server-extras --disablerepo=rhel-server --disablerepo=rhel-fast-datapath --disablerepo=rhel-server-optional --disablerepo=rhel-server-ose --disablerepo=rhel-server-rhscl" && \ - yum $DISABLES install -y --setopt=tsflags=nodocs --disableplugin=subscription-manager epel-release && \ - yum $DISABLES install -y --setopt=tsflags=nodocs --disableplugin=subscription-manager $INSTALL_PKGS && \ +RUN INSTALL_PKGS="glibc-langpack-en bc gettext git git-lfs java-21-openjdk-headless java-17-openjdk-headless lsof rsync tar unzip which zip bzip2 jq glibc-locale-source" && \ + yum install -y --setopt=tsflags=nodocs --disableplugin=subscription-manager $INSTALL_PKGS && \ rpm -V $INSTALL_PKGS && \ + yum update -y && \ yum clean all && \ + curl -sL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz | tar zxf - -C /usr/bin/ oc && \ + localedef -f UTF-8 -i en_US en_US.UTF-8 && \ alternatives --set java $(alternatives --display java | grep 'family java-21-openjdk' | cut -d ' ' -f 1) && \ mkdir -p /home/jenkins && \ chown -R 1001:0 /home/jenkins && \ @@ -38,14 +41,7 @@ RUN curl http://mirror.centos.org/centos-7/7/os/x86_64/RPM-GPG-KEY-CentOS-7 -o / chmod 775 /usr/bin && \ chmod 775 /usr/share/man/man1 && \ mkdir -p /var/lib/origin && \ - chmod 775 /var/lib/origin && \ - unlink /usr/bin/java && \ - unlink /usr/bin/jjs && \ - unlink /usr/bin/keytool && \ - unlink /usr/bin/pack200 && \ - unlink /usr/bin/rmid && \ - unlink /usr/bin/rmiregistry && \ - unlink /usr/bin/unpack200 + chmod 775 /var/lib/origin # Copy the entrypoint ADD contrib/bin/* /usr/local/bin/ diff --git a/slave-base/cccp.yml b/slave-base/cccp.yml deleted file mode 100644 index 6327c4197..000000000 --- a/slave-base/cccp.yml +++ /dev/null @@ -1,41 +0,0 @@ -# This is for the purpose of building containers on the CentOS Community Container -# Pipeline. The containers are built, tested and delivered to registry.centos.org and -# lifecycled as well. A corresponding entry must exist in the container index itself, -# located at https://github.com/CentOS/container-index/tree/master/index.d -# You can know more at the following links: -# * https://github.com/CentOS/container-pipeline-service/blob/master/README.md -# * https://github.com/CentOS/container-index/blob/master/README.rst -# * https://wiki.centos.org/ContainerPipeline - -# This will be part of the name of the container. It should match the job-id in index entry -job-id: jenkins-slave-base-centos7 - -#the following are optional, can be left blank -#defaults, where applicable are filled in -#nulecule-file : nulecule - -# This flag tells the container pipeline to skip user defined tests on their container -test-skip : True - -# This is path of the script that initiates the user defined tests. It must be able to -# return an exit code. -test-script : null - -# This is the path of custom build script. -build-script : null - -# This is the path of the custom delivery script -delivery-script : null - -# This flag tells the pipeline to deliver this container to docker hub. -docker-index : True - -# This flag can be used to enable or disable the custom delivery -custom-delivery : False - -# This flag can be used to enable or disable delivery of container to local registry -local-delivery : True - -Upstreams : - - ref : - url : diff --git a/slave-base/contrib/openshift/CentOS-Base.repo b/slave-base/contrib/openshift/CentOS-Base.repo deleted file mode 100644 index 49dd622ca..000000000 --- a/slave-base/contrib/openshift/CentOS-Base.repo +++ /dev/null @@ -1,42 +0,0 @@ -# CentOS-Base.repo -# -# The mirror system uses the connecting IP address of the client and the -# update status of each mirror to pick mirrors that are updated to and -# geographically close to the client. You should use this for CentOS updates -# unless you are manually picking other mirrors. -# -# If the mirrorlist= does not work for you, as a fall back you can try the -# remarked out baseurl= line instead. -# -# -[base] -name=CentOS-7 - Base -mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=os&infra=$infra -#baseurl=http://mirror.centos.org/centos/7/os/$basearch/ -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 -#released updates - -[updates] -name=CentOS-7 - Updates -mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=updates&infra=$infra -#baseurl=http://mirror.centos.org/centos/7/updates/$basearch/ -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 - -#additional packages that may be useful -[extras] -name=CentOS-7 - Extras -mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=extras&infra=$infra -#baseurl=http://mirror.centos.org/centos/7/extras/$basearch/ -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 - -#additional packages that extend functionality of existing packages -[centosplus] -name=CentOS-7 - Plus -mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=centosplus&infra=$infra -#baseurl=http://mirror.centos.org/centos/7/centosplus/$basearch/ -gpgcheck=1 -enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 diff --git a/slave-base/test/slave_base_test.go b/slave-base/test/slave_base_test.go index eec2c5c72..50592e91a 100644 --- a/slave-base/test/slave_base_test.go +++ b/slave-base/test/slave_base_test.go @@ -26,7 +26,7 @@ var _ = BeforeSuite(func() { imageName = os.Getenv("IMAGE_NAME") if imageName == "" { - imageName = "openshift/jenkins-slave-base-centos7-candidate" + imageName = "openshift/jenkins-slave-base-rhel9-candidate" } })