mirror of https://github.com/status-im/consul.git
ci: changes resulting from running on consul-enterprise (#16816)
* changes resulting from running on consul-enterprise * removing comment line
This commit is contained in:
parent
0d1d2fc4c9
commit
aab9397bc2
|
@ -28,6 +28,9 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-check-go-mod.yml
|
uses: ./.github/workflows/reusable-check-go-mod.yml
|
||||||
with:
|
with:
|
||||||
runs-on: ${{ needs.setup.outputs.compute-medium }}
|
runs-on: ${{ needs.setup.outputs.compute-medium }}
|
||||||
|
repository-name: ${{ github.repository }}
|
||||||
|
secrets:
|
||||||
|
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
|
|
||||||
build-386:
|
build-386:
|
||||||
needs:
|
needs:
|
||||||
|
@ -38,6 +41,12 @@ jobs:
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-medium) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-medium) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
@ -56,6 +65,12 @@ jobs:
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-medium) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-medium) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
@ -75,11 +90,17 @@ jobs:
|
||||||
GOOS: linux
|
GOOS: linux
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
- run: |
|
- 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
|
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
|
- run: CC=arm-linux-gnueabi-gcc GOARCH=arm GOARM=5 go build
|
||||||
|
|
|
@ -39,13 +39,20 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-check-go-mod.yml
|
uses: ./.github/workflows/reusable-check-go-mod.yml
|
||||||
with:
|
with:
|
||||||
runs-on: ${{ needs.setup.outputs.compute-small }}
|
runs-on: ${{ needs.setup.outputs.compute-small }}
|
||||||
|
repository-name: ${{ github.repository }}
|
||||||
|
secrets:
|
||||||
|
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
|
|
||||||
check-generated-protobuf:
|
check-generated-protobuf:
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
@ -62,7 +69,7 @@ jobs:
|
||||||
- run: make proto-lint
|
- run: make proto-lint
|
||||||
name: "Protobuf Lint"
|
name: "Protobuf Lint"
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
run: .github/scripts/notify_slack.sh
|
run: .github/scripts/notify_slack.sh
|
||||||
check-generated-deep-copy:
|
check-generated-deep-copy:
|
||||||
needs:
|
needs:
|
||||||
|
@ -70,6 +77,10 @@ jobs:
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
@ -82,34 +93,42 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
run: .github/scripts/notify_slack.sh
|
run: .github/scripts/notify_slack.sh
|
||||||
|
|
||||||
lint-enums:
|
lint-enums:
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
- run: go install github.com/reillywatson/enumcover/cmd/enumcover@master && enumcover ./...
|
- run: go install github.com/reillywatson/enumcover/cmd/enumcover@master && enumcover ./...
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
run: .github/scripts/notify_slack.sh
|
run: .github/scripts/notify_slack.sh
|
||||||
|
|
||||||
lint-container-test-deps:
|
lint-container-test-deps:
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
- run: make lint-container-test-deps
|
- run: make lint-container-test-deps
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
run: .github/scripts/notify_slack.sh
|
run: .github/scripts/notify_slack.sh
|
||||||
|
|
||||||
lint-consul-retry:
|
lint-consul-retry:
|
||||||
|
@ -118,12 +137,16 @@ jobs:
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
- run: go install github.com/hashicorp/lint-consul-retry@master && lint-consul-retry
|
- run: go install github.com/hashicorp/lint-consul-retry@master && lint-consul-retry
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
run: .github/scripts/notify_slack.sh
|
run: .github/scripts/notify_slack.sh
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
|
@ -132,6 +155,9 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-lint.yml
|
uses: ./.github/workflows/reusable-lint.yml
|
||||||
with:
|
with:
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
||||||
|
repository-name: ${{ github.repository }}
|
||||||
|
secrets:
|
||||||
|
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
|
|
||||||
lint-32bit:
|
lint-32bit:
|
||||||
needs:
|
needs:
|
||||||
|
@ -140,7 +166,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-arch: "386"
|
go-arch: "386"
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
||||||
|
repository-name: ${{ github.repository }}
|
||||||
|
secrets:
|
||||||
|
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
|
|
||||||
# create a development build
|
# create a development build
|
||||||
dev-build:
|
dev-build:
|
||||||
|
@ -149,7 +177,10 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-dev-build.yml
|
uses: ./.github/workflows/reusable-dev-build.yml
|
||||||
with:
|
with:
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
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
|
# TODO(JM): - linux arm64 is not available in our self-hosted runners
|
||||||
# they are currently on the roadmap.
|
# they are currently on the roadmap.
|
||||||
# # create a development build for arm64
|
# # create a development build for arm64
|
||||||
|
@ -183,7 +214,10 @@ jobs:
|
||||||
directory: .
|
directory: .
|
||||||
runner-count: 12
|
runner-count: 12
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
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:
|
go-test-race:
|
||||||
needs:
|
needs:
|
||||||
|
@ -195,6 +229,10 @@ jobs:
|
||||||
go-test-flags: 'GO_TEST_FLAGS="-race -gcflags=all=-d=checkptr=0"'
|
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/'"
|
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 }}
|
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:
|
go-test-32bit:
|
||||||
needs:
|
needs:
|
||||||
|
@ -206,24 +244,36 @@ jobs:
|
||||||
go-arch: "386"
|
go-arch: "386"
|
||||||
go-test-flags: 'export GO_TEST_FLAGS="-short"'
|
go-test-flags: 'export GO_TEST_FLAGS="-short"'
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
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:
|
go-test-envoyextensions:
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
- dev-build
|
- dev-build
|
||||||
uses: ./.github/workflows/reusable-unit.yml
|
uses: ./.github/workflows/reusable-unit.yml
|
||||||
with:
|
with:
|
||||||
directory: envoyextensions
|
directory: envoyextensions
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
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:
|
go-test-troubleshoot:
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
- dev-build
|
- dev-build
|
||||||
uses: ./.github/workflows/reusable-unit.yml
|
uses: ./.github/workflows/reusable-unit.yml
|
||||||
with:
|
with:
|
||||||
directory: troubleshoot
|
directory: troubleshoot
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
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:
|
go-test-api-1-19:
|
||||||
needs:
|
needs:
|
||||||
|
@ -233,6 +283,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
directory: api
|
directory: api
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
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:
|
go-test-api-1-20:
|
||||||
needs:
|
needs:
|
||||||
|
@ -242,6 +296,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
directory: api
|
directory: api
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
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:
|
go-test-sdk-1-19:
|
||||||
needs:
|
needs:
|
||||||
|
@ -251,6 +309,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
directory: sdk
|
directory: sdk
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
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:
|
go-test-sdk-1-20:
|
||||||
needs:
|
needs:
|
||||||
|
@ -260,6 +322,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
directory: sdk
|
directory: sdk
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
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:
|
noop:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -7,12 +7,22 @@ on:
|
||||||
description: An expression indicating which kind of runners to use.
|
description: An expression indicating which kind of runners to use.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
repository-name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
secrets:
|
||||||
|
elevated-github-token:
|
||||||
|
required: true
|
||||||
jobs:
|
jobs:
|
||||||
check-go-mod:
|
check-go-mod:
|
||||||
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
@ -24,5 +34,5 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
run: .github/scripts/notify_slack.sh
|
run: .github/scripts/notify_slack.sh
|
||||||
|
|
|
@ -11,11 +11,21 @@ on:
|
||||||
description: An expression indicating which kind of runners to use.
|
description: An expression indicating which kind of runners to use.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
repository-name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
secrets:
|
||||||
|
elevated-github-token:
|
||||||
|
required: true
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
@ -27,5 +37,5 @@ jobs:
|
||||||
name: ${{inputs.uploaded-binary-name}}
|
name: ${{inputs.uploaded-binary-name}}
|
||||||
path: ./bin/consul
|
path: ./bin/consul
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
run: .github/scripts/notify_slack.sh
|
run: .github/scripts/notify_slack.sh
|
||||||
|
|
|
@ -11,9 +11,14 @@ on:
|
||||||
description: An expression indicating which kind of runners to use.
|
description: An expression indicating which kind of runners to use.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
repository-name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
secrets:
|
||||||
|
elevated-github-token:
|
||||||
|
required: true
|
||||||
env:
|
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}}
|
GOARCH: ${{inputs.go-arch}}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -32,6 +37,10 @@ jobs:
|
||||||
name: lint ${{ matrix.directory }}
|
name: lint ${{ matrix.directory }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
@ -43,5 +52,5 @@ jobs:
|
||||||
version: v1.51
|
version: v1.51
|
||||||
args: --build-tags="${{ env.GOTAGS }}" -v
|
args: --build-tags="${{ env.GOTAGS }}" -v
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
run: .github/scripts/notify_slack.sh
|
run: .github/scripts/notify_slack.sh
|
||||||
|
|
|
@ -30,12 +30,21 @@ on:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
|
repository-name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
secrets:
|
||||||
|
elevated-github-token:
|
||||||
|
required: true
|
||||||
|
consul-license:
|
||||||
|
required: true
|
||||||
env:
|
env:
|
||||||
TEST_RESULTS: /tmp/test-results
|
TEST_RESULTS: /tmp/test-results
|
||||||
GOTESTSUM_VERSION: 1.8.2
|
GOTESTSUM_VERSION: 1.8.2
|
||||||
GOARCH: ${{inputs.go-arch}}
|
GOARCH: ${{inputs.go-arch}}
|
||||||
TOTAL_RUNNERS: ${{inputs.runner-count}}
|
TOTAL_RUNNERS: ${{inputs.runner-count}}
|
||||||
|
CONSUL_LICENSE: ${{secrets.consul-license}}
|
||||||
|
GOTAGS: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
set-test-package-matrix:
|
set-test-package-matrix:
|
||||||
|
@ -67,15 +76,14 @@ jobs:
|
||||||
echo "Hard limits"
|
echo "Hard limits"
|
||||||
ulimit -Ha
|
ulimit -Ha
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
cache: true
|
cache: true
|
||||||
- name: Install gotestsum
|
|
||||||
run: |
|
|
||||||
wget https://github.com/gotestyourself/gotestsum/releases/download/v${{env.GOTESTSUM_VERSION}}/gotestsum_${{env.GOTESTSUM_VERSION}}_linux_amd64.tar.gz
|
|
||||||
sudo tar -C /usr/local/bin -xzf gotestsum_${{env.GOTESTSUM_VERSION}}_linux_amd64.tar.gz
|
|
||||||
rm gotestsum_${{env.GOTESTSUM_VERSION}}_linux_amd64.tar.gz
|
|
||||||
- run: mkdir -p ${{env.TEST_RESULTS}}
|
- run: mkdir -p ${{env.TEST_RESULTS}}
|
||||||
- name: go mod download
|
- name: go mod download
|
||||||
working-directory: ${{inputs.directory}}
|
working-directory: ${{inputs.directory}}
|
||||||
|
@ -84,9 +92,13 @@ jobs:
|
||||||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # pin@v3.0.2
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # pin@v3.0.2
|
||||||
with:
|
with:
|
||||||
name: ${{inputs.uploaded-binary-name}}
|
name: ${{inputs.uploaded-binary-name}}
|
||||||
path: /usr/local/bin
|
path: ${{inputs.directory}}
|
||||||
|
- name: Display downloaded file
|
||||||
|
run: ls -ld consul
|
||||||
|
working-directory: ${{inputs.directory}}
|
||||||
|
- run: echo "$GITHUB_WORKSPACE/${{inputs.directory}}" >> $GITHUB_PATH
|
||||||
- name: Make sure consul is executable
|
- name: Make sure consul is executable
|
||||||
run: sudo chmod +x /usr/local/bin/consul
|
run: chmod +x $GITHUB_WORKSPACE/${{inputs.directory}}/consul
|
||||||
- run: go env
|
- run: go env
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
working-directory: ${{inputs.directory}}
|
working-directory: ${{inputs.directory}}
|
||||||
|
@ -100,7 +112,7 @@ jobs:
|
||||||
# some tests expect this umask, and arm images have a different default
|
# some tests expect this umask, and arm images have a different default
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
gotestsum \
|
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
||||||
--format=short-verbose \
|
--format=short-verbose \
|
||||||
--jsonfile /tmp/jsonfile/go-test.log \
|
--jsonfile /tmp/jsonfile/go-test.log \
|
||||||
--debug \
|
--debug \
|
||||||
|
@ -124,5 +136,5 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
.github/scripts/rerun_fails_report.sh /tmp/gotestsum-rerun-fails
|
.github/scripts/rerun_fails_report.sh /tmp/gotestsum-rerun-fails
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
run: .github/scripts/notify_slack.sh
|
run: .github/scripts/notify_slack.sh
|
||||||
|
|
|
@ -26,34 +26,37 @@ on:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
|
repository-name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
secrets:
|
||||||
|
elevated-github-token:
|
||||||
|
required: true
|
||||||
|
consul-license:
|
||||||
|
required: true
|
||||||
env:
|
env:
|
||||||
TEST_RESULTS: /tmp/test-results
|
TEST_RESULTS: /tmp/test-results
|
||||||
GOTESTSUM_VERSION: 1.8.2
|
GOTESTSUM_VERSION: 1.8.2
|
||||||
GOARCH: ${{inputs.go-arch}}
|
GOARCH: ${{inputs.go-arch}}
|
||||||
|
CONSUL_LICENSE: ${{secrets.consul-license}}
|
||||||
|
GOTAGS: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
go-test:
|
go-test:
|
||||||
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3.3.0
|
||||||
|
# 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 # pin@v3.5.0
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
- name: Setup go mod cache
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # pin@v3.5.0
|
||||||
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # pin@v3.2.6
|
|
||||||
with:
|
with:
|
||||||
path: |
|
go-version-file: 'go.mod'
|
||||||
~/.cache/go-build
|
cache: true
|
||||||
~/go/pkg/mod
|
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-go-
|
|
||||||
- name: Install gotestsum
|
|
||||||
run: |
|
|
||||||
wget https://github.com/gotestyourself/gotestsum/releases/download/v${{env.GOTESTSUM_VERSION}}/gotestsum_${{env.GOTESTSUM_VERSION}}_linux_amd64.tar.gz
|
|
||||||
sudo tar -C /usr/local/bin -xzf gotestsum_${{env.GOTESTSUM_VERSION}}_linux_amd64.tar.gz
|
|
||||||
rm gotestsum_${{env.GOTESTSUM_VERSION}}_linux_amd64.tar.gz
|
|
||||||
- run: mkdir -p ${{env.TEST_RESULTS}}
|
- run: mkdir -p ${{env.TEST_RESULTS}}
|
||||||
- name: go mod download
|
- name: go mod download
|
||||||
working-directory: ${{inputs.directory}}
|
working-directory: ${{inputs.directory}}
|
||||||
|
@ -62,12 +65,13 @@ jobs:
|
||||||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # pin@v3.0.2
|
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # pin@v3.0.2
|
||||||
with:
|
with:
|
||||||
name: ${{inputs.uploaded-binary-name}}
|
name: ${{inputs.uploaded-binary-name}}
|
||||||
path: /usr/local/bin
|
path: ${{inputs.directory}}
|
||||||
- name: Make sure consul is executable
|
|
||||||
run: sudo chmod +x /usr/local/bin/consul
|
|
||||||
- name: Display downloaded file
|
- name: Display downloaded file
|
||||||
run: ls -ld consul
|
run: ls -ld consul
|
||||||
working-directory: /usr/local/bin
|
working-directory: ${{inputs.directory}}
|
||||||
|
- run: echo "$GITHUB_WORKSPACE/${{inputs.directory}}" >> $GITHUB_PATH
|
||||||
|
- name: Make sure consul is executable
|
||||||
|
run: chmod +x $GITHUB_WORKSPACE/${{inputs.directory}}/consul
|
||||||
- run: go env
|
- run: go env
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
working-directory: ${{inputs.directory}}
|
working-directory: ${{inputs.directory}}
|
||||||
|
@ -79,7 +83,7 @@ jobs:
|
||||||
|
|
||||||
${{inputs.go-test-flags}}
|
${{inputs.go-test-flags}}
|
||||||
|
|
||||||
gotestsum \
|
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
||||||
--format=short-verbose \
|
--format=short-verbose \
|
||||||
--jsonfile /tmp/jsonfile/go-test.log \
|
--jsonfile /tmp/jsonfile/go-test.log \
|
||||||
--debug \
|
--debug \
|
||||||
|
@ -103,5 +107,5 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
.github/scripts/rerun_fails_report.sh /tmp/gotestsum-rerun-fails
|
.github/scripts/rerun_fails_report.sh /tmp/gotestsum-rerun-fails
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
if: failure()
|
if: ${{ failure() }}
|
||||||
run: .github/scripts/notify_slack.sh
|
run: .github/scripts/notify_slack.sh
|
||||||
|
|
Loading…
Reference in New Issue