Skip to content

Commit

Permalink
Prepare 4.5.0 release (#1020)
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisVQ authored Jun 7, 2024
1 parent e50c348 commit 0981597
Show file tree
Hide file tree
Showing 33 changed files with 342 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog-enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.6
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: 'CHANGELOG.md'
Expand Down
36 changes: 26 additions & 10 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/golang/docker
Expand All @@ -23,7 +23,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/jdk/docker
Expand All @@ -40,7 +40,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/nodejs16/docker
Expand All @@ -56,7 +56,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/nodejs18/docker
Expand All @@ -72,7 +72,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/nodejs20/docker
Expand All @@ -82,13 +82,29 @@ jobs:
--build-arg nexusAuth=developer:s3cr3t \
.
jenkins-agent-nodejs22-ubi8:
name: Jenkins agent NodeJS 22 (UBI8)
runs-on: ubuntu-22.04
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/nodejs22/docker
run: |
docker build --tag agent-nodejs22-test-ubi8 --file Dockerfile.ubi8 \
--build-arg nexusUrl=https://nexus.example.com \
--build-arg nexusAuth=developer:s3cr3t \
.
jenkins-agent-python-ubi8:
name: Jenkins agent Python (UBI8)
runs-on: ubuntu-22.04
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/python/docker
Expand All @@ -101,7 +117,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/rust/docker
Expand All @@ -117,7 +133,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/terraform/docker
Expand All @@ -130,7 +146,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/terraform-2306/docker
Expand All @@ -143,7 +159,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.6
-
name: Build docker image
working-directory: common/jenkins-agents/scala/docker
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@

## Unreleased

### Added

### Changed

### Fixed

## [4.5.0] - 2024-06-06

### Added
- Added nodejs22 agent and switch install of node to nodesource ([#1011](https://github.com/opendevstack/ods-quickstarters/pull/1011))

### Changed
- Update Ionic Quickstarter ([#1009](https://github.com/opendevstack/ods-quickstarters/pull/1009))
- Update Angular Quickstarter ([#1019](https://github.com/opendevstack/ods-quickstarters/pull/1019))

### Fixed
- Workaround for centos 8 stream repository deprecation ([#1021](https://github.com/opendevstack/ods-quickstarters/issues/1021))

## [4.4.0] - 2024-04-22

Expand Down
4 changes: 2 additions & 2 deletions common/jenkins-agents/nodejs16/docker/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ COPY contrib/bin/configure-agent /usr/local/bin/configure-agent
# Generate machine ID
RUN dbus-uuidgen > /etc/machine-id

# Install NodeJS (https://rpm.nodesource.com/setup_${NODEJS_VERSION}.x does NOT work)
# Install NodeJS
RUN INSTALL_PKGS="nodejs nodejs-nodemon make gcc-c++" && \
yum module enable -y nodejs:${NODEJS_VERSION} && \
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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[centos-baseos]
name=CentOS-8-BaseOS
baseurl=http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/
baseurl=https://vault.centos.org/centos/8-stream/BaseOS/x86_64/os/
enabled=1
gpgcheck=1
gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official

[centos-appstream]
name=CentOS-8-AppStream
baseurl=http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/
baseurl=https://vault.centos.org/centos/8-stream/AppStream/x86_64/os/
enabled=1
gpgcheck=1
gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
4 changes: 2 additions & 2 deletions common/jenkins-agents/nodejs18/docker/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ COPY contrib/bin/configure-agent /usr/local/bin/configure-agent
# Generate machine ID
RUN dbus-uuidgen > /etc/machine-id

# Install NodeJS (https://rpm.nodesource.com/setup_${NODEJS_VERSION}.x does NOT work)
# Install NodeJS
RUN INSTALL_PKGS="nodejs nodejs-nodemon make gcc-c++" && \
yum module enable -y nodejs:${NODEJS_VERSION} && \
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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[centos-baseos]
name=CentOS-8-BaseOS
baseurl=http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/
baseurl=https://vault.centos.org/centos/8-stream/BaseOS/x86_64/os/
enabled=1
gpgcheck=1
gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official

[centos-appstream]
name=CentOS-8-AppStream
baseurl=http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/
baseurl=https://vault.centos.org/centos/8-stream/AppStream/x86_64/os/
enabled=1
gpgcheck=1
gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
4 changes: 2 additions & 2 deletions common/jenkins-agents/nodejs20/docker/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ COPY contrib/bin/configure-agent /usr/local/bin/configure-agent
# Generate machine ID
RUN dbus-uuidgen > /etc/machine-id

# Install NodeJS (https://rpm.nodesource.com/setup_${NODEJS_VERSION}.x does NOT work)
# Install NodeJS
RUN INSTALL_PKGS="nodejs nodejs-nodemon make gcc-c++" && \
yum module enable -y nodejs:${NODEJS_VERSION} && \
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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[centos-baseos]
name=CentOS-8-BaseOS
baseurl=http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/
baseurl=https://vault.centos.org/centos/8-stream/BaseOS/x86_64/os/
enabled=1
gpgcheck=1
gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official

[centos-appstream]
name=CentOS-8-AppStream
baseurl=http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/
baseurl=https://vault.centos.org/centos/8-stream/AppStream/x86_64/os/
enabled=1
gpgcheck=1
gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
61 changes: 61 additions & 0 deletions common/jenkins-agents/nodejs22/docker/Dockerfile.ubi8
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM opendevstackorg/ods-jenkins-agent-base-ubi8:latest

# Labels consumed by Red Hat build service
LABEL com.redhat.component="jenkins-agent-nodejs-22-rhel7-container" \
name="openshift4/jenkins-agent-nodejs-22-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=22 \
YARN_VERSION=1.22.19 \
NPM_CONFIG_PREFIX=$HOME/.npm-global \
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/centos8.repo /etc/yum.repos.d/centos8.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 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 ca=null && \
npm config set strict-ssl=false && \
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
63 changes: 63 additions & 0 deletions common/jenkins-agents/nodejs22/docker/contrib/bin/configure-agent
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/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
3 changes: 3 additions & 0 deletions common/jenkins-agents/nodejs22/docker/contrib/bin/scl_enable
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This will make scl collection binaries work out of box.
unset BASH_ENV PROMPT_COMMAND ENV
source scl_source enable rh-nodejs22
13 changes: 13 additions & 0 deletions common/jenkins-agents/nodejs22/docker/yum.repos.d/centos8.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[centos-baseos]
name=CentOS-8-BaseOS
baseurl=https://vault.centos.org/centos/8-stream/BaseOS/x86_64/os/
enabled=1
gpgcheck=1
gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official

[centos-appstream]
name=CentOS-8-AppStream
baseurl=https://vault.centos.org/centos/8-stream/AppStream/x86_64/os/
enabled=1
gpgcheck=1
gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[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
5 changes: 5 additions & 0 deletions common/jenkins-agents/nodejs22/ocp-config/Tailorfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace ods
selector app=jenkins-agent-nodejs22
param-file ../../../../../ods-configuration/ods-core.env
ignore-unknown-parameters true
bc,is
Loading

0 comments on commit 0981597

Please sign in to comment.