2023-11-22 11:43:29 -08:00
# Google Cloud node deployments and tests that run when Rust code or dependencies are modified,
# but only on PRs from the ZcashFoundation/zebra repository.
2023-12-12 15:51:28 -08:00
# (External PRs are tested/deployed by mergify.)
#
# 1. `versioning`: Extracts the major version from the release semver. Useful for segregating instances based on major versions.
# 2. `build`: Builds a Docker image named `zebrad` with the necessary tags derived from Git.
# 3. `test-configuration-file`: Validates Zebra using the default config with the latest version.
# 4. `test-configuration-file-testnet`: Tests the Docker image for the testnet configuration.
# 5. `test-zebra-conf-path`: Verifies Zebra with a custom Docker config file.
# 6. `deploy-nodes`: Deploys Managed Instance Groups (MiGs) for Mainnet and Testnet. If triggered by main branch pushes, it always replaces the MiG. For releases, MiGs are replaced only if deploying the same major version; otherwise, a new major version is deployed.
# 7. `deploy-instance`: Deploys a single node in a specified GCP zone for testing specific commits. Instances from this job aren't auto-replaced or deleted.
#
# The overall goal is to ensure that Zebra nodes are consistently deployed, tested, and managed on GCP.
2023-10-17 23:16:02 -07:00
name : Deploy Nodes to GCP
2020-06-08 18:03:51 -07:00
2022-08-29 17:11:05 -07:00
# Ensures that only one workflow task will run at a time. Previous deployments, if
# already in process, won't get cancelled. Instead, we let the first to complete
2023-06-07 22:44:30 -07:00
# then queue the latest pending workflow, cancelling any workflows in between.
#
# Since the different event types each use a different Managed Instance Group or instance,
# we can run different event types concurrently.
2023-06-25 16:24:10 -07:00
#
# For pull requests, we only run the tests from this workflow, and don't do any deployments.
# So an in-progress pull request gets cancelled, just like other tests.
2022-08-29 17:11:05 -07:00
concurrency :
2023-06-07 22:44:30 -07:00
group : ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
2023-06-25 16:24:10 -07:00
cancel-in-progress : ${{ github.event_name == 'pull_request' }}
2022-08-29 17:11:05 -07:00
2020-06-08 18:03:51 -07:00
on :
2020-11-19 12:21:03 -08:00
workflow_dispatch :
2022-02-08 16:50:13 -08:00
inputs :
network :
default : 'Mainnet'
2022-04-11 22:06:37 -07:00
description: 'Network to deploy : Mainnet or Testnet'
required : true
2023-06-07 22:44:30 -07:00
log_file :
2023-06-09 00:41:09 -07:00
default : ''
2023-06-07 22:44:30 -07:00
description : 'Log to a file path rather than standard output'
no_cache :
description : 'Disable the Docker cache for this build'
required : false
type : boolean
default : false
2023-06-25 16:24:10 -07:00
2024-09-19 06:12:09 -07:00
push :
# Skip main branch updates where Rust code and dependencies aren't modified.
branches :
- main
paths :
# code and tests
- '**/*.rs'
# hard-coded checkpoints and proptest regressions
- '**/*.txt'
# dependencies
- '**/Cargo.toml'
- '**/Cargo.lock'
# configuration files
- '.cargo/config.toml'
- '**/clippy.toml'
# workflow definitions
- 'docker/**'
- '.dockerignore'
- '.github/workflows/cd-deploy-nodes-gcp.yml'
- '.github/workflows/sub-build-docker-image.yml'
2023-06-25 16:24:10 -07:00
# Only runs the Docker image tests, doesn't deploy any instances
pull_request :
2023-11-22 11:43:29 -08:00
# Skip PRs where Rust code and dependencies aren't modified.
2023-06-25 16:24:10 -07:00
paths :
# code and tests
- '**/*.rs'
# hard-coded checkpoints and proptest regressions
- '**/*.txt'
# dependencies
- '**/Cargo.toml'
- '**/Cargo.lock'
# configuration files
- '.cargo/config.toml'
- '**/clippy.toml'
# workflow definitions
- 'docker/**'
- '.dockerignore'
2023-10-17 23:16:02 -07:00
- '.github/workflows/cd-deploy-nodes-gcp.yml'
- '.github/workflows/sub-build-docker-image.yml'
2023-06-25 16:24:10 -07:00
2022-08-28 05:46:21 -07:00
release :
types :
- published
2020-06-08 18:03:51 -07:00
2023-11-22 11:43:29 -08:00
# IMPORTANT
#
2023-11-23 02:56:19 -08:00
# The job names in `cd-deploy-nodes-gcp.yml`, `cd-deploy-nodes-gcp.patch.yml` and
# `cd-deploy-nodes-gcp.patch-external.yml` must be kept in sync.
2020-06-08 18:03:51 -07:00
jobs :
2022-08-28 05:46:21 -07:00
# If a release was made we want to extract the first part of the semver from the
# tag_name
#
# Generate the following output to pass to subsequent jobs
# - If our semver is `v1.3.0` the resulting output from this job would be `v1`
#
# Note: We just use the first part of the version to replace old instances, and change
2022-11-25 13:11:22 -08:00
# it when a major version is released, to keep a segregation between new and old
2022-08-28 05:46:21 -07:00
# versions.
versioning :
name : Versioning
runs-on : ubuntu-latest
outputs :
major_version : ${{ steps.set.outputs.major_version }}
2022-08-28 16:56:58 -07:00
if : ${{ github.event_name == 'release' }}
2022-08-28 05:46:21 -07:00
steps :
- name : Getting Zebrad Version
id : get
2023-11-28 21:25:55 -08:00
uses : actions/github-script@v7.0.1
2022-08-28 05:46:21 -07:00
with :
result-encoding : string
script : |
return context.payload.release.tag_name.substring(0,2)
- name : Setting API Version
id : set
2023-01-31 12:40:05 -08:00
run : echo "major_version=${{ steps.get.outputs.result }}" >> "$GITHUB_OUTPUT"
2022-08-28 05:46:21 -07:00
# Each time this workflow is executed, a build will be triggered to create a new image
# with the corresponding tags using information from Git
#
# The image will be commonly named `zebrad:<short-hash | github-ref | semver>`
2020-06-08 18:03:51 -07:00
build :
2022-11-06 17:59:32 -08:00
name : Build CD Docker
2023-11-22 11:43:29 -08:00
# Skip PRs from external repositories, let them pass, and then Mergify will check them.
2023-11-27 09:57:10 -08:00
# This workflow also runs on release tags, the event name check will run it on releases.
if : ${{ !startsWith(github.event_name, 'pull') || !github.event.pull_request.head.repo.fork }}
2023-10-17 23:16:02 -07:00
uses : ./.github/workflows/sub-build-docker-image.yml
2022-04-28 01:13:35 -07:00
with :
dockerfile_path : ./docker/Dockerfile
dockerfile_target : runtime
image_name : zebrad
2023-06-07 22:44:30 -07:00
no_cache : ${{ inputs.no_cache || false }}
2022-04-28 01:13:35 -07:00
rust_log : info
2024-06-12 05:18:18 -07:00
# This step needs access to Docker Hub secrets to run successfully
secrets : inherit
2022-02-08 16:50:13 -08:00
2023-07-12 02:33:51 -07:00
# Test that Zebra works using the default config with the latest Zebra version.
2023-01-22 22:41:59 -08:00
test-configuration-file :
2023-10-17 23:16:02 -07:00
name : Test CD default Docker config file
2023-01-22 22:41:59 -08:00
needs : build
2023-10-17 23:16:02 -07:00
uses : ./.github/workflows/sub-test-zebra-config.yml
with :
test_id : 'default-conf'
docker_image : ${{ vars.GAR_BASE }}/zebrad@${{ needs.build.outputs.image_digest }}
grep_patterns : '-e "net.*=.*Main.*estimated progress to chain tip.*BeforeOverwinter"'
test_variables : '-e NETWORK'
network : 'Mainnet'
2023-01-22 22:41:59 -08:00
2023-07-12 02:33:51 -07:00
# Test reconfiguring the docker image for testnet.
test-configuration-file-testnet :
2023-10-17 23:16:02 -07:00
name : Test CD testnet Docker config file
2023-07-12 02:33:51 -07:00
needs : build
2023-10-17 23:16:02 -07:00
# Make sure Zebra can sync the genesis block on testnet
uses : ./.github/workflows/sub-test-zebra-config.yml
with :
test_id : 'testnet-conf'
docker_image : ${{ vars.GAR_BASE }}/zebrad@${{ needs.build.outputs.image_digest }}
grep_patterns : '-e "net.*=.*Test.*estimated progress to chain tip.*Genesis" -e "net.*=.*Test.*estimated progress to chain tip.*BeforeOverwinter"'
test_variables : '-e NETWORK'
network : 'Testnet'
# Test that Zebra works using $ZEBRA_CONF_PATH config
test-zebra-conf-path :
name : Test CD custom Docker config file
needs : build
uses : ./.github/workflows/sub-test-zebra-config.yml
with :
test_id : 'custom-conf'
docker_image : ${{ vars.GAR_BASE }}/zebrad@${{ needs.build.outputs.image_digest }}
2023-11-03 07:41:10 -07:00
grep_patterns : '-e "loaded zebrad config.*config_path.*=.*v1.0.0-rc.2.toml"'
2023-10-17 23:16:02 -07:00
test_variables : '-e NETWORK -e ZEBRA_CONF_PATH="zebrad/tests/common/configs/v1.0.0-rc.2.toml"'
network : ${{ inputs.network || vars.ZCASH_NETWORK }}
2023-06-07 22:44:30 -07:00
2024-09-19 06:12:09 -07:00
# Finds a `tip` cached state disk for zebra from the main branch
#
# Passes the disk name to subsequent jobs using `cached_disk_name` output
#
get-disk-name :
name : Get disk name
uses : ./.github/workflows/sub-find-cached-disks.yml
with :
network : ${{ inputs.network || vars.ZCASH_NETWORK }}
disk_prefix : zebrad-cache
disk_suffix : tip
prefer_main_cached_state : true
2023-06-07 22:44:30 -07:00
# Deploy Managed Instance Groups (MiGs) for Mainnet and Testnet,
# with one node in the configured GCP region.
2022-08-28 05:46:21 -07:00
#
2023-06-07 22:44:30 -07:00
# Separate Mainnet and Testnet MiGs are deployed whenever there are:
# - pushes to the main branch, or
# - version releases of Zebra.
#
# Once this workflow is triggered:
# - by pushes to main: the MiG is always replaced,
# - by releases: the MiG is only replaced if the same major version is being deployed,
# otherwise a new major version is deployed in a new MiG.
2022-08-28 05:46:21 -07:00
#
# Runs:
2023-10-17 23:16:02 -07:00
# - on every push to the `main` branch
2022-08-28 05:46:21 -07:00
# - on every release, when it's published
2022-02-08 16:50:13 -08:00
deploy-nodes :
2023-06-07 22:44:30 -07:00
strategy :
matrix :
network : [ Mainnet, Testnet]
name : Deploy ${{ matrix.network }} nodes
2024-09-19 06:12:09 -07:00
needs : [ build, versioning, test-configuration-file, test-zebra-conf-path, get-disk-name ]
2020-11-12 12:18:35 -08:00
runs-on : ubuntu-latest
2023-06-07 22:44:30 -07:00
timeout-minutes : 60
2024-09-19 06:12:09 -07:00
env :
CACHED_DISK_NAME : ${{ needs.get-disk-name.outputs.cached_disk_name }}
2022-03-18 14:25:35 -07:00
permissions :
contents : 'read'
id-token : 'write'
2022-08-28 16:56:58 -07:00
if : ${{ !cancelled() && !failure() && ((github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'release') }}
2022-02-08 16:50:13 -08:00
2020-11-12 12:18:35 -08:00
steps :
2024-10-10 04:02:09 -07:00
- uses : actions/checkout@v4.2.1
2023-01-10 02:11:11 -08:00
with :
persist-credentials : false
refactor (actions): make better use of variables, secrets and versions (#3393)
* style: use global variables and don't double print
Remove repeated instances of global environment variables. Do not print ENV variables on the terminal as GitHub Actions already shows it.
* fix (actions): Use fixed major versions for actions
As actions get recurrent fixes, using a specific version causes more maintance on the pipelines.
On the other hand, using @master versions could make some action unreliable, as breaking changes might be included without further notice, and even change behavior on a daily basis.
* refactor: make better use of ENV variables
A whole step with refex was being used to extract different variables from GitHub's environment. This gets depecrated in favor of using `rlespinasse/github-slug-action@v4` which has slug URL variables.
A SLUG on a variable will:
- put the variable content in lower case
- replace any character by - except 0-9, a-z, ., and _
- remove leading and trailing - character
- limit the string size to 63 characters
This changes also takes care of using the Head or Base branch for deployments. This will allow us tomerge of workflows, as most steps on this deployment actions are very similar, with little variations between workflows.
* fix (actions): use secrets for sensitive information
* revert: use specific versions for dependabot
Reverting commit 8c934099028e0651e464678c096d8d3815efe95c
2022-01-26 17:46:18 -08:00
- name : Inject slug/short variables
uses : rlespinasse/github-slug-action@v4
2022-03-21 16:07:01 -07:00
with :
short-length : 7
2020-11-12 12:18:35 -08:00
2022-11-25 13:11:22 -08:00
# Makes the Zcash network name lowercase.
#
# Labels in GCP are required to be in lowercase, but the blockchain network
2023-06-07 22:44:30 -07:00
# uses sentence case, so we need to downcase the network.
2022-11-25 13:11:22 -08:00
#
# Passes the lowercase network to subsequent steps using $NETWORK env variable.
- name : Downcase network name for labels
run : |
2023-06-07 22:44:30 -07:00
NETWORK_CAPS="${{ matrix.network }}"
2022-11-25 13:11:22 -08:00
echo "NETWORK=${NETWORK_CAPS,,}" >> "$GITHUB_ENV"
2020-11-12 12:18:35 -08:00
# Setup gcloud CLI
2022-02-08 16:50:13 -08:00
- name : Authenticate to Google Cloud
id : auth
2024-10-07 08:01:02 -07:00
uses : google-github-actions/auth@v2.1.6
2022-02-08 16:50:13 -08:00
with :
2023-04-12 23:56:21 -07:00
workload_identity_provider : '${{ vars.GCP_WIF }}'
service_account : '${{ vars.GCP_DEPLOYMENTS_SA }}'
2022-11-09 22:32:21 -08:00
- name : Set up Cloud SDK
2024-08-08 14:53:46 -07:00
uses : google-github-actions/setup-gcloud@v2.1.1
2020-11-12 12:18:35 -08:00
2022-11-22 14:20:47 -08:00
# TODO we should implement the fixes from https://github.com/ZcashFoundation/zebra/pull/5670 here
# but the implementation is failing as it's requiring the disk names, contrary to what is stated in the official documentation
2023-06-07 22:44:30 -07:00
- name : Create instance template for ${{ matrix.network }}
2020-11-12 12:18:35 -08:00
run : |
2024-09-19 06:12:09 -07:00
NAME="zebrad-cache-${{ env.GITHUB_HEAD_REF_SLUG_URL || env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}-${NETWORK}"
DISK_PARAMS="name=${NAME},device-name=${NAME},size=400GB,type=pd-ssd"
if [ -n "${{ env.CACHED_DISK_NAME }}" ]; then
DISK_PARAMS+=",image=${{ env.CACHED_DISK_NAME }}"
else
echo "No cached disk found for ${{ matrix.network }} in main branch"
exit 1
fi
2023-06-07 22:44:30 -07:00
gcloud compute instance-templates create-with-container zebrad-${{ needs.versioning.outputs.major_version || env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}-${NETWORK} \
2024-09-19 06:12:09 -07:00
--machine-type ${{ vars.GCP_SMALL_MACHINE }} \
--boot-disk-size 50GB \
2022-02-08 16:50:13 -08:00
--boot-disk-type=pd-ssd \
2022-11-16 15:08:28 -08:00
--image-project=cos-cloud \
--image-family=cos-stable \
2024-09-19 06:12:09 -07:00
--network-interface=subnet=${{ vars.GCP_SUBNETWORK }} \
--create-disk="${DISK_PARAMS}" \
--container-mount-disk=mount-path='/var/cache/zebrad-cache',name=${NAME},mode=rw \
2023-06-09 12:16:39 -07:00
--container-stdin \
--container-tty \
2023-04-12 23:56:21 -07:00
--container-image ${{ vars.GAR_BASE }}/zebrad@${{ needs.build.outputs.image_digest }} \
2023-07-25 15:50:45 -07:00
--container-env "NETWORK=${{ matrix.network }},LOG_FILE=${{ vars.CD_LOG_FILE }},LOG_COLOR=false,SENTRY_DSN=${{ vars.SENTRY_DSN }}" \
2023-05-09 14:13:26 -07:00
--service-account ${{ vars.GCP_DEPLOYMENTS_SA }} \
2020-06-15 01:32:51 -07:00
--scopes cloud-platform \
2024-09-19 06:12:09 -07:00
--metadata google-logging-enabled=true,google-logging-use-fluentbit=true,google-monitoring-enabled=true \
--labels=app=zebrad,environment=staging,network=${NETWORK},github_ref=${{ env.GITHUB_REF_SLUG_URL }} \
2023-05-09 19:06:18 -07:00
--tags zebrad
2020-06-18 14:52:53 -07:00
2020-11-12 12:18:35 -08:00
# Check if our destination instance group exists already
2023-06-07 22:44:30 -07:00
- name : Check if ${{ matrix.network }} instance group exists
2020-11-12 12:18:35 -08:00
id : does-group-exist
continue-on-error : true
run : |
2023-06-07 22:44:30 -07:00
gcloud compute instance-groups list | grep "zebrad-${{ needs.versioning.outputs.major_version || env.GITHUB_REF_SLUG_URL }}-${NETWORK}" | grep "${{ vars.GCP_REGION }}"
2020-11-12 12:18:35 -08:00
# Deploy new managed instance group using the new instance template
2023-06-07 22:44:30 -07:00
- name : Create managed instance group for ${{ matrix.network }}
2020-11-12 12:18:35 -08:00
if : steps.does-group-exist.outcome == 'failure'
run : |
gcloud compute instance-groups managed create \
2023-06-07 22:44:30 -07:00
"zebrad-${{ needs.versioning.outputs.major_version || env.GITHUB_REF_SLUG_URL }}-${NETWORK}" \
--template "zebrad-${{ needs.versioning.outputs.major_version || env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}-${NETWORK}" \
2020-06-21 01:39:47 -07:00
--health-check zebrad-tracing-filter \
--initial-delay 30 \
2023-04-12 23:56:21 -07:00
--region "${{ vars.GCP_REGION }}" \
2022-11-22 14:20:47 -08:00
--size 1
2020-06-19 00:26:31 -07:00
2020-11-12 12:18:35 -08:00
# Rolls out update to existing group using the new instance template
2023-06-07 22:44:30 -07:00
- name : Update managed instance group for ${{ matrix.network }}
2020-11-12 12:18:35 -08:00
if : steps.does-group-exist.outcome == 'success'
run : |
gcloud compute instance-groups managed rolling-action start-update \
2023-06-07 22:44:30 -07:00
"zebrad-${{ needs.versioning.outputs.major_version || env.GITHUB_REF_SLUG_URL }}-${NETWORK}" \
--version template="zebrad-${{ needs.versioning.outputs.major_version || env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}-${NETWORK}" \
2023-04-12 23:56:21 -07:00
--region "${{ vars.GCP_REGION }}"
2022-02-08 16:50:13 -08:00
2023-06-07 22:44:30 -07:00
# This jobs handles the deployment of a single node (1) in the configured GCP zone
2022-08-28 05:46:21 -07:00
# when an instance is required to test a specific commit
#
# Runs:
# - on request, using workflow_dispatch with regenerate-disks
#
# Note: this instances are not automatically replaced or deleted
2022-02-08 16:50:13 -08:00
deploy-instance :
2023-06-07 22:44:30 -07:00
name : Deploy single ${{ inputs.network }} instance
2024-09-19 06:12:09 -07:00
needs : [ build, test-configuration-file, test-zebra-conf-path, get-disk-name ]
2022-02-08 16:50:13 -08:00
runs-on : ubuntu-latest
timeout-minutes : 30
2024-09-19 06:12:09 -07:00
env :
CACHED_DISK_NAME : ${{ needs.get-disk-name.outputs.cached_disk_name }}
2022-03-18 14:25:35 -07:00
permissions :
contents : 'read'
id-token : 'write'
2022-02-08 16:50:13 -08:00
if : github.event_name == 'workflow_dispatch'
steps :
2024-10-10 04:02:09 -07:00
- uses : actions/checkout@v4.2.1
2023-01-10 02:11:11 -08:00
with :
persist-credentials : false
2022-02-08 16:50:13 -08:00
- name : Inject slug/short variables
uses : rlespinasse/github-slug-action@v4
2022-03-21 16:07:01 -07:00
with :
short-length : 7
2022-02-08 16:50:13 -08:00
2023-06-07 22:44:30 -07:00
# Makes the Zcash network name lowercase.
#
# Labels in GCP are required to be in lowercase, but the blockchain network
# uses sentence case, so we need to downcase the network.
#
# Passes the lowercase network to subsequent steps using $NETWORK env variable.
- name : Downcase network name for labels
run : |
NETWORK_CAPS="${{ inputs.network }}"
echo "NETWORK=${NETWORK_CAPS,,}" >> "$GITHUB_ENV"
2022-02-08 16:50:13 -08:00
# Setup gcloud CLI
- name : Authenticate to Google Cloud
id : auth
2024-10-07 08:01:02 -07:00
uses : google-github-actions/auth@v2.1.6
2022-02-08 16:50:13 -08:00
with :
2023-04-12 23:56:21 -07:00
workload_identity_provider : '${{ vars.GCP_WIF }}'
service_account : '${{ vars.GCP_DEPLOYMENTS_SA }}'
2022-11-09 22:32:21 -08:00
- name : Set up Cloud SDK
2024-08-08 14:53:46 -07:00
uses : google-github-actions/setup-gcloud@v2.1.1
2022-02-08 16:50:13 -08:00
# Create instance template from container image
2023-06-07 22:44:30 -07:00
- name : Manual deploy of a single ${{ inputs.network }} instance running zebrad
2022-02-08 16:50:13 -08:00
run : |
2024-09-19 06:12:09 -07:00
NAME="zebrad-cache-${{ env.GITHUB_HEAD_REF_SLUG_URL || env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}-${NETWORK}"
DISK_PARAMS="name=${NAME},device-name=${NAME},size=400GB,type=pd-ssd"
if [ -n "${{ env.CACHED_DISK_NAME }}" ]; then
DISK_PARAMS+=",image=${{ env.CACHED_DISK_NAME }}"
else
echo "No cached disk found for ${{ matrix.network }} in main branch"
exit 1
fi
2023-06-07 22:44:30 -07:00
gcloud compute instances create-with-container "zebrad-${{ env.GITHUB_REF_SLUG_URL }}-${{ env.GITHUB_SHA_SHORT }}-${NETWORK}" \
2024-09-19 06:12:09 -07:00
--machine-type ${{ vars.GCP_SMALL_MACHINE }} \
--boot-disk-size 50GB \
2022-02-08 16:50:13 -08:00
--boot-disk-type=pd-ssd \
2022-11-16 15:08:28 -08:00
--image-project=cos-cloud \
--image-family=cos-stable \
2024-09-19 06:12:09 -07:00
--network-interface=subnet=${{ vars.GCP_SUBNETWORK }} \
--create-disk="${DISK_PARAMS}" \
--container-mount-disk=mount-path='/var/cache/zebrad-cache',name=${NAME},mode=rw \
2022-02-08 16:50:13 -08:00
--container-stdin \
--container-tty \
2023-04-12 23:56:21 -07:00
--container-image ${{ vars.GAR_BASE }}/zebrad@${{ needs.build.outputs.image_digest }} \
2023-07-25 15:50:45 -07:00
--container-env "NETWORK=${{ inputs.network }},LOG_FILE=${{ inputs.log_file }},LOG_COLOR=false,SENTRY_DSN=${{ vars.SENTRY_DSN }}" \
2023-05-09 14:13:26 -07:00
--service-account ${{ vars.GCP_DEPLOYMENTS_SA }} \
2024-09-19 06:12:09 -07:00
--scopes cloud-platform \
--metadata google-logging-enabled=true,google-monitoring-enabled=true \
2022-11-25 13:11:22 -08:00
--labels=app=zebrad,environment=qa,network=${NETWORK},github_ref=${{ env.GITHUB_REF_SLUG_URL }} \
2023-05-09 14:13:26 -07:00
--tags zebrad \
--zone ${{ vars.GCP_ZONE }}
2023-10-08 19:01:51 -07:00
failure-issue :
name : Open or update issues for release failures
# When a new job is added to this workflow, add it to this list.
2023-10-17 23:16:02 -07:00
needs : [ versioning, build, deploy-nodes, deploy-instance ]
2023-10-08 19:01:51 -07:00
# Only open tickets for failed or cancelled jobs that are not coming from PRs.
# (PR statuses are already reported in the PR jobs list, and checked by Mergify.)
if : (failure() && github.event.pull_request == null) || (cancelled() && github.event.pull_request == null)
runs-on : ubuntu-latest
steps :
- uses : jayqi/failed-build-issue-action@v1
with :
title-template : "{{refname}} branch CI failed: {{eventName}} in {{workflow}}"
# New failures open an issue with this label.
label-name : S-ci-fail-release-auto-issue
# If there is already an open issue with this label, any failures become comments on that issue.
always-create-new-issue : false
github-token : ${{ secrets.GITHUB_TOKEN }}