From 452b335ce1e4aaa9452c756aa6bb0cd7de0c661d Mon Sep 17 00:00:00 2001 From: pdewilde Date: Thu, 28 Sep 2023 16:04:42 -0700 Subject: [PATCH 01/10] Try larger runner for build job --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e87d17c2..a5fed61c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,8 @@ jobs: # Build github-metrics-aggregator image and push to artifact registry build: - runs-on: 'ubuntu-latest' + runs-on: + labels: 'pdewilde-test' needs: - 'lint_and_unit' permissions: From 0c2ac798a474cfba5a11cd2728292d99c82a2482 Mon Sep 17 00:00:00 2001 From: pdewilde Date: Thu, 28 Sep 2023 16:37:25 -0700 Subject: [PATCH 02/10] Try larger runner for build job --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5fed61c..064aa20f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,7 @@ jobs: # Build github-metrics-aggregator image and push to artifact registry build: runs-on: - labels: 'pdewilde-test' + group: 'pdewilde-test' needs: - 'lint_and_unit' permissions: From 0eae6a23b097fcd308fd7ed9ee6a7377b7f00184 Mon Sep 17 00:00:00 2001 From: pdewilde Date: Thu, 28 Sep 2023 16:40:28 -0700 Subject: [PATCH 03/10] 3rd time's the charm? --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 064aa20f..87ef70c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,8 +79,7 @@ jobs: # Build github-metrics-aggregator image and push to artifact registry build: - runs-on: - group: 'pdewilde-test' + runs-on: 'pdewilde-test' needs: - 'lint_and_unit' permissions: From 859beb97b7253b82bd9d5ab586cd08e3a35114cd Mon Sep 17 00:00:00 2001 From: pdewilde Date: Thu, 28 Sep 2023 16:42:00 -0700 Subject: [PATCH 04/10] 3rd time's the charm? --- .github/workflows/ci.yml | 55 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87ef70c6..a380fbb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,36 +52,37 @@ concurrency: cancel-in-progress: true jobs: - # Linting jobs - terraform, go - terraform_lint: - uses: 'abcxyz/pkg/.github/workflows/terraform-lint.yml@main' # ratchet:exclude - with: - directory: 'terraform' - terraform_version: '1.3.6' - go_lint: - uses: 'abcxyz/pkg/.github/workflows/go-lint.yml@main' # ratchet:exclude - with: - go_version: '1.20' - # Unit tests - go - go_test: - uses: 'abcxyz/pkg/.github/workflows/go-test.yml@main' # ratchet:exclude - with: - go_version: '1.20' - - lint_and_unit: - runs-on: 'ubuntu-latest' - needs: - - 'terraform_lint' - - 'go_lint' - - 'go_test' - steps: - - run: 'echo prechecks complete' +# # Linting jobs - terraform, go +# terraform_lint: +# uses: 'abcxyz/pkg/.github/workflows/terraform-lint.yml@main' # ratchet:exclude +# with: +# directory: 'terraform' +# terraform_version: '1.3.6' +# go_lint: +# uses: 'abcxyz/pkg/.github/workflows/go-lint.yml@main' # ratchet:exclude +# with: +# go_version: '1.20' +# # Unit tests - go +# go_test: +# uses: 'abcxyz/pkg/.github/workflows/go-test.yml@main' # ratchet:exclude +# with: +# go_version: '1.20' +# +# lint_and_unit: +# runs-on: 'ubuntu-latest' +# needs: +# - 'terraform_lint' +# - 'go_lint' +# - 'go_test' +# steps: +# - run: 'echo prechecks complete' # Build github-metrics-aggregator image and push to artifact registry build: - runs-on: 'pdewilde-test' - needs: - - 'lint_and_unit' + runs-on: + labels: 'pdewilde-test' +# needs: +# - 'lint_and_unit' permissions: contents: 'read' id-token: 'write' From 58677b61e7319611a1022288af221348b884acbf Mon Sep 17 00:00:00 2001 From: pdewilde Date: Thu, 28 Sep 2023 16:45:23 -0700 Subject: [PATCH 05/10] Change it back again --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a380fbb3..e307aa44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,8 +79,7 @@ jobs: # Build github-metrics-aggregator image and push to artifact registry build: - runs-on: - labels: 'pdewilde-test' + runs-on: 'pdewilde-test' # needs: # - 'lint_and_unit' permissions: From 7e454063881485f3c800bfd89a05fdab4bcfc429 Mon Sep 17 00:00:00 2001 From: pdewilde Date: Thu, 28 Sep 2023 16:55:20 -0700 Subject: [PATCH 06/10] This may be my most expensive ci job ever --- .github/workflows/ci.yml | 160 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 158 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e307aa44..d94f2092 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,8 +78,8 @@ jobs: # - run: 'echo prechecks complete' # Build github-metrics-aggregator image and push to artifact registry - build: - runs-on: 'pdewilde-test' + build2: + runs-on: 'ubuntu-latest' # needs: # - 'lint_and_unit' permissions: @@ -117,6 +117,162 @@ jobs: version: 'v1.12.3' # Manually pinned args: 'release -f .goreleaser.docker.yaml --rm-dist --skip-validate' + build4: + runs-on: 'test-4' + # needs: + # - 'lint_and_unit' + permissions: + contents: 'read' + id-token: 'write' + steps: + - name: 'Checkout' + uses: 'actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c' # ratchet:actions/checkout@v3 + - name: 'Setup Go' + uses: 'actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568' # ratchet:actions/setup-go@v3 + with: + go-version: '1.20' + - id: 'auth' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d' # ratchet:google-github-actions/auth@v1 + with: + workload_identity_provider: '${{ vars.WIF_PROVIDER }}' + service_account: '${{ vars.WIF_SERVICE_ACCOUNT }}' + token_format: 'access_token' + - name: 'Authenticate to Artifact Registry' + uses: 'docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a' # ratchet:docker/login-action@v2 + with: + username: 'oauth2accesstoken' + password: '${{ steps.auth.outputs.access_token }}' + registry: '${{ env.DOCKER_REGISTRY }}' + # goreleaser requires a tag to publish images to container registry. + # We create a local tag to make it happy. + - run: |- + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git tag -f `date "+%Y%m%d%H%M%S"` + - name: 'Build the container and push to the registry with goreleaser' + uses: 'goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757' # ratchet:goreleaser/goreleaser-action@v3 + with: + version: 'v1.12.3' # Manually pinned + args: 'release -f .goreleaser.docker.yaml --rm-dist --skip-validate' + + build8: + runs-on: 'test-8' + # needs: + # - 'lint_and_unit' + permissions: + contents: 'read' + id-token: 'write' + steps: + - name: 'Checkout' + uses: 'actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c' # ratchet:actions/checkout@v3 + - name: 'Setup Go' + uses: 'actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568' # ratchet:actions/setup-go@v3 + with: + go-version: '1.20' + - id: 'auth' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d' # ratchet:google-github-actions/auth@v1 + with: + workload_identity_provider: '${{ vars.WIF_PROVIDER }}' + service_account: '${{ vars.WIF_SERVICE_ACCOUNT }}' + token_format: 'access_token' + - name: 'Authenticate to Artifact Registry' + uses: 'docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a' # ratchet:docker/login-action@v2 + with: + username: 'oauth2accesstoken' + password: '${{ steps.auth.outputs.access_token }}' + registry: '${{ env.DOCKER_REGISTRY }}' + # goreleaser requires a tag to publish images to container registry. + # We create a local tag to make it happy. + - run: |- + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git tag -f `date "+%Y%m%d%H%M%S"` + - name: 'Build the container and push to the registry with goreleaser' + uses: 'goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757' # ratchet:goreleaser/goreleaser-action@v3 + with: + version: 'v1.12.3' # Manually pinned + args: 'release -f .goreleaser.docker.yaml --rm-dist --skip-validate' + + build16: + runs-on: 'test-16' + # needs: + # - 'lint_and_unit' + permissions: + contents: 'read' + id-token: 'write' + steps: + - name: 'Checkout' + uses: 'actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c' # ratchet:actions/checkout@v3 + - name: 'Setup Go' + uses: 'actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568' # ratchet:actions/setup-go@v3 + with: + go-version: '1.20' + - id: 'auth' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d' # ratchet:google-github-actions/auth@v1 + with: + workload_identity_provider: '${{ vars.WIF_PROVIDER }}' + service_account: '${{ vars.WIF_SERVICE_ACCOUNT }}' + token_format: 'access_token' + - name: 'Authenticate to Artifact Registry' + uses: 'docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a' # ratchet:docker/login-action@v2 + with: + username: 'oauth2accesstoken' + password: '${{ steps.auth.outputs.access_token }}' + registry: '${{ env.DOCKER_REGISTRY }}' + # goreleaser requires a tag to publish images to container registry. + # We create a local tag to make it happy. + - run: |- + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git tag -f `date "+%Y%m%d%H%M%S"` + - name: 'Build the container and push to the registry with goreleaser' + uses: 'goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757' # ratchet:goreleaser/goreleaser-action@v3 + with: + version: 'v1.12.3' # Manually pinned + args: 'release -f .goreleaser.docker.yaml --rm-dist --skip-validate' + + build32: + runs-on: 'test-32' + # needs: + # - 'lint_and_unit' + permissions: + contents: 'read' + id-token: 'write' + steps: + - name: 'Checkout' + uses: 'actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c' # ratchet:actions/checkout@v3 + - name: 'Setup Go' + uses: 'actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568' # ratchet:actions/setup-go@v3 + with: + go-version: '1.20' + - id: 'auth' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d' # ratchet:google-github-actions/auth@v1 + with: + workload_identity_provider: '${{ vars.WIF_PROVIDER }}' + service_account: '${{ vars.WIF_SERVICE_ACCOUNT }}' + token_format: 'access_token' + - name: 'Authenticate to Artifact Registry' + uses: 'docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a' # ratchet:docker/login-action@v2 + with: + username: 'oauth2accesstoken' + password: '${{ steps.auth.outputs.access_token }}' + registry: '${{ env.DOCKER_REGISTRY }}' + # goreleaser requires a tag to publish images to container registry. + # We create a local tag to make it happy. + - run: |- + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git tag -f `date "+%Y%m%d%H%M%S"` + - name: 'Build the container and push to the registry with goreleaser' + uses: 'goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757' # ratchet:goreleaser/goreleaser-action@v3 + with: + version: 'v1.12.3' # Manually pinned + args: 'release -f .goreleaser.docker.yaml --rm-dist --skip-validate' + deployment_webhook_integration: runs-on: 'ubuntu-latest' needs: From ba719b5329d45f3911afaa559510d129e984da25 Mon Sep 17 00:00:00 2001 From: pdewilde Date: Thu, 28 Sep 2023 16:57:23 -0700 Subject: [PATCH 07/10] I hate yaml --- .github/workflows/ci.yml | 76 ++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d94f2092..f6db783c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -195,44 +195,44 @@ jobs: version: 'v1.12.3' # Manually pinned args: 'release -f .goreleaser.docker.yaml --rm-dist --skip-validate' - build16: - runs-on: 'test-16' - # needs: - # - 'lint_and_unit' - permissions: - contents: 'read' - id-token: 'write' - steps: - - name: 'Checkout' - uses: 'actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c' # ratchet:actions/checkout@v3 - - name: 'Setup Go' - uses: 'actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568' # ratchet:actions/setup-go@v3 - with: - go-version: '1.20' - - id: 'auth' - name: 'Authenticate to Google Cloud' - uses: 'google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d' # ratchet:google-github-actions/auth@v1 - with: - workload_identity_provider: '${{ vars.WIF_PROVIDER }}' - service_account: '${{ vars.WIF_SERVICE_ACCOUNT }}' - token_format: 'access_token' - - name: 'Authenticate to Artifact Registry' - uses: 'docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a' # ratchet:docker/login-action@v2 - with: - username: 'oauth2accesstoken' - password: '${{ steps.auth.outputs.access_token }}' - registry: '${{ env.DOCKER_REGISTRY }}' - # goreleaser requires a tag to publish images to container registry. - # We create a local tag to make it happy. - - run: |- - git config user.name "${GITHUB_ACTOR}" - git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - git tag -f `date "+%Y%m%d%H%M%S"` - - name: 'Build the container and push to the registry with goreleaser' - uses: 'goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757' # ratchet:goreleaser/goreleaser-action@v3 - with: - version: 'v1.12.3' # Manually pinned - args: 'release -f .goreleaser.docker.yaml --rm-dist --skip-validate' + build16: + runs-on: 'test-16' + # needs: + # - 'lint_and_unit' + permissions: + contents: 'read' + id-token: 'write' + steps: + - name: 'Checkout' + uses: 'actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c' # ratchet:actions/checkout@v3 + - name: 'Setup Go' + uses: 'actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568' # ratchet:actions/setup-go@v3 + with: + go-version: '1.20' + - id: 'auth' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d' # ratchet:google-github-actions/auth@v1 + with: + workload_identity_provider: '${{ vars.WIF_PROVIDER }}' + service_account: '${{ vars.WIF_SERVICE_ACCOUNT }}' + token_format: 'access_token' + - name: 'Authenticate to Artifact Registry' + uses: 'docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a' # ratchet:docker/login-action@v2 + with: + username: 'oauth2accesstoken' + password: '${{ steps.auth.outputs.access_token }}' + registry: '${{ env.DOCKER_REGISTRY }}' + # goreleaser requires a tag to publish images to container registry. + # We create a local tag to make it happy. + - run: |- + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git tag -f `date "+%Y%m%d%H%M%S"` + - name: 'Build the container and push to the registry with goreleaser' + uses: 'goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757' # ratchet:goreleaser/goreleaser-action@v3 + with: + version: 'v1.12.3' # Manually pinned + args: 'release -f .goreleaser.docker.yaml --rm-dist --skip-validate' build32: runs-on: 'test-32' From c91cdbf67c556880388fb1965d3d506dc98095d9 Mon Sep 17 00:00:00 2001 From: pdewilde Date: Thu, 28 Sep 2023 16:58:04 -0700 Subject: [PATCH 08/10] I hate yaml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6db783c..e9cfb8e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,7 +78,7 @@ jobs: # - run: 'echo prechecks complete' # Build github-metrics-aggregator image and push to artifact registry - build2: + build: runs-on: 'ubuntu-latest' # needs: # - 'lint_and_unit' From fd46aa587becf3cb6e74ec1c1940970c8e8e1607 Mon Sep 17 00:00:00 2001 From: pdewilde Date: Tue, 31 Oct 2023 10:44:09 -0700 Subject: [PATCH 09/10] Merge remote-tracking branch 'origin/main' into pdewilde/bigger-build-experiment # Conflicts: # .github/workflows/ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c38049c2..eab2adc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,7 @@ jobs: # Build github-metrics-aggregator image and push to artifact registry build: runs-on: - group: 'beefy' + group: 'beefy' # group with a 4-core and 8-core runner for faster builds needs: - 'lint_and_unit' permissions: From 3e22f463d481d000db36c06d831f29ccbf752d42 Mon Sep 17 00:00:00 2001 From: pdewilde Date: Tue, 31 Oct 2023 10:46:40 -0700 Subject: [PATCH 10/10] Case sensitivity --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eab2adc9..bd9da17b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,7 @@ jobs: # Build github-metrics-aggregator image and push to artifact registry build: runs-on: - group: 'beefy' # group with a 4-core and 8-core runner for faster builds + group: 'Beefy' # group with a 4-core and 8-core runner for faster builds needs: - 'lint_and_unit' permissions: