Skip to content

Commit 6da1676

Browse files
authored
feat: import nodejs/release-keys GitHub pgp keyring (#1388)
* feat: import nodejs/release-keys GitHub pgp keyring * use github raw content url for keyring source
1 parent d09562a commit 6da1676

File tree

3 files changed

+10
-23
lines changed

3 files changed

+10
-23
lines changed

factory/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ NODE_VERSION="${FACTORY_DEFAULT_NODE_VERSION}"
1818

1919
# Update the FACTORY_VERSION to deploy cypress/factory if you make changes to
2020
# BASE_IMAGE, FACTORY_DEFAULT_NODE_VERSION, YARN_VERSION, factory.Dockerfile or installScripts
21-
FACTORY_VERSION='5.11.6'
21+
FACTORY_VERSION='5.12.0'
2222

2323
# Chrome versions: https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable
2424
# Linux/amd64 only

factory/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Change log
22

3+
## 5.12.0
4+
5+
- Import all PGP keys for Node.js from `pgp` keyring in https://github.com/nodejs/release-keys repo. Addressed in [#1388](https://github.com/cypress-io/cypress-docker-images/issues/1388).
6+
37
## 5.11.6
48

5-
- Failed installs of Cypress no longer get cached as a docker layer. Addressed in [#1390](https://github.com/cypress-io/cypress-docker-images/pull/1390)
9+
- Failed installs of Cypress no longer get cached as a docker layer. Addressed in [#1390](https://github.com/cypress-io/cypress-docker-images/pull/1390).
610

711
## 5.11.5
812

factory/installScripts/node/default.sh

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,15 @@ ARCH= && dpkgArch="$(dpkg --print-architecture)" \
2020
&& savedAptMark="$(apt-mark showmanual)" \
2121
&& apt-get update && apt-get install -y curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \
2222
&& rm -rf /var/lib/apt/lists/* \
23-
&& keyserverOptions=$( [[ -n $HTTP_PROXY ]] && echo "--keyserver-options http-proxy=$HTTP_PROXY" || echo "" ) \
24-
&& for key in \
25-
4ED778F539E3634C779C87C6D7062848A1AB005C \
26-
141F07595B7B3FFE74309A937405533BE57C7D57 \
27-
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
28-
DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \
29-
61FC681DFB92A079F1685E77973F295594EC4689 \
30-
CC68F5A3106FF448322E48ED27F5E38D5B0A215F \
31-
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
32-
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
33-
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
34-
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
35-
108F52B48DB57BB0CC439B2997B01419BD92F80A \
36-
A363A499291CBBC940DD62E41F10027AF002F8B0 \
37-
C0D6248439F1D5604AAFFB4021D900FFDB233756 \
38-
; do \
39-
{ gpg --batch --keyserver hkps://keys.openpgp.org $keyserverOptions --recv-keys "$key" && gpg --batch --fingerprint "$key" ; } ||
40-
{ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" && gpg --batch --fingerprint "$key" ; } ||
41-
{ echo failed to import Node.js release key "$key" ; } ; \
42-
done \
23+
&& curl -fsSLO https://github.com/nodejs/release-keys/raw/refs/heads/main/gpg/pubring.kbx \
24+
&& gpg --no-default-keyring --keyring ./pubring.kbx --export | gpg --import \
4325
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$1/node-v$1-linux-$ARCH.tar.xz" \
4426
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$1/SHASUMS256.txt.asc" \
4527
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
4628
&& grep " node-v$1-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
4729
&& tar -xJf "node-v$1-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
48-
&& rm "node-v$1-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
30+
&& rm "node-v$1-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt pubring.kbx \
31+
&& rm -rf ~/.gnupg \
4932
&& apt-mark auto '.*' > /dev/null \
5033
&& { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \
5134
&& find /usr/local -type f -executable -exec ldd '{}' ';' \

0 commit comments

Comments
 (0)