From 1e9bfd516d9f831fc652a7ce4b933af6e5f3ef51 Mon Sep 17 00:00:00 2001 From: "Gerard Castillo Lasheras (BI X)" Date: Mon, 16 Sep 2024 08:22:08 +0200 Subject: [PATCH] #1059 fix for npm config auth on jenkins agents --- CHANGELOG.md | 1 + common/jenkins-agents/nodejs18/docker/Dockerfile.ubi8 | 2 +- common/jenkins-agents/nodejs20/docker/Dockerfile.ubi8 | 2 +- common/jenkins-agents/nodejs22/docker/Dockerfile.ubi8 | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55e9ffc67..7869a2432 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Added custom reporter to Cypress Quickstarter and update dependencies ([#1034](https://github.com/opendevstack/ods-quickstarters/pull/1034)) - Fix permissions in Golang agent for the golden tests ([#1052](https://github.com/opendevstack/ods-quickstarters/pull/1052)) - Fix ETL Python QS: AWS Test codepipeline Status Managment and update cryptography dependency([#1056](https://github.com/opendevstack/ods-quickstarters/pull/1052)) +- Fix for npm based jenkins agents to support private nexus repositories ([#1059](https://github.com/opendevstack/ods-quickstarters/issues/1059)) ### Added diff --git a/common/jenkins-agents/nodejs18/docker/Dockerfile.ubi8 b/common/jenkins-agents/nodejs18/docker/Dockerfile.ubi8 index 77192df3a..716111407 100644 --- a/common/jenkins-agents/nodejs18/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/nodejs18/docker/Dockerfile.ubi8 @@ -45,7 +45,7 @@ RUN yum repolist \ && 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 //${nexusUrl#*://}/repository/npmjs/:_auth=$(echo -n $nexusAuth | base64) && \ npm config set email=no-reply@opendevstack.org && \ npm config set ca=null && \ npm config set strict-ssl=false && \ diff --git a/common/jenkins-agents/nodejs20/docker/Dockerfile.ubi8 b/common/jenkins-agents/nodejs20/docker/Dockerfile.ubi8 index 4c038a150..316f069c5 100644 --- a/common/jenkins-agents/nodejs20/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/nodejs20/docker/Dockerfile.ubi8 @@ -45,7 +45,7 @@ RUN yum repolist \ && 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 //${nexusUrl#*://}/repository/npmjs/:_auth=$(echo -n $nexusAuth | base64) && \ npm config set email=no-reply@opendevstack.org && \ npm config set ca=null && \ npm config set strict-ssl=false && \ diff --git a/common/jenkins-agents/nodejs22/docker/Dockerfile.ubi8 b/common/jenkins-agents/nodejs22/docker/Dockerfile.ubi8 index 3abc9b477..77143ca43 100644 --- a/common/jenkins-agents/nodejs22/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/nodejs22/docker/Dockerfile.ubi8 @@ -45,7 +45,7 @@ RUN yum repolist \ && 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 //${nexusUrl#*://}/repository/npmjs/:_auth=$(echo -n $nexusAuth | base64) && \ npm config set email=no-reply@opendevstack.org && \ npm config set ca=null && \ npm config set strict-ssl=false && \