Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aesthetic rearrangement of cloudbuild.yaml #3741

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 33 additions & 44 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,6 @@ steps:
dir: build
env: ['REGISTRY=${_REGISTRY}']
args: [-j, '4', push]

#
# Build all the SDKs
#
- name: make-docker
id: build-sdks
waitFor:
Expand All @@ -179,18 +175,6 @@ steps:
dir: build
args: [-j, '4', --output-sync=recurse, build-sdks]

#
# Cache the cpp sdk build directory, to speed up subsequent builds (considerably)
#
- name: us-docker.pkg.dev/$PROJECT_ID/ci/save_cache
args:
- --bucket=gs://$_CACHE_BUCKET
- --key=$_CPP_SDK_BUILD_CACHE_KEY-$( checksum sdks/cpp/CMakeLists.txt )
- --path=sdks/cpp/.build
id: cpp-sdk-build-save-cache
waitFor:
- build-sdks

#
# Run the all the automated tests (except e2e) in parallel
#
Expand All @@ -205,28 +189,28 @@ steps:
args: [-j, '5', --output-sync=target, test]

#
# Cache the htmltest url checks. Faster builds, and lower network flakiness.
# SDK conformance tests
#
- name: us-docker.pkg.dev/$PROJECT_ID/ci/save_cache
args:
- --bucket=gs://$_CACHE_BUCKET
- --key=$_HTMLTEST_CACHE_KEY
- --path=site/tmp
id: htmltest-save-cache
- name: make-docker
id: sdk-conformance
dir: build
env: ['REGISTRY=${_REGISTRY}']
args: [-j, '5', --output-sync=target, run-sdk-conformance-tests]
waitFor:
- build-images
- tests

#
# Site preview
#

# don't promote, as it can cause failures when two deploys try and promote at the same time.
- name: make-docker # build a preview of the website
id: site-static
waitFor: [tests]
dir: build
args: [site-static-preview, site-gen-app-yaml, SERVICE=preview]
- name: gcr.io/cloud-builders/gcloud # deploy the preview of the website
# deploy the preview of the website; # don't promote, as it can cause failures
# when two deploys try and promote at the same time.
- name: gcr.io/cloud-builders/gcloud
id: deploy-site-static
waitFor: [site-static]
dir: site
Expand All @@ -235,6 +219,10 @@ steps:
- GOPATH=/workspace/go
- GO111MODULE=on

#
# End to end tests
#

# wait for us to be the oldest ongoing build before we run e2es
- name: gcr.io/cloud-builders/gcloud
id: e2e-wait-to-become-leader
Expand Down Expand Up @@ -337,42 +325,42 @@ steps:
- cancel-orphan-e2e-tests

#
# SDK conformance tests
# Store caches, to speed up subsequent builds (considerably)
#
- name: make-docker
id: sdk-conformance
dir: build
env: ['REGISTRY=${_REGISTRY}']
args: [-j, '5', --output-sync=target, run-sdk-conformance-tests]
- name: us-docker.pkg.dev/$PROJECT_ID/ci/save_cache
args:
- --bucket=gs://$_CACHE_BUCKET
- --key=$_CPP_SDK_BUILD_CACHE_KEY-$( checksum sdks/cpp/CMakeLists.txt )
- --path=sdks/cpp/.build # CPP SDK build
id: cpp-sdk-build-save-cache
waitFor:
- build-images
- tests

#
# Cache the CPP conformance build directory, to speed up subsequent builds (considerably)
#
- build-sdks
- name: us-docker.pkg.dev/$PROJECT_ID/ci/save_cache
args:
- --bucket=gs://$_CACHE_BUCKET
- --key=$_CPP_SDK_CONFORMANCE_CACHE_KEY-$( sdks/cpp/CMakeLists.txt )
- --path=test/sdk/cpp/sdk
- --path=test/sdk/cpp/sdk # CPP conformance test build
id: cpp-sdk-conformance-save-cache
waitFor:
- sdk-conformance

#
# Cache the Rust SDK build directory, to speed up subsequent builds (considerably)
#
- name: us-docker.pkg.dev/$PROJECT_ID/ci/save_cache
args:
- --bucket=gs://$_CACHE_BUCKET
- --key=$_RUST_SDK_BUILD_CACHE_KEY-$( checksum test/sdk/rust/Cargo.toml )
- --path=test/sdk/rust/.cargo
- --path=test/sdk/rust/.cargo # Rust conformance test build
- --path=test/sdk/rust/.cargo-targets
- --no-clobber
id: rust-build-save-cache
waitFor:
- sdk-conformance
- name: us-docker.pkg.dev/$PROJECT_ID/ci/save_cache
args:
- --bucket=gs://$_CACHE_BUCKET
- --key=$_HTMLTEST_CACHE_KEY
- --path=site/tmp # htmltest URL checks
id: htmltest-save-cache
waitFor:
- tests

#
# Zip up artifacts and push to storage
Expand All @@ -385,6 +373,7 @@ steps:
waitFor: [build-images, tests]
dir: cmd/sdk-server/bin
args: [-m, cp, '*.zip', gs://agones-artifacts/sdk-server]

substitutions:
_CACHE_BUCKET: agones-build-cache
_HTMLTEST_CACHE_KEY: htmltest-0.10.1
Expand Down
Loading