Skip to content

Commit

Permalink
backport of commit d5ff401 (#17818)
Browse files Browse the repository at this point in the history
This pull request was automerged via backport-assistant
  • Loading branch information
hc-github-team-nomad-core authored Jul 6, 2023
1 parent ac93c35 commit bc3e460
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 20 deletions.
34 changes: 34 additions & 0 deletions .github/actions/setup-js/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: setup-js
description: install node and yarn, and run yarn install
inputs:
node-version:
description: 'node version'
# https://github.com/ember-cli/ember-cli/blob/master/docs/node-support.md
# package.json has ember-cli at version ~3.28.5 currently
default: '16'
runs:
using: composite
steps:
- name: Install yarn
run: |-
# install yarn if not present
yarn --version && exit
# note: can't `npm install -g` on self-hosted runners
npm install yarn --no-package-lock --no-save
cd node_modules/.bin
./yarn --version
echo "$PWD" >> "$GITHUB_PATH"
working-directory: /tmp
shell: bash
# enforce node version (self-hosted default is not necessarily what we want)
# after yarn, so we can use yarn for cache.
- name: Setup node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: ${{ inputs.node-version }}
cache: yarn
cache-dependency-path: ui/yarn.lock
- name: Yarn install
run: yarn install --frozen-lockfile
working-directory: ui
shell: bash
3 changes: 2 additions & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ jobs:
# Enabling this option increased the number of backport failures.
BACKPORT_MERGE_COMMIT: false
GITHUB_TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}

handle-failure:
needs:
- backport
if: always() && needs.backport.result == 'failure'
runs-on: ubuntu-latest
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-latest' }}
steps:
- name: Send slack notification on failure
uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ jobs:

build-darwin:
needs: [get-go-version, get-product-version]
runs-on: macos-latest
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "macos"]') || 'macos-latest' }}
strategy:
matrix:
goos: [darwin]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

jobs:
checks:
runs-on: ubuntu-22.04
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-22.04' }}
timeout-minutes: 10
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:

jobs:
prepare-release:
runs-on: ubuntu-20.04
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-20.04' }}
outputs:
build-ref: ${{ steps.commit-change-push.outputs.build-ref }}
steps:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ env:
VAULT_VERSION: 1.12.2
NOMAD_SLOW_TEST: 0
NOMAD_TEST_LOG_LEVEL: OFF

jobs:
# this caches dependencies for subsequent jobs, including private deps in enterprise
mods:
runs-on: ubuntu-22.04
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-22.04' }}
timeout-minutes: 10
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ on:

jobs:
test-e2e:
runs-on: ubuntu-latest
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Setup go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
- uses: hashicorp/setup-golang@v1
- run: make deps
- run: make integration-test
- run: make e2e-test
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/test-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ jobs:
nonce: ${{ steps.nonce.outputs.nonce }}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: yarn install
run: yarn install --frozen-lockfile
- uses: ./.github/actions/setup-js
- name: lint:js
run: yarn run lint:js
- name: lint:hbs
Expand All @@ -59,7 +58,7 @@ jobs:
tests:
needs:
- pre-test
runs-on: ubuntu-latest
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-latest' }}
timeout-minutes: 30
continue-on-error: true
defaults:
Expand All @@ -71,26 +70,26 @@ jobs:
split: [4]
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: yarn install
run: yarn install --frozen-lockfile
- uses: ./.github/actions/setup-js
- uses: browser-actions/setup-chrome@c485fa3bab6be59dce18dbc18ef6ab7cbc8ff5f1 # v1.2.0
- name: ember exam
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_PARALLEL_NONCE: ${{ needs.pre-test.outputs.nonce }}
run: yarn exam:parallel --split=${{ matrix.split }} --partition=${{ matrix.partition }}

finalize:
runs-on: ubuntu-latest
needs:
- pre-test
- tests
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux"]') || 'ubuntu-latest' }}
timeout-minutes: 30
defaults:
run:
working-directory: ui
needs:
- pre-test
- tests
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: yarn install
run: yarn install --frozen-lockfile
- uses: ./.github/actions/setup-js
- name: finalize
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ env:
VAULT_VERSION: 1.4.1
jobs:
test-windows:
runs-on: "windows-2019-16core"
runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "windows", "type=c5.2xlarge"]') || 'windows-2019-16core' }}
env:
GOTESTSUM_PATH: c:\tmp\test-reports
steps:
Expand Down

0 comments on commit bc3e460

Please sign in to comment.