diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 676eaa853..b0cc1cfd4 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -34,23 +34,6 @@ jobs: --build-arg nexusUsername=developer \ --build-arg nexusPassword=s3cr3t \ . - - jenkins-agent-nodejs18-ubi8: - name: Jenkins agent NodeJS 18 (UBI8) - runs-on: ubuntu-22.04 - steps: - - - name: Checkout repository - uses: actions/checkout@v4.2.2 - - - name: Build docker image - working-directory: common/jenkins-agents/nodejs18/docker - run: | - docker build --tag agent-nodejs18-test-ubi8 --file Dockerfile.ubi8 \ - --build-arg nexusUrl=https://nexus.example.com \ - --build-arg nexusAuth=developer:s3cr3t \ - . - jenkins-agent-nodejs20-ubi8: name: Jenkins agent NodeJS 20 (UBI8) runs-on: ubuntu-22.04 diff --git a/CHANGELOG.md b/CHANGELOG.md index 792400a32..d589e0c02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ ### Fixed +### Removed + +- Remove `jenkins-agent-nodejs18` (Node.js 18 reached end-of-life on 2025-04-30) — the agent image and associated OpenShift templates/docs were removed from the repository. Please migrate pipelines to supported Node.js agents such as `jenkins-agent-nodejs20` or `jenkins-agent-nodejs22`. + ## [4.10.0] - 2025-10-13 ### Changed diff --git a/Makefile b/Makefile index 2b1f086ab..083275f52 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,12 @@ ODS_NAMESPACE := $(shell grep ODS_NAMESPACE $(CURDIR)/../ods-configuration/ods-c install-jenkins-agent: install-jenkins-agent-golang install-jenkins-agent-jdk install-jenkins-agent-nodejs install-jenkins-agent-python install-jenkins-agent-scala install-jenkins-agent-terraform-2306 install-jenkins-agent-terraform-2408 install-jenkins-agent-rust .PHONY: install-jenkins-agent -## Update OpenShift resources related Jenkins agent resources. -apply-jenkins-agent-build: apply-jenkins-agent-golang-build apply-jenkins-agent-jdk-build apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build apply-jenkins-agent-python-build apply-jenkins-agent-scala-build apply-jenkins-agent-terraform-build-2306 apply-jenkins-agent-terraform-build-2408 apply-jenkins-agent-rust-build .PHONY: apply-jenkins-agent-build +## Update OpenShift resources related Jenkins agent resources. +apply-jenkins-agent-build: apply-jenkins-agent-golang-build apply-jenkins-agent-jdk-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build apply-jenkins-agent-python-build apply-jenkins-agent-scala-build apply-jenkins-agent-terraform-build-2306 apply-jenkins-agent-terraform-build-2408 apply-jenkins-agent-rust-build ## Start builds of Jenkins agents. -start-jenkins-agent-build: start-jenkins-agent-golang-build start-jenkins-agent-jdk-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build start-jenkins-agent-python-build start-jenkins-agent-scala-build start-jenkins-agent-terraform-build-2306 start-jenkins-agent-terraform-build-2408 start-jenkins-agent-rust-build +start-jenkins-agent-build: start-jenkins-agent-golang-build start-jenkins-agent-jdk-build start-jenkins-agent-nodejs20-build start-jenkins-agent-nodejs22-build start-jenkins-agent-python-build start-jenkins-agent-scala-build start-jenkins-agent-terraform-build-2306 start-jenkins-agent-terraform-build-2408 start-jenkins-agent-rust-build .PHONY: start-jenkins-agent-build @@ -54,14 +54,10 @@ start-jenkins-agent-jdk-build: # JENKINS AGENT NODEJS ## Install or update Jenkins Node agent resources. -install-jenkins-agent-nodejs: apply-jenkins-agent-nodejs18-build apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build start-jenkins-agent-nodejs18-build start-jenkins-agent-nodejs20-build start-jenkins-agent-nodejs22-build +install-jenkins-agent-nodejs: apply-jenkins-agent-nodejs20-build apply-jenkins-agent-nodejs22-build start-jenkins-agent-nodejs20-build start-jenkins-agent-nodejs22-build .PHONY: install-jenkins-agent-nodejs -## Update OpenShift resources related to Jenkins Node 18 agent image. -apply-jenkins-agent-nodejs18-build: - cd common/jenkins-agents/nodejs18/ocp-config && tailor apply --namespace $(ODS_NAMESPACE) -.PHONY: apply-jenkins-agent-nodejs18-build - +## Update OpenShift resources related to Jenkins Node agent images. ## Update OpenShift resources related to Jenkins Node 20 agent image. apply-jenkins-agent-nodejs20-build: cd common/jenkins-agents/nodejs20/ocp-config && tailor apply --namespace $(ODS_NAMESPACE) @@ -72,11 +68,6 @@ apply-jenkins-agent-nodejs22-build: cd common/jenkins-agents/nodejs22/ocp-config && tailor apply --namespace $(ODS_NAMESPACE) .PHONY: apply-jenkins-agent-nodejs22-build -## Start build of BuildConfig "jenkins-agent-nodejs18". -start-jenkins-agent-nodejs18-build: - oc -n $(ODS_NAMESPACE) start-build jenkins-agent-nodejs18 --follow -.PHONY: start-jenkins-agent-nodejs18-build - ## Start build of BuildConfig "jenkins-agent-nodejs20". start-jenkins-agent-nodejs20-build: oc -n $(ODS_NAMESPACE) start-build jenkins-agent-nodejs20 --follow diff --git a/common/jenkins-agents/README.md b/common/jenkins-agents/README.md index 0b7e4e7b3..d796540b9 100644 --- a/common/jenkins-agents/README.md +++ b/common/jenkins-agents/README.md @@ -17,9 +17,8 @@ The ODS [jenkins shared library](https://github.com/opendevstack/ods-jenkins-sha 1. [GoLang](golang) 2. [Jdk](jdk) -3. [Node.js 18](nodejs18) -4. [Node.js 20](nodejs20) -5. [Node.js 22](nodejs22) +3. [Node.js 20](nodejs20) +4. [Node.js 22](nodejs22) 6. [Python](python) 7. [Rust](rust) 8. [Scala & SBT](scala) diff --git a/common/jenkins-agents/nodejs18/docker/Dockerfile.ubi8 b/common/jenkins-agents/nodejs18/docker/Dockerfile.ubi8 deleted file mode 100644 index b4b5e7634..000000000 --- a/common/jenkins-agents/nodejs18/docker/Dockerfile.ubi8 +++ /dev/null @@ -1,63 +0,0 @@ -FROM opendevstackorg/ods-jenkins-agent-base-ubi8:latest - -# Labels consumed by Red Hat build service -LABEL com.redhat.component="jenkins-agent-nodejs-18-rhel7-container" \ - name="openshift4/jenkins-agent-nodejs-18-rhel7" \ - architecture="x86_64" \ - io.k8s.display-name="Jenkins Agent Nodejs" \ - io.k8s.description="The jenkins agent nodejs image has the nodejs tools on top of the jenkins agent base image." \ - io.openshift.tags="openshift,jenkins,agent,nodejs" \ - maintainer="openshift-dev-services+jenkins@redhat.com" - -ARG nexusUrl -ARG nexusAuth - -ENV NODEJS_VERSION=18 \ - YARN_VERSION=1.22.18 \ - NPM_CONFIG_PREFIX=$HOME/.npm-global \ - NPM_CONFIG_CAFILE=/etc/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem \ - PATH=$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH \ - LANG=en_US.UTF-8 \ - LC_ALL=en_US.UTF-8 - -COPY contrib/bin/configure-agent /usr/local/bin/configure-agent - -# Generate machine ID -RUN dbus-uuidgen > /etc/machine-id - -# Install NodeJS -RUN INSTALL_PKGS="nodejs nodejs-nodemon make gcc-c++" && \ - curl -fsSL https://rpm.nodesource.com/setup_${NODEJS_VERSION}.x | bash - && \ - yum install -y --setopt=tsflags=nodocs --disableplugin=subscription-manager $INSTALL_PKGS && \ - rpm -V $INSTALL_PKGS && \ - yum clean all -y - -# Install Yarn -# https://classic.yarnpkg.com/en/docs/install -RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION - -# Install Cypress dependencies -# https://docs.cypress.io/guides/getting-started/installing-cypress.html#System-requirements -COPY yum.repos.d/google-chrome.repo /etc/yum.repos.d/google-chrome.repo -COPY yum.repos.d/almalinux.repo /etc/yum.repos.d/almalinux.repo -COPY yum.repos.d/microsoft-edge.repo /etc/yum.repos.d/microsoft-edge.repo -RUN yum repolist \ - && yum install -y xorg-x11-server-Xvfb gtk2-devel gtk3-devel libnotify-devel GConf2 nss libXScrnSaver alsa-lib \ - && yum install -y --enablerepo google-chrome google-chrome-stable \ - && yum install -y --enablerepo edge microsoft-edge-stable \ - && yum clean all -y - -RUN npm config set registry=$nexusUrl/repository/npmjs/ && \ - npm config set //${nexusUrl#*://}/repository/npmjs/:_auth=$(echo -n $nexusAuth | base64) && \ - npm config set email=no-reply@opendevstack.org && \ - npm config set strict-ssl=true && \ - yarn config set registry $nexusUrl/repository/npmjs/ -g && \ - echo node version: $(node --version) && \ - echo npm version: $(npm --version) && \ - echo npx version: $(npx --version) && \ - echo yarn version: $(yarn --version) - -RUN chown -R 1001:0 $HOME && \ - chmod -R g+rwX $HOME - -USER 1001 diff --git a/common/jenkins-agents/nodejs18/docker/contrib/bin/configure-agent b/common/jenkins-agents/nodejs18/docker/contrib/bin/configure-agent deleted file mode 100644 index 02ab20288..000000000 --- a/common/jenkins-agents/nodejs18/docker/contrib/bin/configure-agent +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# extract the different element of an url into a JSON structure -parse_url() { - # extract the protocol - proto="$(echo $1 | cut -f1 -d: )" - if [[ ! -z $proto ]] ; then - # remove the protocol - url="$(echo ${1/"$proto://"/})" - # extract the user (if any) - login="$(echo $url | grep @ | cut -d@ -f1)" - username="$(echo $login | cut -d: -f1)" - password="$(echo $login | cut -d: -f2)" - # extract the host - host_port="$(echo ${url/$login@/} | cut -d/ -f1) " - host="$(echo $host_port | cut -f1 -d:) " - - # by request - try to extract the port - port="$(echo $host_port | sed -e 's,^.*:,:,g' -e 's,.*:\([0-9]*\).*,\1,g' -e 's,[^0-9],,g')" - # extract the uri (if any) - resource="/$(echo $url | grep / | cut -d/ -f2-)" - fi - echo -n "{ \"uri\": \"$1\" , \"url\": \"$url\" , \"proto\": \"$proto\" , \"login\": \"$login\" ," - echo " \"username\": \"$username\" , \"password\": \"$password\" , \"host\": \"$host\" , \"port\": \"$port\" }" -} - -get_npm_proxy_config(){ - local proto json - proto=$1 - json=$2 - username=$( echo $json | jq -r .username) - password=$( echo $json | jq -r .password) - host=$( echo $json | jq -r .host) - port=$( echo $json | jq -r .port) - proxy_url="$host:$port" - - if [ -n "$username" -a -n "$password" ]; then - proxy_url="$proto://$username:$password@$proxy_url" - fi - - echo $proxy_url -} - - -if [ -n "$http_proxy" ]; then - json=$( parse_url $http_proxy ) - proxy=$(get_npm_proxy_config http "$json") - npm -g config set proxy $proxy -fi - -if [ -n "$https_proxy" ]; then - json=$( parse_url $https_proxy ) - proxy=$(get_npm_proxy_config https "$json") - npm -g config set https_proxy $proxy -fi - -if [ -n "$no_proxy" ]; then - npm -g config set noproxy $no_proxy -fi - -if [ -n "$NPM_MIRROR_URL" ]; then - npm -g config set registry "$NPM_MIRROR_URL" -fi diff --git a/common/jenkins-agents/nodejs18/docker/contrib/bin/scl_enable b/common/jenkins-agents/nodejs18/docker/contrib/bin/scl_enable deleted file mode 100644 index d75a76865..000000000 --- a/common/jenkins-agents/nodejs18/docker/contrib/bin/scl_enable +++ /dev/null @@ -1,3 +0,0 @@ -# This will make scl collection binaries work out of box. -unset BASH_ENV PROMPT_COMMAND ENV -source scl_source enable rh-nodejs18 diff --git a/common/jenkins-agents/nodejs18/docker/yum.repos.d/almalinux.repo b/common/jenkins-agents/nodejs18/docker/yum.repos.d/almalinux.repo deleted file mode 100644 index d26a001f7..000000000 --- a/common/jenkins-agents/nodejs18/docker/yum.repos.d/almalinux.repo +++ /dev/null @@ -1,13 +0,0 @@ -[almalinux-baseos] -name=AlmaLinux-8-BaseOS -baseurl=https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/ -enabled=1 -gpgcheck=1 -gpgkey=https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux - -[almalinux-appstream] -name=AlmaLinux-8-AppStream -baseurl=https://repo.almalinux.org/almalinux/8/AppStream/x86_64/os/ -enabled=1 -gpgcheck=1 -gpgkey=https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux \ No newline at end of file diff --git a/common/jenkins-agents/nodejs18/docker/yum.repos.d/google-chrome.repo b/common/jenkins-agents/nodejs18/docker/yum.repos.d/google-chrome.repo deleted file mode 100644 index 96e7eece3..000000000 --- a/common/jenkins-agents/nodejs18/docker/yum.repos.d/google-chrome.repo +++ /dev/null @@ -1,6 +0,0 @@ -[google-chrome] -name=google-chrome -baseurl=https://dl.google.com/linux/chrome/rpm/stable/$basearch -enabled=0 -gpgcheck=1 -gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub diff --git a/common/jenkins-agents/nodejs18/docker/yum.repos.d/microsoft-edge.repo b/common/jenkins-agents/nodejs18/docker/yum.repos.d/microsoft-edge.repo deleted file mode 100644 index e40052292..000000000 --- a/common/jenkins-agents/nodejs18/docker/yum.repos.d/microsoft-edge.repo +++ /dev/null @@ -1,6 +0,0 @@ -[edge] -name=Microsoft Edge Browser -baseurl=https://packages.microsoft.com/yumrepos/edge -enabled=0 -gpgcheck=1 -gpgkey=https://packages.microsoft.com/keys/microsoft.asc \ No newline at end of file diff --git a/common/jenkins-agents/nodejs18/ocp-config/Tailorfile b/common/jenkins-agents/nodejs18/ocp-config/Tailorfile deleted file mode 100644 index 346cc56ee..000000000 --- a/common/jenkins-agents/nodejs18/ocp-config/Tailorfile +++ /dev/null @@ -1,5 +0,0 @@ -namespace ods -selector app=jenkins-agent-nodejs18 -param-file ../../../../../ods-configuration/ods-core.env -ignore-unknown-parameters true -bc,is diff --git a/common/jenkins-agents/nodejs18/ocp-config/bc.yml b/common/jenkins-agents/nodejs18/ocp-config/bc.yml deleted file mode 100644 index 9408c1f16..000000000 --- a/common/jenkins-agents/nodejs18/ocp-config/bc.yml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: template.openshift.io/v1 -kind: Template -metadata: - name: jenkins-agent-nodejs18 -parameters: -- name: ODS_BITBUCKET_PROJECT - description: Bitbucket project name. - value: opendevstack -- name: NEXUS_URL - required: true -- name: NEXUS_AUTH - required: true -- name: REPO_BASE - required: true -- name: ODS_IMAGE_TAG - required: true - value: latest -- name: ODS_GIT_REF - required: true -- name: JENKINS_AGENT_DOCKERFILE_PATH - value: Dockerfile.ubi8 - description: Dockerfile variant to use -objects: -- apiVersion: build.openshift.io/v1 - kind: BuildConfig - metadata: - name: jenkins-agent-nodejs18 - labels: - app: jenkins-agent-nodejs18 - spec: - failedBuildsHistoryLimit: 5 - nodeSelector: null - output: - to: - kind: ImageStreamTag - name: jenkins-agent-nodejs18:${ODS_IMAGE_TAG} - postCommit: {} - resources: - limits: - cpu: "1" - memory: "3Gi" - ephemeral-storage: "20Gi" - requests: - cpu: "200m" - memory: "2Gi" - ephemeral-storage: "15Gi" - runPolicy: Serial - source: - contextDir: common/jenkins-agents/nodejs18/docker - git: - ref: ${ODS_GIT_REF} - uri: ${REPO_BASE}/${ODS_BITBUCKET_PROJECT}/ods-quickstarters.git - sourceSecret: - name: cd-user-token - type: Git - strategy: - dockerStrategy: - buildArgs: - - name: nexusUrl - value: ${NEXUS_URL} - - name: nexusAuth - value: ${NEXUS_AUTH} - dockerfilePath: ${JENKINS_AGENT_DOCKERFILE_PATH} - from: - kind: ImageStreamTag - name: jenkins-agent-base:${ODS_IMAGE_TAG} - type: Docker - successfulBuildsHistoryLimit: 5 diff --git a/common/jenkins-agents/nodejs18/ocp-config/is.yml b/common/jenkins-agents/nodejs18/ocp-config/is.yml deleted file mode 100644 index b5d7241c9..000000000 --- a/common/jenkins-agents/nodejs18/ocp-config/is.yml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: template.openshift.io/v1 -kind: Template -metadata: - name: jenkins-agent-nodejs18 -objects: -- apiVersion: image.openshift.io/v1 - kind: ImageStream - metadata: - name: jenkins-agent-nodejs18 - labels: - app: jenkins-agent-nodejs18 - spec: - lookupPolicy: - local: false diff --git a/docs/modules/jenkins-agents/pages/nodejs18.adoc b/docs/modules/jenkins-agents/pages/nodejs18.adoc index 2441db661..4406d0172 100644 --- a/docs/modules/jenkins-agents/pages/nodejs18.adoc +++ b/docs/modules/jenkins-agents/pages/nodejs18.adoc @@ -1,17 +1,7 @@ -= Node.js 18 - Jenkins agent += Node.js 18 - Jenkins agent (removed) -== Introduction -This agent is used to build Node.js-based projects, through `npm` or `yarn`. +This agent has been removed because Node.js 18 reached its end-of-life on 2025-04-30 and is no longer maintained. -The image is built in the global `ods` project and is named `jenkins-agent-nodejs18`. -It can be referenced in a `Jenkinsfile` with `ods/jenkins-agent-nodejs18`. +If you previously used `jenkins-agent-nodejs18`, please migrate your Jenkinsfiles and pipeline configurations to a supported Node.js agent (for example `jenkins-agent-nodejs20` or `jenkins-agent-nodejs22`). -IMPORTANT: Node.js version 18 reaches end-of-life in 2025-04-30. Support for this version will be removed in releases after this date. Please consider switching to newer versions of this agent as soon as they are available. - -== Features -1. Nexus configuration -2. HTTP proxy awareness -3. Yarn & Cypress dependencies pre-installed - -== Known limitations -n/a +See the Jenkins agents index for available, supported images. diff --git a/docs/modules/quickstarters/nav.adoc b/docs/modules/quickstarters/nav.adoc index 28de2a741..59ef83306 100644 --- a/docs/modules/quickstarters/nav.adoc +++ b/docs/modules/quickstarters/nav.adoc @@ -23,7 +23,6 @@ *** xref:jenkins-agents:golang.adoc[Go] *** xref:jenkins-agents:inf-terraform.adoc[terraform] *** xref:jenkins-agents:jdk.adoc[jdk] -*** xref:jenkins-agents:nodejs18.adoc[Node.js 18] *** xref:jenkins-agents:nodejs20.adoc[Node.js 20] *** xref:jenkins-agents:nodejs22.adoc[Node.js 22] *** xref:jenkins-agents:python.adoc[Python]