Skip to content

Commit bd5cae2

Browse files
Merge pull request #931 from anwesha-palit-redhat/release-v1.20.x
SRVKP-10058 SRVKP-9700 SRVKP-10602: CVE fixes for qs + node-forge + lodash along with yarn 4 migration changes
2 parents a603603 + ec9aaa6 commit bd5cae2

18 files changed

Lines changed: 39400 additions & 13924 deletions

.ci-operator.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
2-
name: nodejs-18
3-
namespace: openshift
4-
tag: latest
2+
name: console-plugin-test-cypress
3+
namespace: ci
4+
tag: node20-yarn4

.github/workflows/publish_container_image.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,41 @@
1-
name: publish container images
1+
name: Build and Publish Container
2+
23
on:
34
push:
45
branches:
56
- main
67
- release-v* # example: release-v1.14
8+
- main_ocp_4.22
79
tags: ['v*']
10+
pull_request:
11+
branches:
12+
- main
13+
- main_ocp_4.22
14+
workflow_dispatch:
815

916
jobs:
1017
setup:
1118
name: build container
1219
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
packages: write
1323

1424
steps:
1525
- name: Checkout source code
1626
uses: actions/checkout@v4
1727

1828
- uses: actions/setup-node@v4
1929
with:
20-
node-version: '18'
30+
node-version: '20'
31+
32+
- name: Enable Corepack
33+
run: corepack enable
2134

2235
- uses: docker/setup-buildx-action@v3
2336

2437
- name: Login in to ghcr.io registry
38+
if: github.event_name != 'pull_request'
2539
uses: docker/login-action@v3
2640
with:
2741
registry: ghcr.io
@@ -41,5 +55,5 @@ jobs:
4155
run: ./scripts/build_container.sh
4256
env:
4357
SUPPORT_MULTI_ARCH: "true"
44-
CONSOLE_PLUGIN_IMAGE_REPO: 'ghcr.io/${{ github.repository }}'
45-
CONSOLE_PLUGIN_IMAGE_TAG: '${{ github.ref_name }}'
58+
CONSOLE_PLUGIN_IMAGE_REPO: ${{ github.event_name == 'pull_request' && format('ttl.sh/{0}/console-plugin-pr-{1}', github.repository, github.event.pull_request.number) || format('ghcr.io/{0}', github.repository) }}
59+
CONSOLE_PLUGIN_IMAGE_TAG: ${{ github.event_name == 'pull_request' && '24h' || github.ref_name }}

.konflux/dockerfiles/console-plugin.Dockerfile

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,20 @@ FROM $BUILDER AS builder-ui
55

66
WORKDIR /go/src/github.com/openshift-pipelines/console-plugin
77
COPY . .
8-
RUN npm install -g yarn-1.22.22.tgz
9-
RUN set -e; for f in patches/*.patch; do echo ${f}; [[ -f ${f} ]] || continue; git apply ${f}; done
10-
8+
#Install Yarn
9+
RUN if [[ -d /cachi2/output/deps/npm/ ]]; then \
10+
npm install -g /cachi2/output/deps/npm/yarnpkg-cli-dist-4.6.0.tgz; \
11+
YARN_ENABLE_NETWORK=0; \
12+
else \
13+
npm install -g corepack; \
14+
corepack enable ;\
15+
corepack prepare yarn@4.6.0 --activate; \
16+
fi
17+
18+
19+
# Install dependencies & build
1120
USER root
12-
13-
# Enable FIPS mode during build process
14-
RUN fips-mode-setup --enable && \
15-
update-crypto-policies --set FIPS && \
16-
echo "Build stage - Verifying FIPS kernel parameter:" && \
17-
cat /proc/sys/crypto/fips_enabled && \
18-
echo "Build stage - Verifying OpenSSL FIPS status:" && \
19-
openssl version -a | grep -i fips && \
20-
(openssl md5 /dev/null || echo "MD5 test passed (expected failure in FIPS mode)")
21-
22-
RUN yarn install --offline --frozen-lockfile --ignore-scripts && \
21+
RUN CYPRESS_INSTALL_BINARY=0 yarn install --immutable && \
2322
yarn build
2423

2524
FROM $RUNTIME

.konflux/npm/package-lock.json

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.konflux/npm/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "yarn4-nodejs22-ubil9-minimal",
3+
"version": "1.0.0",
4+
"description": "Konflux image containing rebuilds for tooling to assist in building with yarn",
5+
"dependencies": {
6+
"@yarnpkg/cli-dist": "4.6.0"}
7+
}

0 commit comments

Comments
 (0)