Skip to content

Commit 000b0d4

Browse files
Merge pull request #761 from snyk/feat/node-16
feat: update Node.js version to latest
2 parents 5ab3e55 + 4a8dad8 commit 000b0d4

File tree

8 files changed

+14171
-53
lines changed

8 files changed

+14171
-53
lines changed

.circleci/config.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ commands:
1919
sudo apt update
2020
sudo apt install python3-requests
2121
when: always
22-
setup_node12:
23-
description: Setup Node 12
22+
setup_node16:
23+
description: Setup Node 16
2424
steps:
2525
- run:
2626
command: |
2727
export NVM_DIR="/opt/circleci/.nvm"
2828
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
29-
nvm install v12
29+
nvm install v16
3030
npm install
3131
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
3232
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
33-
echo 'nvm use 12' >> $BASH_ENV
33+
echo 'nvm use 16' >> $BASH_ENV
3434
jobs:
3535
build_and_upload_operator:
3636
docker:
@@ -104,7 +104,7 @@ jobs:
104104
image: ubuntu-2004:202010-01
105105
steps:
106106
- checkout
107-
- setup_node12
107+
- setup_node16
108108
- install_python_requests
109109
- run:
110110
command: |
@@ -121,7 +121,7 @@ jobs:
121121
- auth:
122122
password: $DOCKERHUB_PASSWORD
123123
username: $DOCKERHUB_USER
124-
image: circleci/node:12
124+
image: cimg/node:16.1
125125
steps:
126126
- checkout
127127
- install_python_requests
@@ -145,7 +145,7 @@ jobs:
145145
- auth:
146146
password: $DOCKERHUB_PASSWORD
147147
username: $DOCKERHUB_USER
148-
image: circleci/node:12
148+
image: cimg/node:16.1
149149
steps:
150150
- checkout
151151
- install_python_requests
@@ -178,7 +178,7 @@ jobs:
178178
command: |
179179
export NVM_DIR="/opt/circleci/.nvm"
180180
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
181-
nvm install v12
181+
nvm install v16
182182
npm install
183183
export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
184184
.circleci/do-exclusively --branch staging --job ${CIRCLE_JOB} npm run test:integration:eks:yaml
@@ -198,7 +198,7 @@ jobs:
198198
image: ubuntu-2004:202010-01
199199
steps:
200200
- checkout
201-
- setup_node12
201+
- setup_node16
202202
- install_python_requests
203203
- run:
204204
command: mkdir -p /tmp/logs/test/integration/kind
@@ -223,7 +223,7 @@ jobs:
223223
image: ubuntu-2004:202010-01
224224
steps:
225225
- checkout
226-
- setup_node12
226+
- setup_node16
227227
- install_python_requests
228228
- run:
229229
command: mkdir -p /tmp/logs/test/integration/kind-helm
@@ -248,7 +248,7 @@ jobs:
248248
image: ubuntu-2004:202010-01
249249
steps:
250250
- checkout
251-
- setup_node12
251+
- setup_node16
252252
- install_python_requests
253253
- run:
254254
command: mkdir -p /tmp/logs/test/integration/kind-olm-operator
@@ -274,7 +274,7 @@ jobs:
274274
image: ubuntu-2004:202010-01
275275
steps:
276276
- checkout
277-
- setup_node12
277+
- setup_node16
278278
- install_python_requests
279279
- run:
280280
command: mkdir -p /tmp/logs/test/integration/proxy
@@ -299,7 +299,7 @@ jobs:
299299
image: ubuntu-2004:202010-01
300300
steps:
301301
- checkout
302-
- setup_node12
302+
- setup_node16
303303
- install_python_requests
304304
- run:
305305
command: |
@@ -318,7 +318,7 @@ jobs:
318318
image: ubuntu-2004:202010-01
319319
steps:
320320
- checkout
321-
- setup_node12
321+
- setup_node16
322322
- install_python_requests
323323
- run:
324324
command: mkdir -p /tmp/logs/test/integration/openshift3
@@ -342,7 +342,7 @@ jobs:
342342
image: ubuntu-2004:202010-01
343343
steps:
344344
- checkout
345-
- setup_node12
345+
- setup_node16
346346
- install_python_requests
347347
- run:
348348
command: mkdir -p /tmp/logs/test/integration/openshift4
@@ -591,7 +591,7 @@ jobs:
591591
- auth:
592592
password: $DOCKERHUB_PASSWORD
593593
username: $DOCKERHUB_USER
594-
image: circleci/node:12
594+
image: cimg/node:16.1
595595
steps:
596596
- checkout
597597
- setup_remote_docker
@@ -766,7 +766,7 @@ jobs:
766766
image: ubuntu-2004:202010-01
767767
steps:
768768
- checkout
769-
- setup_node12
769+
- setup_node16
770770
- install_python_requests
771771
- run:
772772
command: |
@@ -795,7 +795,7 @@ jobs:
795795
- auth:
796796
password: $DOCKERHUB_PASSWORD
797797
username: $DOCKERHUB_USER
798-
image: circleci/node:12
798+
image: cimg/node:16.1
799799
steps:
800800
- checkout
801801
- setup_remote_docker
@@ -824,7 +824,7 @@ jobs:
824824
image: ubuntu-2004:202010-01
825825
steps:
826826
- checkout
827-
- setup_node12
827+
- setup_node16
828828
- install_python_requests
829829
- run:
830830
command: |
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
description: Setup Node 12
1+
description: Setup Node 16
22
steps:
33
- run:
44
command: |
55
export NVM_DIR="/opt/circleci/.nvm"
66
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
7-
nvm install v12
7+
nvm install v16
88
npm install
99
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
1010
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
11-
echo 'nvm use 12' >> $BASH_ENV
11+
echo 'nvm use 16' >> $BASH_ENV

.circleci/config/jobs/@jobs.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ lint:
7272
image: ubuntu-2004:202010-01
7373
steps:
7474
- checkout
75-
- setup_node12
75+
- setup_node16
7676
- install_python_requests
7777
- run:
7878
command: |
@@ -91,7 +91,7 @@ code_formatter:
9191
image: ubuntu-2004:202010-01
9292
steps:
9393
- checkout
94-
- setup_node12
94+
- setup_node16
9595
- install_python_requests
9696
- run:
9797
command: |
@@ -111,7 +111,7 @@ unit_tests:
111111
working_directory: ~/kubernetes-monitor
112112
steps:
113113
- checkout
114-
- setup_node12
114+
- setup_node16
115115
- install_python_requests
116116
- run:
117117
name: Unit tests
@@ -133,7 +133,7 @@ system_tests:
133133
working_directory: ~/kubernetes-monitor
134134
steps:
135135
- checkout
136-
- setup_node12
136+
- setup_node16
137137
- install_python_requests
138138
- run:
139139
name: Install Skopeo
@@ -165,7 +165,7 @@ integration_tests:
165165
working_directory: ~/kubernetes-monitor
166166
steps:
167167
- checkout
168-
- setup_node12
168+
- setup_node16
169169
- install_python_requests
170170
- run:
171171
name: create temp dir for logs
@@ -191,7 +191,7 @@ integration_tests_helm:
191191
working_directory: ~/kubernetes-monitor
192192
steps:
193193
- checkout
194-
- setup_node12
194+
- setup_node16
195195
- install_python_requests
196196
- run:
197197
name: Create temporary directory for logs
@@ -217,7 +217,7 @@ integration_tests_proxy:
217217
working_directory: ~/kubernetes-monitor
218218
steps:
219219
- checkout
220-
- setup_node12
220+
- setup_node16
221221
- install_python_requests
222222
- run:
223223
name: Create temporary directory for logs
@@ -249,11 +249,11 @@ eks_integration_tests:
249249
command: mkdir -p /tmp/logs/test/integration/eks
250250
- run:
251251
name: Integration tests EKS
252-
# WARNING! Do not use the step "setup_node12" here - the call to "nvm use 12" breaks the tests!
252+
# WARNING! Do not use the step "setup_node16" here - the call to "nvm use 16" breaks the tests!
253253
command: |
254254
export NVM_DIR="/opt/circleci/.nvm"
255255
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
256-
nvm install v12
256+
nvm install v16
257257
npm install
258258
export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
259259
.circleci/do-exclusively --branch staging --job ${CIRCLE_JOB} npm run test:integration:eks:yaml
@@ -273,7 +273,7 @@ openshift3_integration_tests:
273273
working_directory: ~/kubernetes-monitor
274274
steps:
275275
- checkout
276-
- setup_node12
276+
- setup_node16
277277
- install_python_requests
278278
- run:
279279
name: Create temporary directory for logs
@@ -298,7 +298,7 @@ openshift4_integration_tests:
298298
working_directory: ~/kubernetes-monitor
299299
steps:
300300
- checkout
301-
- setup_node12
301+
- setup_node16
302302
- install_python_requests
303303
- run:
304304
name: create temp dir for logs
@@ -320,7 +320,7 @@ openshift4_integration_tests:
320320
######################## MERGE TO STAGING ########################
321321
tag_and_push:
322322
docker:
323-
- image: circleci/node:12
323+
- image: cimg/node:16.1
324324
auth:
325325
username: $DOCKERHUB_USER
326326
password: $DOCKERHUB_PASSWORD
@@ -348,7 +348,7 @@ tag_and_push:
348348

349349
deploy_dev:
350350
docker:
351-
- image: circleci/node:12
351+
- image: cimg/node:16.1
352352
auth:
353353
username: $DOCKERHUB_USER
354354
password: $DOCKERHUB_PASSWORD
@@ -374,7 +374,7 @@ deploy_dev:
374374
######################## MERGE TO MASTER ########################
375375
publish:
376376
docker:
377-
- image: circleci/node:12
377+
- image: cimg/node:16.1
378378
auth:
379379
username: $DOCKERHUB_USER
380380
password: $DOCKERHUB_PASSWORD
@@ -420,7 +420,7 @@ publish:
420420

421421
deploy_prod:
422422
docker:
423-
- image: circleci/node:12
423+
- image: cimg/node:16.1
424424
auth:
425425
username: $DOCKERHUB_USER
426426
password: $DOCKERHUB_PASSWORD

.circleci/config/jobs/integration_tests_operator_on_k8s.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ machine:
44
enabled: true
55
steps:
66
- checkout
7-
- setup_node12
7+
- setup_node16
88
- install_python_requests
99
- run:
1010
command: mkdir -p /tmp/logs/test/integration/kind-olm-operator

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12
1+
16

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ COPY LICENSE /licenses/LICENSE
2525

2626
ENV NODE_ENV production
2727

28-
RUN curl -sL https://rpm.nodesource.com/setup_12.x | bash -
28+
RUN curl -sL https://rpm.nodesource.com/setup_16.x | bash -
2929
RUN yum install -y nodejs
3030

3131
RUN curl -L -o /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
@@ -54,7 +54,7 @@ ADD --chown=snyk:snyk package.json package-lock.json ./
5454
# TODO: Remove this line once OpenShift 3 comes out of support.
5555
RUN mkdir -p .config
5656

57-
RUN npm install
57+
RUN npm ci
5858

5959
# add the rest of the app files
6060
ADD --chown=snyk:snyk . .
@@ -66,7 +66,7 @@ RUN chmod 755 /srv/app && chmod 755 /srv/app/bin && chmod +x /srv/app/bin/start
6666
RUN chown -R snyk:snyk .
6767
USER 10001:10001
6868

69-
# Complete any `prepare` tasks (e.g. typescript), as this step ran automatically prior to app being copied
70-
RUN npm run prepare
69+
# Build typescript
70+
RUN npm run build
7171

7272
ENTRYPOINT ["/usr/bin/dumb-init", "--", "bin/start"]

0 commit comments

Comments
 (0)