Skip to content

Commit

Permalink
[BACKPORT] 1.14.x manual backport of OSS->CE branch (#18556)
Browse files Browse the repository at this point in the history
  • Loading branch information
analogue authored Aug 23, 2023
1 parent fec647f commit 3c937f3
Show file tree
Hide file tree
Showing 208 changed files with 205 additions and 196 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/get_runner_classes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ case "$GITHUB_REPOSITORY" in
echo "compute-small=['self-hosted', 'linux', 'small']" >> "$GITHUB_OUTPUT"
echo "compute-medium=['self-hosted', 'linux', 'medium']" >> "$GITHUB_OUTPUT"
echo "compute-large=['self-hosted', 'linux', 'large']" >> "$GITHUB_OUTPUT"
# m5d.8xlarge is equivalent to our xl custom runner in OSS
# m5d.8xlarge is equivalent to our xl custom runner in CE
echo "compute-xl=['self-hosted', 'ondemand', 'linux', 'type=m5d.8xlarge']" >> "$GITHUB_OUTPUT"
;;
*)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

env:
PKG_NAME: consul
# TODO(spatel): CE refactor
METADATA: oss

jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Trigger OSS to Enterprise Merge
name: Trigger Community Edition to Enterprise Merge
on:
pull_request_target:
types:
Expand All @@ -8,8 +8,8 @@ on:
- 'release/*.*.x'

jobs:
trigger-oss-merge:
# run this only on merge events in OSS repo
trigger-ce-merge:
# run this only on merge events in CE repo
if: ${{ github.event.pull_request.merged && github.repository == 'hashicorp/consul' }}
runs-on: ubuntu-latest
steps:
Expand All @@ -19,6 +19,7 @@ jobs:
GIT_SHA: ${{ github.sha }}
GH_PAT: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
GIT_ACTOR: ${{ github.actor }}
# TODO(spatel): CE refactor
run: |
curl -H "Authorization: token $GH_PAT" \
-H 'Accept: application/json' \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
matrix:
partition: [1, 2, 3, 4]
env:
EMBER_TEST_REPORT: test-results/report-oss.xml # outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml # outputs test report for CI test summary
EMBER_TEST_PARALLEL: true # enables test parallelization with ember-exam
CONSUL_NSPACES_ENABLED: ${{ endsWith(github.repository, '-enterprise') && 1 || 0 }} # NOTE: this should be 1 in ENT.
JOBS: 2 # limit parallelism for broccoli-babel-transpiler
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}

# dev-build-arm64:
# # only run on enterprise because GHA does not have arm64 runners in OSS
# # only run on enterprise because GHA does not have arm64 runners in CE
# if: ${{ endsWith(github.repository, '-enterprise') }}
# needs:
# - setup
Expand All @@ -183,7 +183,7 @@ jobs:
# elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}

# go-test-arm64:
# # only run on enterprise because GHA does not have arm64 runners in OSS
# # only run on enterprise because GHA does not have arm64 runners in CE
# if: ${{ endsWith(github.repository, '-enterprise') }}
# needs:
# - setup
Expand All @@ -201,9 +201,9 @@ jobs:
# consul-license: ${{secrets.CONSUL_LICENSE}}
# datadog-api-key: "${{ !endsWith(github.repository, '-enterprise') && secrets.DATADOG_API_KEY || '' }}"

go-test-oss:
needs:
- setup
go-test-ce:
needs:
- setup
- dev-build
uses: ./.github/workflows/reusable-unit-split.yml
with:
Expand Down Expand Up @@ -387,7 +387,7 @@ jobs:
- lint-32bit
# - go-test-arm64
- go-test-enterprise
- go-test-oss
- go-test-ce
- go-test-race
- go-test-api-1-19
- go-test-api-1-20
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/nightly-test-1.11.x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
working-directory: ./ui/packages/consul-ui
run: make test-node

frontend-build-oss:
frontend-build-ce:
runs-on: ubuntu-latest
env:
JOBS: 2
Expand All @@ -61,27 +61,27 @@ jobs:
working-directory: ./ui
run: make deps

- name: Ember Build OSS
id: build-oss
- name: Ember Build CE
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci

- name: Upload OSS Frontend
- name: Upload CE Frontend
uses: actions/upload-artifact@v3
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
if-no-files-found: error

frontend-test-oss:
frontend-test-ce:
runs-on: ubuntu-latest
needs: [frontend-build-oss]
needs: [frontend-build-ce]
strategy:
matrix:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 0
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@v2
Expand All @@ -100,13 +100,13 @@ jobs:
working-directory: ./ui
run: make deps

- name: Download OSS Frontend
- name: Download CE Frontend
uses: actions/download-artifact@v3
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist

- name: Ember Test OSS
- name: Ember Test CE
id: cache
working-directory: ./ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
run: make deps

- name: Ember Build ENT
id: build-oss
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci

Expand All @@ -153,7 +153,7 @@ jobs:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 1
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:

slack-failure-notification:
runs-on: ubuntu-latest
needs: [frontend-test-oss, frontend-test-ent]
needs: [frontend-test-ce, frontend-test-ent]
if: ${{ failure() }}
steps:
- name: Slack Notification
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/nightly-test-1.12.x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
working-directory: ./ui/packages/consul-ui
run: make test-node

frontend-build-oss:
frontend-build-ce:
runs-on: ubuntu-latest
env:
JOBS: 2
Expand All @@ -61,27 +61,27 @@ jobs:
working-directory: ./ui
run: make deps

- name: Ember Build OSS
id: build-oss
- name: Ember Build CE
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci

- name: Upload OSS Frontend
- name: Upload CE Frontend
uses: actions/upload-artifact@v3
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
if-no-files-found: error

frontend-test-oss:
frontend-test-ce:
runs-on: ubuntu-latest
needs: [frontend-build-oss]
needs: [frontend-build-ce]
strategy:
matrix:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 0
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@v2
Expand All @@ -100,13 +100,13 @@ jobs:
working-directory: ./ui
run: make deps

- name: Download OSS Frontend
- name: Download CE Frontend
uses: actions/download-artifact@v3
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist

- name: Ember Test OSS
- name: Ember Test CE
id: cache
working-directory: ./ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
run: make deps

- name: Ember Build ENT
id: build-oss
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci

Expand All @@ -153,7 +153,7 @@ jobs:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 1
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:

slack-failure-notification:
runs-on: ubuntu-latest
needs: [frontend-test-oss, frontend-test-ent]
needs: [frontend-test-ce, frontend-test-ent]
if: ${{ failure() }}
steps:
- name: Slack Notification
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/nightly-test-1.13.x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
working-directory: ./ui/packages/consul-ui
run: make test-node

frontend-build-oss:
frontend-build-ce:
runs-on: ubuntu-latest
env:
JOBS: 2
Expand All @@ -61,27 +61,27 @@ jobs:
working-directory: ./ui
run: make deps

- name: Ember Build OSS
id: build-oss
- name: Ember Build CE
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci

- name: Upload OSS Frontend
- name: Upload CE Frontend
uses: actions/upload-artifact@v3
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
if-no-files-found: error

frontend-test-oss:
frontend-test-ce:
runs-on: ubuntu-latest
needs: [frontend-build-oss]
needs: [frontend-build-ce]
strategy:
matrix:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 0
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@v2
Expand All @@ -100,13 +100,13 @@ jobs:
working-directory: ./ui
run: make deps

- name: Download OSS Frontend
- name: Download CE Frontend
uses: actions/download-artifact@v3
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
name: frontend-ce-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist

- name: Ember Test OSS
- name: Ember Test CE
id: cache
working-directory: ./ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
run: make deps

- name: Ember Build ENT
id: build-oss
id: build-ce
working-directory: ./ui/packages/consul-ui
run: make build-ci

Expand All @@ -153,7 +153,7 @@ jobs:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 1
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CI test summary
EMBER_TEST_REPORT: test-results/report-ce.xml #outputs test report for CI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:

slack-failure-notification:
runs-on: ubuntu-latest
needs: [frontend-test-oss, frontend-test-ent]
needs: [frontend-test-ce, frontend-test-ent]
if: ${{ failure() }}
steps:
- name: Slack Notification
Expand Down
Loading

0 comments on commit 3c937f3

Please sign in to comment.