Skip to content

Commit

Permalink
chore: pin ci env to ubuntu 20.04 (#1043)
Browse files Browse the repository at this point in the history
https://coveord.atlassian.net/browse/CDX-1241

<!-- For Coveo Employees only. Fill this section.

CDX-1241

-->

## Proposed changes

For now 🧊 we'll figure out a fix later.
actions/runner-images#6399
  • Loading branch information
louis-bompart authored Nov 24, 2022
1 parent d4ec642 commit e41dba4
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 38 deletions.
6 changes: 3 additions & 3 deletions .github/actions/e2e-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
steps:
- name: Setup runner
shell: bash
if: ${{inputs.os == 'ubuntu-latest'}}
if: ${{inputs.os == 'ubuntu-20.04'}}
# Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Setup runner
Expand Down Expand Up @@ -51,7 +51,7 @@ runs:
shell: bash
- name: End-to-end Setup
shell: bash
if: ${{inputs.os == 'ubuntu-latest'}}
if: ${{inputs.os == 'ubuntu-20.04'}}
run: bash packages/cli-e2e/entrypoints/ci.sh
- name: End-to-end Setup
shell: powershell
Expand All @@ -66,7 +66,7 @@ runs:
npm_config_registry: ${{inputs.npmRegistry}}
- name: Tests
shell: bash
if: ${{inputs.os == 'ubuntu-latest'}}
if: ${{inputs.os == 'ubuntu-20.04'}}
env:
DISPLAY: ':1'
npm_config_registry: ${{inputs.npmRegistry}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- os: windows-latest
pack-command: ' win'
for: 'windows install kit'
- os: ubuntu-latest
- os: ubuntu-20.04
pack-command: ' deb'
for: 'linux install kit'

Expand All @@ -47,7 +47,7 @@ jobs:
run: ../../../node_modules/oclif/bin/run pack${{ matrix.pack-command }}
- name: Create packages
working-directory: ./packages/cli/core
if: ${{matrix.os == 'ubuntu-latest'}}
if: ${{matrix.os == 'ubuntu-20.04'}}
run: ../../../node_modules/oclif/bin/run pack tarballs
- name: Get commit hash of binaries
run: node ../../../scripts/get-commit-short-hash.mjs
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ env:
jobs:
lint:
name: Lint
runs-on: 'ubuntu-latest'
runs-on: 'ubuntu-20.04'
steps:
- name: Setup runner
if: ${{matrix.os == 'ubuntu-latest'}}
if: ${{matrix.os == 'ubuntu-20.04'}}
# Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Setup runner
Expand All @@ -46,10 +46,10 @@ jobs:
strategy:
fail-fast: true
matrix:
os: ['ubuntu-latest', 'windows-latest']
os: ['ubuntu-20.04', 'windows-latest']
steps:
- name: Setup runner
if: ${{matrix.os == 'ubuntu-latest'}}
if: ${{matrix.os == 'ubuntu-20.04'}}
# Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Setup runner
Expand All @@ -71,7 +71,7 @@ jobs:
e2e-setup-login:
timeout-minutes: 15
name: End-to-end login
runs-on: 'ubuntu-latest'
runs-on: 'ubuntu-20.04'
outputs:
cliConfigJson: ${{ steps.setup.outputs.cliConfigJson}}
env:
Expand All @@ -88,7 +88,7 @@ jobs:
e2e-setup-verdaccio:
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
os: ['ubuntu-20.04', 'windows-latest']
name: End-to-end publish packages
runs-on: ${{matrix.os}}
steps:
Expand All @@ -106,7 +106,7 @@ jobs:
cache: 'npm'
node-version-file: '.nvmrc'
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3
if: ${{matrix.os == 'ubuntu-latest'}}
if: ${{matrix.os == 'ubuntu-20.04'}}
with:
path: packages/cli-e2e/verdaccio
key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }}
Expand All @@ -132,7 +132,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest']
os: ['ubuntu-20.04', 'windows-latest']
spec:
[
'angular.specs.ts',
Expand All @@ -155,7 +155,7 @@ jobs:
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3
if: ${{matrix.os == 'ubuntu-latest'}}
if: ${{matrix.os == 'ubuntu-20.04'}}
with:
path: packages/cli-e2e/verdaccio
key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }}
Expand All @@ -178,7 +178,7 @@ jobs:
name: End-to-end teardown
if: ${{ always() }}
needs: [e2e, e2e-setup-login]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
# ID of the test run to identify resources to teardown.
TEST_RUN_ID: '${{ github.sha }}-${{ github.run_attempt }}g'
Expand All @@ -192,7 +192,7 @@ jobs:
name: End-to-end status reporter
if: ${{ always() }}
needs: e2e
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Check e2e matrix status
if: ${{ needs.e2e.result != 'success' }}
Expand All @@ -202,7 +202,7 @@ jobs:
name: Pre-release
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
needs: [e2e-report, lint, unit-tests]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: prerelease
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
permissions:
actions: read
contents: read
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/daily-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
jobs:
e2e-setup-login:
name: End-to-end login
runs-on: 'ubuntu-latest'
runs-on: 'ubuntu-20.04'
timeout-minutes: 30
outputs:
cliConfigJson: ${{ steps.setup.outputs.cliConfigJson}}
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest']
os: ['ubuntu-20.04', 'windows-latest']
node: [18]
spec:
[
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
name: End-to-end teardown
if: ${{ always() }}
needs: [e2e, e2e-setup-login]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
# ID of the test run to identify resources to teardown.
TEST_RUN_ID: '${{ github.sha }}-${{ github.run_attempt }}-dailyg'
Expand All @@ -115,7 +115,7 @@ jobs:
timeout-minutes: 30
if: ${{ always() }}
needs: e2e
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: Daily Tests
steps:
- name: Check e2e matrix status
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
delete-resources:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: Cleaning
env:
ORG_ID: ${{ secrets.ORG_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
Merge:
if: ${{ github.event_name == 'pull_request' || github.event.issue.pull_request }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-lock-root-fail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ on:

jobs:
lockfile-outside-of-root:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- run: exit 1
2 changes: 1 addition & 1 deletion .github/workflows/package-lock-root-success.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ on:

jobs:
lockfile-outside-of-root:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- run: exit 0
2 changes: 1 addition & 1 deletion .github/workflows/package-lock-version-fail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
lockfile-version:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3
- name: Check lockfileVersion of all package-lock.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-lock-version-succes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ on:

jobs:
lockfile-version:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- run: exit 0
2 changes: 1 addition & 1 deletion .github/workflows/pr-title-semantic-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [opened, edited, synchronize, reopened]
jobs:
Lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:

jobs:
run-script:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
GITHUB_CREDENTIALS: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
snyk:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
NODE_OPTIONS: --max-old-space-size=8192
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
release:
needs: snyk
environment: 'Release'
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
GITHUB_CREDENTIALS: ${{ secrets.CLI_RELEASE }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/renovate-config-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
renovate-config:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snyk-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- completed
jobs:
snyk:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-e2e/setup/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export function createUiProjectDirectory() {

export function setProcessEnv() {
process.env.TEST_RUN_ID =
process.env.TEST_RUN_ID ?? `id${randomBytes(16).toString('hex')}g`;
process.env.TEST_RUN_ID?.replaceAll(/\./g, '-') ??
`id${randomBytes(16).toString('hex')}g`;
process.env.PLATFORM_ENV = process.env.PLATFORM_ENV?.toLowerCase() || '';
process.env.PLATFORM_HOST = getPlatformHost(process.env.PLATFORM_ENV);
process.env.NX_DAEMON = 'false';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"sourceMap": true,
"forceConsistentCasingInFileNames": true,
"types": ["jest", "node"],
"lib": ["dom", "es2017"]
"lib": ["dom", "ESNext"]
},
"include": ["./**/*.ts"]
}
2 changes: 1 addition & 1 deletion scripts/cleaning/delete-api-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ config({path: join(homedir(), '.env')});
function wasCreatedByTheCli(testRunId = '') {
return (key) =>
(key.displayName?.startsWith(`cli-idwindows-latest-${testRunId}`) ||
key.displayName?.startsWith(`cli-idubuntu-latest-${testRunId}`) ||
key.displayName?.startsWith(`cli-idubuntu-20.04-${testRunId}`) ||
key.displayName?.startsWith(`cli-id${testRunId}`)) &&
key.description === 'Generated by the Coveo CLI';
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/cleaning/delete-orgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function wasCreatedByTheCli(testRunId = '') {
return (key) =>
testRunId
? key.displayName?.startsWith(`cli-e2e-idwindows-latest-${testRunId}`) ||
key.displayName?.startsWith(`cli-e2e-idubuntu-latest-${testRunId}`)
key.displayName?.startsWith(`cli-e2e-idubuntu-20.04-${testRunId}`)
: key.displayName?.match(/cli-e2e.*g/);
}

Expand Down

0 comments on commit e41dba4

Please sign in to comment.