-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: changes resulting from running on consul-enterprise (#16816)
* changes resulting from running on consul-enterprise * removing comment line
- Loading branch information
Showing
7 changed files
with
185 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,9 @@ jobs: | |
uses: ./.github/workflows/reusable-check-go-mod.yml | ||
with: | ||
runs-on: ${{ needs.setup.outputs.compute-medium }} | ||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
|
||
build-386: | ||
needs: | ||
|
@@ -38,6 +41,12 @@ jobs: | |
runs-on: ${{ fromJSON(needs.setup.outputs.compute-medium) }} | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
|
||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
if: ${{ endsWith(github.repository, '-enterprise') }} | ||
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" | ||
|
||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
|
@@ -56,6 +65,12 @@ jobs: | |
runs-on: ${{ fromJSON(needs.setup.outputs.compute-medium) }} | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
|
||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
if: ${{ endsWith(github.repository, '-enterprise') }} | ||
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" | ||
|
||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
|
@@ -75,11 +90,17 @@ jobs: | |
GOOS: linux | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
|
||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
if: ${{ endsWith(github.repository, '-enterprise') }} | ||
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" | ||
|
||
|
||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
- run: | | ||
sudo rm -fv /etc/apt/sources.list.d/github_git-lfs.list # workaround for https://github.com/actions/runner-images/issues/1983 | ||
sudo apt-get update --allow-releaseinfo-change-suite --allow-releaseinfo-change-version && sudo apt-get install -y gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu | ||
- run: CC=arm-linux-gnueabi-gcc GOARCH=arm GOARM=5 go build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,13 +39,20 @@ jobs: | |
uses: ./.github/workflows/reusable-check-go-mod.yml | ||
with: | ||
runs-on: ${{ needs.setup.outputs.compute-small }} | ||
|
||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
|
||
check-generated-protobuf: | ||
needs: | ||
- setup | ||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
if: ${{ endsWith(github.repository, '-enterprise') }} | ||
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" | ||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
|
@@ -62,14 +69,18 @@ jobs: | |
- run: make proto-lint | ||
name: "Protobuf Lint" | ||
- name: Notify Slack | ||
if: failure() | ||
if: ${{ failure() }} | ||
run: .github/scripts/notify_slack.sh | ||
check-generated-deep-copy: | ||
needs: | ||
- setup | ||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
if: ${{ endsWith(github.repository, '-enterprise') }} | ||
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" | ||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
|
@@ -82,34 +93,42 @@ jobs: | |
exit 1 | ||
fi | ||
- name: Notify Slack | ||
if: failure() | ||
run: .github/scripts/notify_slack.sh | ||
if: ${{ failure() }} | ||
run: .github/scripts/notify_slack.sh | ||
|
||
lint-enums: | ||
needs: | ||
- setup | ||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
if: ${{ endsWith(github.repository, '-enterprise') }} | ||
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" | ||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
- run: go install github.com/reillywatson/enumcover/cmd/enumcover@master && enumcover ./... | ||
- name: Notify Slack | ||
if: failure() | ||
if: ${{ failure() }} | ||
run: .github/scripts/notify_slack.sh | ||
|
||
lint-container-test-deps: | ||
needs: | ||
- setup | ||
needs: | ||
- setup | ||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" | ||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
- run: make lint-container-test-deps | ||
- run: make lint-container-test-deps | ||
- name: Notify Slack | ||
if: failure() | ||
if: ${{ failure() }} | ||
run: .github/scripts/notify_slack.sh | ||
|
||
lint-consul-retry: | ||
|
@@ -118,12 +137,16 @@ jobs: | |
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }} | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
if: ${{ endsWith(github.repository, '-enterprise') }} | ||
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com" | ||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
- run: go install github.com/hashicorp/lint-consul-retry@master && lint-consul-retry | ||
- name: Notify Slack | ||
if: failure() | ||
if: ${{ failure() }} | ||
run: .github/scripts/notify_slack.sh | ||
|
||
lint: | ||
|
@@ -132,6 +155,9 @@ jobs: | |
uses: ./.github/workflows/reusable-lint.yml | ||
with: | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
|
||
lint-32bit: | ||
needs: | ||
|
@@ -140,7 +166,9 @@ jobs: | |
with: | ||
go-arch: "386" | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
|
||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
|
||
# create a development build | ||
dev-build: | ||
|
@@ -149,7 +177,10 @@ jobs: | |
uses: ./.github/workflows/reusable-dev-build.yml | ||
with: | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
|
||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
|
||
# TODO(JM): - linux arm64 is not available in our self-hosted runners | ||
# they are currently on the roadmap. | ||
# # create a development build for arm64 | ||
|
@@ -183,7 +214,10 @@ jobs: | |
directory: . | ||
runner-count: 12 | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
|
||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
consul-license: ${{secrets.CONSUL_LICENSE}} | ||
|
||
go-test-race: | ||
needs: | ||
|
@@ -195,6 +229,10 @@ jobs: | |
go-test-flags: 'GO_TEST_FLAGS="-race -gcflags=all=-d=checkptr=0"' | ||
package-names-command: "go list ./... | grep -E -v '^github.com/hashicorp/consul/agent(/consul|/local|/routine-leak-checker)?$' | grep -E -v '^github.com/hashicorp/consul/command/'" | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
consul-license: ${{secrets.CONSUL_LICENSE}} | ||
|
||
go-test-32bit: | ||
needs: | ||
|
@@ -206,24 +244,36 @@ jobs: | |
go-arch: "386" | ||
go-test-flags: 'export GO_TEST_FLAGS="-short"' | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
consul-license: ${{secrets.CONSUL_LICENSE}} | ||
|
||
go-test-envoyextensions: | ||
needs: | ||
- setup | ||
needs: | ||
- setup | ||
- dev-build | ||
uses: ./.github/workflows/reusable-unit.yml | ||
with: | ||
directory: envoyextensions | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
consul-license: ${{secrets.CONSUL_LICENSE}} | ||
|
||
go-test-troubleshoot: | ||
needs: | ||
- setup | ||
needs: | ||
- setup | ||
- dev-build | ||
uses: ./.github/workflows/reusable-unit.yml | ||
with: | ||
directory: troubleshoot | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
consul-license: ${{secrets.CONSUL_LICENSE}} | ||
|
||
go-test-api-1-19: | ||
needs: | ||
|
@@ -233,6 +283,10 @@ jobs: | |
with: | ||
directory: api | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
consul-license: ${{secrets.CONSUL_LICENSE}} | ||
|
||
go-test-api-1-20: | ||
needs: | ||
|
@@ -242,6 +296,10 @@ jobs: | |
with: | ||
directory: api | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
consul-license: ${{secrets.CONSUL_LICENSE}} | ||
|
||
go-test-sdk-1-19: | ||
needs: | ||
|
@@ -251,6 +309,10 @@ jobs: | |
with: | ||
directory: sdk | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
consul-license: ${{secrets.CONSUL_LICENSE}} | ||
|
||
go-test-sdk-1-20: | ||
needs: | ||
|
@@ -260,6 +322,10 @@ jobs: | |
with: | ||
directory: sdk | ||
runs-on: ${{ needs.setup.outputs.compute-xl }} | ||
repository-name: ${{ github.repository }} | ||
secrets: | ||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
consul-license: ${{secrets.CONSUL_LICENSE}} | ||
|
||
noop: | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,22 @@ on: | |
description: An expression indicating which kind of runners to use. | ||
required: true | ||
type: string | ||
repository-name: | ||
required: true | ||
type: string | ||
secrets: | ||
elevated-github-token: | ||
required: true | ||
jobs: | ||
check-go-mod: | ||
runs-on: ${{ fromJSON(inputs.runs-on) }} | ||
|
||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
if: ${{ endsWith(inputs.repository-name, '-enterprise') }} | ||
run: git config --global url."https://${{ secrets.elevated-github-token }}:@github.com".insteadOf "https://github.com" | ||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
|
@@ -24,5 +34,5 @@ jobs: | |
exit 1 | ||
fi | ||
- name: Notify Slack | ||
if: failure() | ||
if: ${{ failure() }} | ||
run: .github/scripts/notify_slack.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,21 @@ on: | |
description: An expression indicating which kind of runners to use. | ||
required: true | ||
type: string | ||
repository-name: | ||
required: true | ||
type: string | ||
secrets: | ||
elevated-github-token: | ||
required: true | ||
jobs: | ||
build: | ||
runs-on: ${{ fromJSON(inputs.runs-on) }} | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
if: ${{ endsWith(inputs.repository-name, '-enterprise') }} | ||
run: git config --global url."https://${{ secrets.elevated-github-token }}:@github.com".insteadOf "https://github.com" | ||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
|
@@ -27,5 +37,5 @@ jobs: | |
name: ${{inputs.uploaded-binary-name}} | ||
path: ./bin/consul | ||
- name: Notify Slack | ||
if: failure() | ||
if: ${{ failure() }} | ||
run: .github/scripts/notify_slack.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,14 @@ on: | |
description: An expression indicating which kind of runners to use. | ||
required: true | ||
type: string | ||
|
||
repository-name: | ||
required: true | ||
type: string | ||
secrets: | ||
elevated-github-token: | ||
required: true | ||
env: | ||
GOTAGS: "" # No tags for OSS but there are for enterprise | ||
GOTAGS: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}" | ||
GOARCH: ${{inputs.go-arch}} | ||
|
||
jobs: | ||
|
@@ -32,6 +37,10 @@ jobs: | |
name: lint ${{ matrix.directory }} | ||
steps: | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # [email protected] | ||
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos. | ||
- name: Setup Git | ||
if: ${{ endsWith(inputs.repository-name, '-enterprise') }} | ||
run: git config --global url."https://${{ secrets.elevated-github-token }}:@github.com".insteadOf "https://github.com" | ||
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # [email protected] | ||
with: | ||
go-version-file: 'go.mod' | ||
|
@@ -43,5 +52,5 @@ jobs: | |
version: v1.51 | ||
args: --build-tags="${{ env.GOTAGS }}" -v | ||
- name: Notify Slack | ||
if: failure() | ||
if: ${{ failure() }} | ||
run: .github/scripts/notify_slack.sh |
Oops, something went wrong.