mirror of https://github.com/hashicorp/consul
Release 1.16.x reduce runner sizes and concurrency (#18674)
Reduce runner sizes and concurrencypull/18689/head
parent
45627fb074
commit
c88737efc6
|
@ -8,19 +8,19 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
case "$GITHUB_REPOSITORY" in
|
case "$GITHUB_REPOSITORY" in
|
||||||
*-enterprise)
|
*-enterprise)
|
||||||
# shellcheck disable=SC2129
|
# shellcheck disable=SC2129
|
||||||
echo "compute-small=['self-hosted', 'linux', 'small']" >> "$GITHUB_OUTPUT"
|
echo "compute-small=['self-hosted', 'linux', 'small']" >>"$GITHUB_OUTPUT"
|
||||||
echo "compute-medium=['self-hosted', 'linux', 'medium']" >> "$GITHUB_OUTPUT"
|
echo "compute-medium=['self-hosted', 'linux', 'medium']" >>"$GITHUB_OUTPUT"
|
||||||
echo "compute-large=['self-hosted', 'linux', 'large']" >> "$GITHUB_OUTPUT"
|
echo "compute-large=['self-hosted', 'linux', 'large']" >>"$GITHUB_OUTPUT"
|
||||||
# m5d.8xlarge is equivalent to our xl custom runner in CE
|
# m5d.8xlarge is equivalent to our xl custom runner in CE
|
||||||
echo "compute-xl=['self-hosted', 'ondemand', 'linux', 'type=m5d.8xlarge']" >> "$GITHUB_OUTPUT"
|
echo "compute-xl=['self-hosted', 'ondemand', 'linux', 'type=m6a.2xlarge']" >>"$GITHUB_OUTPUT"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# shellcheck disable=SC2129
|
# shellcheck disable=SC2129
|
||||||
echo "compute-small=['custom-linux-s-consul-latest']" >> "$GITHUB_OUTPUT"
|
echo "compute-small=['custom-linux-s-consul-latest']" >>"$GITHUB_OUTPUT"
|
||||||
echo "compute-medium=['custom-linux-m-consul-latest']" >> "$GITHUB_OUTPUT"
|
echo "compute-medium=['custom-linux-m-consul-latest']" >>"$GITHUB_OUTPUT"
|
||||||
echo "compute-large=['custom-linux-l-consul-latest']" >> "$GITHUB_OUTPUT"
|
echo "compute-large=['custom-linux-l-consul-latest']" >>"$GITHUB_OUTPUT"
|
||||||
echo "compute-xl=['custom-linux-xl-consul-latest']" >> "$GITHUB_OUTPUT"
|
echo "compute-xl=['custom-linux-xl-consul-latest']" >>"$GITHUB_OUTPUT"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -74,7 +74,7 @@ jobs:
|
||||||
|
|
||||||
ember-build-test:
|
ember-build-test:
|
||||||
needs: setup
|
needs: setup
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
partition: [1, 2, 3, 4]
|
partition: [1, 2, 3, 4]
|
||||||
|
|
|
@ -23,6 +23,11 @@ env:
|
||||||
TEST_RESULTS: /tmp/test-results
|
TEST_RESULTS: /tmp/test-results
|
||||||
GOPRIVATE: github.com/hashicorp # Required for enterprise deps
|
GOPRIVATE: github.com/hashicorp # Required for enterprise deps
|
||||||
|
|
||||||
|
# concurrency
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
conditional-skip:
|
conditional-skip:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -172,7 +177,7 @@ jobs:
|
||||||
- setup
|
- setup
|
||||||
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-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
secrets:
|
secrets:
|
||||||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
|
@ -183,7 +188,7 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-lint.yml
|
uses: ./.github/workflows/reusable-lint.yml
|
||||||
with:
|
with:
|
||||||
go-arch: "386"
|
go-arch: "386"
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
secrets:
|
secrets:
|
||||||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
|
@ -194,7 +199,7 @@ jobs:
|
||||||
- setup
|
- setup
|
||||||
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-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
secrets:
|
secrets:
|
||||||
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
|
||||||
|
@ -206,7 +211,7 @@ jobs:
|
||||||
# uses: ./.github/workflows/reusable-dev-build.yml
|
# uses: ./.github/workflows/reusable-dev-build.yml
|
||||||
# with:
|
# with:
|
||||||
# uploaded-binary-name: 'consul-bin-s390x'
|
# uploaded-binary-name: 'consul-bin-s390x'
|
||||||
# runs-on: ${{ needs.setup.outputs.compute-xl }}
|
# runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
# go-arch: "s390x"
|
# go-arch: "s390x"
|
||||||
# repository-name: ${{ github.repository }}
|
# repository-name: ${{ github.repository }}
|
||||||
# secrets:
|
# secrets:
|
||||||
|
@ -220,7 +225,7 @@ jobs:
|
||||||
# uses: ./.github/workflows/reusable-dev-build.yml
|
# uses: ./.github/workflows/reusable-dev-build.yml
|
||||||
# with:
|
# with:
|
||||||
# uploaded-binary-name: 'consul-bin-arm64'
|
# uploaded-binary-name: 'consul-bin-arm64'
|
||||||
# runs-on: ${{ needs.setup.outputs.compute-xl }}
|
# runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
# go-arch: "arm64"
|
# go-arch: "arm64"
|
||||||
# repository-name: ${{ github.repository }}
|
# repository-name: ${{ github.repository }}
|
||||||
# secrets:
|
# secrets:
|
||||||
|
@ -253,7 +258,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
directory: .
|
directory: .
|
||||||
runner-count: 12
|
runner-count: 12
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: ""
|
go-tags: ""
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -273,7 +278,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
directory: .
|
directory: .
|
||||||
runner-count: 12
|
runner-count: 12
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -293,7 +298,7 @@ jobs:
|
||||||
directory: .
|
directory: .
|
||||||
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|/connect|/snapshot)'"
|
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|/connect|/snapshot)'"
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -313,7 +318,7 @@ jobs:
|
||||||
directory: .
|
directory: .
|
||||||
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-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -334,7 +339,7 @@ jobs:
|
||||||
# uploaded-binary-name: 'consul-bin-s390x'
|
# uploaded-binary-name: 'consul-bin-s390x'
|
||||||
# directory: .
|
# directory: .
|
||||||
# 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-large }}
|
||||||
# repository-name: ${{ github.repository }}
|
# repository-name: ${{ github.repository }}
|
||||||
# go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
# go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
# permissions:
|
# permissions:
|
||||||
|
@ -352,7 +357,7 @@ jobs:
|
||||||
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-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -370,7 +375,7 @@ jobs:
|
||||||
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-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -388,7 +393,7 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-unit.yml
|
uses: ./.github/workflows/reusable-unit.yml
|
||||||
with:
|
with:
|
||||||
directory: api
|
directory: api
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
go-version: "1.19"
|
go-version: "1.19"
|
||||||
|
@ -407,7 +412,7 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-unit.yml
|
uses: ./.github/workflows/reusable-unit.yml
|
||||||
with:
|
with:
|
||||||
directory: api
|
directory: api
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
go-version: "1.20"
|
go-version: "1.20"
|
||||||
|
@ -426,7 +431,7 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-unit.yml
|
uses: ./.github/workflows/reusable-unit.yml
|
||||||
with:
|
with:
|
||||||
directory: sdk
|
directory: sdk
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
go-version: "1.19"
|
go-version: "1.19"
|
||||||
|
@ -445,7 +450,7 @@ jobs:
|
||||||
uses: ./.github/workflows/reusable-unit.yml
|
uses: ./.github/workflows/reusable-unit.yml
|
||||||
with:
|
with:
|
||||||
directory: sdk
|
directory: sdk
|
||||||
runs-on: ${{ needs.setup.outputs.compute-xl }}
|
runs-on: ${{ needs.setup.outputs.compute-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
go-tags: "${{ github.event.repository.name == 'consul-enterprise' && 'consulent consulprem consuldev' || '' }}"
|
||||||
go-version: "1.20"
|
go-version: "1.20"
|
||||||
|
|
|
@ -42,7 +42,7 @@ jobs:
|
||||||
needs: [setup]
|
needs: [setup]
|
||||||
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-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
uploaded-binary-name: 'consul-bin'
|
uploaded-binary-name: 'consul-bin'
|
||||||
secrets:
|
secrets:
|
||||||
|
@ -88,7 +88,7 @@ jobs:
|
||||||
} >> "$GITHUB_OUTPUT"
|
} >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
envoy-integration-test:
|
envoy-integration-test:
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
- generate-envoy-job-matrices
|
- generate-envoy-job-matrices
|
||||||
|
@ -183,7 +183,7 @@ jobs:
|
||||||
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
|
||||||
|
|
||||||
upgrade-integration-test:
|
upgrade-integration-test:
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
- dev-build
|
- dev-build
|
||||||
|
|
|
@ -25,6 +25,10 @@ env:
|
||||||
CONSUL_LATEST_IMAGE_NAME: ${{ endsWith(github.repository, '-enterprise') && github.repository || 'hashicorp/consul' }}
|
CONSUL_LATEST_IMAGE_NAME: ${{ endsWith(github.repository, '-enterprise') && github.repository || 'hashicorp/consul' }}
|
||||||
GOPRIVATE: github.com/hashicorp # Required for enterprise deps
|
GOPRIVATE: github.com/hashicorp # Required for enterprise deps
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
conditional-skip:
|
conditional-skip:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -59,7 +63,7 @@ jobs:
|
||||||
needs: [setup]
|
needs: [setup]
|
||||||
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-large }}
|
||||||
repository-name: ${{ github.repository }}
|
repository-name: ${{ github.repository }}
|
||||||
uploaded-binary-name: 'consul-bin'
|
uploaded-binary-name: 'consul-bin'
|
||||||
secrets:
|
secrets:
|
||||||
|
@ -278,7 +282,7 @@ jobs:
|
||||||
} >> "$GITHUB_OUTPUT"
|
} >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
envoy-integration-test:
|
envoy-integration-test:
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
- generate-envoy-job-matrices
|
- generate-envoy-job-matrices
|
||||||
|
@ -370,7 +374,7 @@ jobs:
|
||||||
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
|
||||||
|
|
||||||
compatibility-integration-test:
|
compatibility-integration-test:
|
||||||
runs-on: ${{ fromJSON(needs.setup.outputs.compute-xl) }}
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large) }}
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
- dev-build
|
- dev-build
|
||||||
|
|
Loading…
Reference in New Issue