Skip to content

Commit

Permalink
👻 force npm9 during image build
Browse files Browse the repository at this point in the history
Ever since the build container we use [1] updated to use
`npm@10`, the image builder github action has encountered
a number of problems. The first was solved with konveyor#1746.
The second more random problem has been with network
connections erroring out when installing dependencies.

To work around the network error, force the build to use `npm@9`.

Alternative solutions:
  - Add the force to `npm@9`` directly in the Dockerfile for use
    in all circumstances

  - Use the `:1-88` version of the build container instead of
    `:latest`

  - Find a way to use something like verdaccio to proxy/mirror
    the npmjs repo during the build so npmjs fetches can be
    pooled across the parallel image builds

[1] registry.access.redhat.com/ubi9/nodejs-18:latest

Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 committed Mar 19, 2024
1 parent 984fbca commit 01610f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
containerfile: "./Dockerfile"
architectures: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
extra-args: "--ulimit nofile=4096:4096"
pre_build_cmd: |
sed -i '/RUN npm clean-install/i RUN npm install -g npm@9' Dockerfile
secrets:
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }}

0 comments on commit 01610f8

Please sign in to comment.