Skip to content

Commit

Permalink
[BACKPORT] 1.16.x manual backport of OSS->CE branch (hashicorp#18549)
Browse files Browse the repository at this point in the history
  • Loading branch information
analogue authored Aug 23, 2023
1 parent 9026012 commit 7c72bba
Show file tree
Hide file tree
Showing 224 changed files with 237 additions and 228 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 @@ -13,7 +13,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
2 changes: 1 addition & 1 deletion .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # [email protected]

# NOTE: conditional specific logic as we store secrets in Vault in ENT and use GHA secrets in OSS.
# NOTE: conditional specific logic as we store secrets in Vault in ENT and use GHA secrets in CE.
- name: Login to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # [email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

env:
PKG_NAME: consul
# TODO(spatel): CE refactor
METADATA: oss
GOPRIVATE: github.com/hashicorp # Required for enterprise deps

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

name: Trigger OSS to Enterprise Merge
name: Trigger Community Edition to Enterprise Merge
on:
pull_request_target:
types:
Expand All @@ -11,8 +11,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 @@ -22,8 +22,9 @@ 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' \
-d "{\"event_type\": \"oss-merge\", \"client_payload\": {\"git-ref\": \"${GIT_REF}\", \"git-sha\": \"${GIT_SHA}\", \"git-actor\": \"${GIT_ACTOR}\" }}" \
"https://api.github.com/repos/hashicorp/consul-enterprise/dispatches"
"https://api.github.com/repos/hashicorp/consul-enterprise/dispatches"
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
8 changes: 4 additions & 4 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,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 @@ -212,7 +212,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 @@ -230,7 +230,7 @@ jobs:
# consul-license: ${{secrets.CONSUL_LICENSE}}
# datadog-api-key: "${{ !endsWith(github.repository, '-enterprise') && secrets.DATADOG_API_KEY || '' }}"

go-test-oss:
go-test-ce:
needs:
- setup
- dev-build
Expand Down Expand Up @@ -474,7 +474,7 @@ jobs:
- lint-32bit
# - go-test-arm64
- go-test-enterprise
- go-test-oss
- go-test-ce
- go-test-race
- go-test-envoyextensions
- go-test-troubleshoot
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 @@ -42,7 +42,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 @@ -64,27 +64,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 @@ -103,13 +103,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 @@ -137,7 +137,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 @@ -156,7 +156,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 @@ -218,7 +218,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 @@ -42,7 +42,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 @@ -64,27 +64,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 @@ -103,13 +103,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 @@ -137,7 +137,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 @@ -156,7 +156,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 @@ -218,7 +218,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.14.x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,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 @@ -64,27 +64,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 @@ -103,13 +103,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 @@ -137,7 +137,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 @@ -156,7 +156,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 @@ -218,7 +218,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 7c72bba

Please sign in to comment.