Skip to content

Commit 03ee38c

Browse files
CI/CD - Update containers to work with new flow (#445)
1 parent 5735f94 commit 03ee38c

File tree

6 files changed

+119
-54
lines changed

6 files changed

+119
-54
lines changed

.github/workflows/publish-packages.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,24 @@ on:
66
jobs:
77
publish-npm:
88
runs-on: ubuntu-latest
9+
container:
10+
image: ubuntu:latest
11+
defaults:
12+
run:
13+
shell: bash
914

1015
env:
11-
GH_TOKEN: ${{ secrets.PAT_GITHUB }}
12-
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
1316
NPM_TOKEN: ${{ secrets.BROWSER_NPM_TOKEN }}
14-
NODE_AUTH_TOKEN: ${{ secrets.BROWSER_NPM_TOKEN }}
1517

1618
steps:
19+
- name: Setup Container
20+
run: apt update && apt install -y git
1721
- uses: actions/checkout@v3
22+
- uses: actions/setup-node@v3
1823
with:
19-
token: ${{ secrets.PAT_GITHUB }}
20-
21-
- name: login
24+
node-version: lts/*
25+
- name: authenticate
2226
run: |
23-
git config user.name "${{ github.actor }}"
24-
git config user.email "${{ github.actor }}@users.noreply.github.com"
25-
git remote set-url origin https://${{github.actor}}:${GH_TOKEN}@github.com/$GITHUB_REPOSITORY
2627
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
2728
2829
- name: install
@@ -31,6 +32,9 @@ jobs:
3132
- name: sync versions
3233
run: npm run sync:version
3334

35+
- name: build:npm
36+
run: npm run build:npm
37+
3438
- name: publish
3539
run: |
3640
npm publish

.github/workflows/publish-release.yml

Lines changed: 75 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ on:
88
jobs:
99
test:
1010
runs-on: ubuntu-latest
11-
container: node:14
11+
container:
12+
image: ubuntu:latest
13+
defaults:
14+
run:
15+
shell: bash
16+
1217
env:
1318
NEWRELIC_ENVIRONMENT: ci
1419
JIL_SAUCE_LABS_USERNAME: ${{ secrets.JIL_SAUCE_LABS_USERNAME }}
@@ -18,7 +23,12 @@ jobs:
1823
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
1924
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2025
steps:
26+
- name: Setup Container
27+
run: apt update && apt install -y git
2128
- uses: actions/checkout@v3
29+
- uses: actions/setup-node@v3
30+
with:
31+
node-version: lts/*
2232
- name: install
2333
run: npm ci
2434
- name: build:all
@@ -27,7 +37,11 @@ jobs:
2737
run: node ./tools/jil/bin/cli.js -f merged -b chrome@latest -s -t 85000 --concurrent=10
2838
publish-to-s3:
2939
runs-on: ubuntu-latest
30-
container: node:14
40+
container:
41+
image: ubuntu:latest
42+
defaults:
43+
run:
44+
shell: bash
3145
needs: [test]
3246
env:
3347
NEWRELIC_ENVIRONMENT: ci
@@ -38,7 +52,12 @@ jobs:
3852
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
3953
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4054
steps:
55+
- name: Setup Container
56+
run: apt update && apt install -y git
4157
- uses: actions/checkout@v3
58+
- uses: actions/setup-node@v3
59+
with:
60+
node-version: lts/*
4261
- name: install
4362
run: npm ci
4463
- name: sync versions
@@ -56,13 +75,22 @@ jobs:
5675
run: node tools/scripts/check-version.js -e yes -m
5776
publish-to-internal-prod:
5877
runs-on: ubuntu-latest
59-
container: node:14
78+
container:
79+
image: ubuntu:latest
80+
defaults:
81+
run:
82+
shell: bash
6083
needs: [publish-to-s3]
6184
env:
6285
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
6386
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
6487
steps:
88+
- name: Setup Container
89+
run: apt update && apt install -y git
6590
- uses: actions/checkout@v3
91+
- uses: actions/setup-node@v3
92+
with:
93+
node-version: lts/*
6694
- name: install
6795
run: npm ci
6896
- name: sync versions
@@ -108,7 +136,11 @@ jobs:
108136
--purge-internal
109137
publish-to-nrdb:
110138
runs-on: ubuntu-latest
111-
container: node:14
139+
container:
140+
image: ubuntu:latest
141+
defaults:
142+
run:
143+
shell: bash
112144
needs: [publish-to-s3]
113145
env:
114146
NEWRELIC_ENVIRONMENT: ci
@@ -119,7 +151,12 @@ jobs:
119151
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
120152
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
121153
steps:
154+
- name: Setup Container
155+
run: apt update && apt install -y git
122156
- uses: actions/checkout@v3
157+
- uses: actions/setup-node@v3
158+
with:
159+
node-version: lts/*
123160
- name: install
124161
run: npm ci
125162
- name: sync versions
@@ -139,13 +176,24 @@ jobs:
139176
node tools/scripts/check-nrdb.js -v ${{steps.build_versions.outputs.CDN_VERSION}}
140177
raise-release-notes-pr:
141178
runs-on: ubuntu-latest
142-
container: node:14
179+
container:
180+
image: ubuntu:latest
181+
defaults:
182+
run:
183+
shell: bash
143184
needs: [publish-to-nrdb]
144185
env:
145186
NEWRELIC_ENVIRONMENT: ci
146187
GITHUB_TOKEN: ${{ secrets.DOCS_SITE_FORK_TOKEN }}
147188
steps:
189+
- name: Setup Container
190+
run: apt update && apt install -y git
148191
- uses: actions/checkout@v3
192+
with:
193+
token: ${{ secrets.DOCS_SITE_FORK_TOKEN }}
194+
- uses: actions/setup-node@v3
195+
with:
196+
node-version: lts/*
149197
- name: install
150198
run: npm ci
151199
- name: sync versions
@@ -161,13 +209,22 @@ jobs:
161209
-t=${{steps.build_versions.outputs.CDN_VERSION}}}
162210
publish-current-to-s3:
163211
runs-on: ubuntu-latest
164-
container: node:14
212+
container:
213+
image: ubuntu:latest
214+
defaults:
215+
run:
216+
shell: bash
165217
needs: [publish-to-nrdb]
166218
env:
167219
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
168220
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
169221
steps:
222+
- name: Setup Container
223+
run: apt update && apt install -y git
170224
- uses: actions/checkout@v3
225+
- uses: actions/setup-node@v3
226+
with:
227+
node-version: lts/*
171228
- name: install
172229
run: npm ci
173230
- name: sync versions
@@ -185,26 +242,30 @@ jobs:
185242
-e yes
186243
publish-npm:
187244
runs-on: ubuntu-latest
245+
container:
246+
image: ubuntu:latest
247+
defaults:
248+
run:
249+
shell: bash
188250
needs: [publish-to-nrdb]
189251
env:
190-
GH_TOKEN: ${{ secrets.PAT_GITHUB }}
191-
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
192252
NPM_TOKEN: ${{ secrets.BROWSER_NPM_TOKEN }}
193-
NODE_AUTH_TOKEN: ${{ secrets.BROWSER_NPM_TOKEN }}
194253
steps:
254+
- name: Setup Container
255+
run: apt update && apt install -y git
195256
- uses: actions/checkout@v3
257+
- uses: actions/setup-node@v3
196258
with:
197-
token: ${{ secrets.PAT_GITHUB }}
198-
- name: login
259+
node-version: lts/*
260+
- name: authenticate
199261
run: |
200-
git config user.name "${{ github.actor }}"
201-
git config user.email "${{ github.actor }}@users.noreply.github.com"
202-
git remote set-url origin https://${{github.actor}}:${GH_TOKEN}@github.com/$GITHUB_REPOSITORY
203262
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
204263
- name: install
205264
run: npm ci
206265
- name: force versions to sync
207266
run: npm run sync:version
267+
- name: build:npm
268+
run: npm run build:npm
208269
- name: publish
209270
run: |
210271
npm publish

.github/workflows/raise-release-notes-pr.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ jobs:
1111
NEWRELIC_ENVIRONMENT: ci
1212
GITHUB_TOKEN: ${{ secrets.DOCS_SITE_FORK_TOKEN }}
1313
steps:
14+
- name: Setup Container
15+
run: apt update && apt install -y git
1416
- uses: actions/checkout@v3
17+
with:
18+
token: ${{ secrets.DOCS_SITE_FORK_TOKEN }}
19+
- uses: actions/setup-node@v3
20+
with:
21+
node-version: lts/*
1522
- name: install
1623
run: npm ci
1724
- name: get version

.github/workflows/smoke-test.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,32 @@ on:
66
# Runs every day at 3AM
77
- cron: '0 3 * * *'
88

9-
109
env:
1110
BUILD_NUMBER: event-${{ github.event.number }}-job-${{ github.run_number }}-attempt-${{ github.run_attempt }}
1211

1312
jobs:
1413
chrome:
15-
if: contains(fromJson('["schedule"]'), github.event_name) || contains(fromJson('["workflow_dispatch"]'), github.event_name)
1614
runs-on: ubuntu-latest
17-
container: node:14
18-
15+
container:
16+
image: ubuntu:latest
17+
defaults:
18+
run:
19+
shell: bash
20+
1921
env:
2022
NEWRELIC_ENVIRONMENT: ci
2123
JIL_SAUCE_LABS_USERNAME: ${{ secrets.JIL_SAUCE_LABS_USERNAME }}
2224
JIL_SAUCE_LABS_ACCESS_KEY: ${{ secrets.JIL_SAUCE_LABS_ACCESS_KEY }}
2325
NEW_RELIC_LICENSE_KEY: ${{ secrets.JIL_NODE_NEW_RELIC_LICENSE_KEY }}
2426

2527
steps:
28+
- name: Setup Container
29+
run: apt update && apt install -y git
2630
- uses: actions/checkout@v3
31+
- uses: actions/setup-node@v3
32+
with:
33+
node-version: lts/*
2734
- name: checkout and build
2835
uses: ./.github/actions/test-setup
29-
3036
- name: run tests
3137
run: node --max-old-space-size=8192 ./tools/jil/bin/cli.js -f merged -b chrome@latest -s -t 85000 --concurrent=10
32-
33-

.github/workflows/tests-polyfill.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ env:
1111
BUILD_NUMBER: polyfills-${{ github.event.number }}-job-${{ github.run_number }}-attempt-${{ github.run_attempt }}
1212

1313
jobs:
14-
ie-functional:
15-
timeout-minutes: 90
14+
ie:
1615
runs-on: ubuntu-latest
17-
container: node:14
16+
container:
17+
image: ubuntu:latest
18+
defaults:
19+
run:
20+
shell: bash
1821

1922
env:
2023
NEWRELIC_ENVIRONMENT: ci
@@ -23,27 +26,13 @@ jobs:
2326
NEW_RELIC_LICENSE_KEY: ${{ secrets.JIL_NODE_NEW_RELIC_LICENSE_KEY }}
2427

2528
steps:
29+
- name: Setup Container
30+
run: apt update && apt install -y git
2631
- uses: actions/checkout@v3
32+
- uses: actions/setup-node@v3
33+
with:
34+
node-version: lts/*
2735
- name: checkout and build
2836
uses: ./.github/actions/test-setup
29-
30-
- name: run tests
31-
run: node --max-old-space-size=8192 ./tools/jil/bin/cli.js -P -b ie@* -s -t 85000 --concurrent=5 --functional-only
32-
ie-unit:
33-
timeout-minutes: 90
34-
runs-on: ubuntu-latest
35-
container: node:14
36-
37-
env:
38-
NEWRELIC_ENVIRONMENT: ci
39-
JIL_SAUCE_LABS_USERNAME: ${{ secrets.JIL_SAUCE_LABS_USERNAME }}
40-
JIL_SAUCE_LABS_ACCESS_KEY: ${{ secrets.JIL_SAUCE_LABS_ACCESS_KEY }}
41-
NEW_RELIC_LICENSE_KEY: ${{ secrets.JIL_NODE_NEW_RELIC_LICENSE_KEY }}
42-
43-
steps:
44-
- uses: actions/checkout@v3
45-
- name: checkout and build
46-
uses: ./.github/actions/test-setup
47-
4837
- name: run tests
49-
run: node --max-old-space-size=8192 ./tools/jil/bin/cli.js -P -b ie@* -s -t 85000 --concurrent=5 --unit-only
38+
run: node --max-old-space-size=8192 ./tools/jil/bin/cli.js -P -b ie@11 -s -t 85000 --concurrent=10

tests/functional/npm/basic.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
const testDriver = require('../../../tools/jil/index')
77

8-
const matcher = testDriver.Matcher.withFeature('notSafariWithSeleniumBug')
8+
const matcher = testDriver.Matcher.withFeature('notSafariWithSeleniumBug').and(testDriver.Matcher.withFeature('notInternetExplorer'))
99

1010
const testBuilds = [
1111
'browser-agent',

0 commit comments

Comments
 (0)