From ff55b0a4c6eb365ae7bffad91f341d5dc52d8d17 Mon Sep 17 00:00:00 2001 From: "Matt Gaunt-Seo @ Sentry.io" <112419115+mattgauntseo-sentry@users.noreply.github.com> Date: Wed, 5 Jul 2023 09:40:44 -0700 Subject: [PATCH] Introduce relay pipedream (#2248) Co-authored-by: Iker Barriocanal <32816711+iker-barriocanal@users.noreply.github.com> --- .github/workflows/lint-pipelines.yml | 13 ++ .gitignore | 3 + Makefile | 10 + gocd/README.md | 59 ++++++ .../relay-next-monitor.yaml | 109 +++++++++++ gocd/generated-pipelines/relay-next-us.yaml | 173 ++++++++++++++++++ gocd/generated-pipelines/relay-next.yaml | 21 +++ gocd/templates/bash/create-sentry-release.sh | 3 + gocd/templates/bash/deploy-pop.sh | 10 + gocd/templates/bash/deploy-relay.sh | 10 + gocd/templates/bash/github-check-runs.sh | 10 + gocd/templates/jsonnetfile.json | 15 ++ gocd/templates/jsonnetfile.lock.json | 16 ++ gocd/templates/libs/relay-pops.libsonnet | 76 ++++++++ gocd/templates/libs/relay.libsonnet | 91 +++++++++ gocd/templates/relay.jsonnet | 17 ++ 16 files changed, 636 insertions(+) create mode 100644 gocd/README.md create mode 100644 gocd/generated-pipelines/relay-next-monitor.yaml create mode 100644 gocd/generated-pipelines/relay-next-us.yaml create mode 100644 gocd/generated-pipelines/relay-next.yaml create mode 100644 gocd/templates/bash/create-sentry-release.sh create mode 100644 gocd/templates/bash/deploy-pop.sh create mode 100644 gocd/templates/bash/deploy-relay.sh create mode 100644 gocd/templates/bash/github-check-runs.sh create mode 100644 gocd/templates/jsonnetfile.json create mode 100644 gocd/templates/jsonnetfile.lock.json create mode 100644 gocd/templates/libs/relay-pops.libsonnet create mode 100644 gocd/templates/libs/relay.libsonnet create mode 100644 gocd/templates/relay.jsonnet diff --git a/.github/workflows/lint-pipelines.yml b/.github/workflows/lint-pipelines.yml index fec1d9c118..2cfcedc032 100644 --- a/.github/workflows/lint-pipelines.yml +++ b/.github/workflows/lint-pipelines.yml @@ -22,3 +22,16 @@ jobs: echo "GoCD YAML Linting" find "gocd" -name "*.yaml" -type f -print0 | \ xargs -0 -I'{}' bash -c 'printf "\nšŸ”Ž Linting {}\n\t" && gocd-cli configrepo syntax --yaml --raw "{}"' + + render: + name: Render GoCD Pipelines with Jsonnet + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + - uses: getsentry/action-gocd-jsonnet@v0 + with: + jb-install: true + check-for-changes: true + convert-to-yaml: true + jsonnet-dir: gocd/templates + generated-dir: gocd/generated-pipelines diff --git a/.gitignore b/.gitignore index 94b659b703..13a7014446 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ target # NPM utilities for building docs /node_modules/ package-lock.json + +# Jsonnet-bundler +gocd/templates/vendor/ diff --git a/Makefile b/Makefile index 14bc82d0ea..47a8d1fe2a 100644 --- a/Makefile +++ b/Makefile @@ -176,3 +176,13 @@ clean-target-dir: help: ## this help @ awk 'BEGIN {FS = ":.*##"; printf "Usage: make \033[36m\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m\t%s\n", $$1, $$2 }' $(MAKEFILE_LIST) | column -s$$'\t' -t .PHONY: help + +gocd: ## Build GoCD pipelines + @ rm -rf ./gocd/generated-pipelines + @ mkdir -p ./gocd/generated-pipelines + @ cd ./gocd/templates && jb install + @ find . -type f \( -name '*.libsonnet' -o -name '*.jsonnet' \) -print0 | xargs -n 1 -0 jsonnetfmt -i + @ find . -type f \( -name '*.libsonnet' -o -name '*.jsonnet' \) -print0 | xargs -n 1 -0 jsonnet-lint -J ./gocd/templates/vendor + @ cd ./gocd/templates && jsonnet -J vendor -m ../generated-pipelines ./relay.jsonnet + @ cd ./gocd/generated-pipelines && find . -type f \( -name '*.yaml' \) -print0 | xargs -n 1 -0 yq -p json -o yaml -i +.PHONY: gocd diff --git a/gocd/README.md b/gocd/README.md new file mode 100644 index 0000000000..7200a5aae4 --- /dev/null +++ b/gocd/README.md @@ -0,0 +1,59 @@ +# Relay Pipelines + +Relay is in the process of moving to a set of rendered jsonnet pipelines. + +## Jsonnet + +You can render the jsonnet pipelines by running: + +``` +make gocd +``` + +This will clean, fmt, lint and generate the GoCD pipelines to +`./gocd/generated-pipelines`. + + +The Relay pipelines are using the https://github.com/getsentry/gocd-jsonnet +libraries to generate the pipeline for each region. + +## Files + +Below is a description of the directories in the `gocd/` directory. + +### `gocd/templates/` + +These are a set of jsonnet and libsonnet files which are used +to generate the relay pipelines. This avoids duplication across +our GoCD pipeline files as we deploy to multiple regions. + +The `gocd/templates/relay.jsonnet` file is the entry point for the +relay pipelines. + +`gocd/templates/libs/*.libsonnet` define the pipeline behaviors for +deploy relay and relay-pops. These libraries are used to create a +GoCD pipeline, following the same naming as the +[GoCD yaml pipelines](https://github.com/tomzo/gocd-yaml-config-plugin#readme). + +`gocd/templates/bash/*.sh` are shell scripts that are inlined in the +result pipelines. This seperation means syntax highlighting and +extra tooling works for relay's bash scripts. + +`gocd/templates/jsonnetfile.json` and `gocd/templates/jsonnetfile.lock.json` +are used by [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler#readme), a package manager for jsonnet. + +You can update jsonnet dependencies by runnning `jb update`. + +### `gocd/generated-pipelines/` + +The current setup of GoCD at sentry is only able to look for +yaml pipelines in a repo, so relay has to commit the generated +pipelines. + +The dev-infra team is working on a GoCD plugin that will accept +the jsonnet directly, removing the need for the generated-pipelines. + +### `gocd/pipelines/` + +These are the original relay pipelines and will be used until we move +to the jsonnet pipelines. diff --git a/gocd/generated-pipelines/relay-next-monitor.yaml b/gocd/generated-pipelines/relay-next-monitor.yaml new file mode 100644 index 0000000000..1b82128a7a --- /dev/null +++ b/gocd/generated-pipelines/relay-next-monitor.yaml @@ -0,0 +1,109 @@ +format_version: 10 +pipelines: + deploy-relay-next-monitor: + display_order: 2 + environment_variables: + SENTRY_REGION: monitor + group: relay-next + lock_behavior: unlockWhenFinished + materials: + deploy-relay-next-us-pipeline-complete: + pipeline: deploy-relay-next-us + stage: pipeline-complete + relay_repo: + branch: master + destination: relay + git: git@github.com:getsentry/relay.git + shallow_clone: true + stages: + - checks: + fetch_materials: true + jobs: + checks: + elastic_profile_id: relay + environment_variables: + GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}' + tasks: + - script: | + ##!/bin/bash + + /devinfra/scripts/checks/githubactions/checkruns.py \ + getsentry/relay \ + "${GO_REVISION_RELAY_REPO}" \ + "Integration Tests" \ + "Test (macos-latest)" \ + "Test (windows-latest)" \ + "Test All Features (ubuntu-latest)" \ + "Push GCR Docker Image" + timeout: 1800 + - deploy-production: + fetch_materials: true + jobs: + create_sentry_release: + elastic_profile_id: relay + environment_variables: + SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][relay_sentry_auth_token]}}' + SENTRY_ORG: sentry + SENTRY_PROJECT: relay + SENTRY_URL: https://sentry.my.sentry.io/ + tasks: + - script: | + ##!/bin/bash + + ./relay/scripts/create-sentry-release "${GO_REVISION_RELAY_REPO}" + timeout: 1200 + deploy: + elastic_profile_id: relay + tasks: + - script: | + ##!/bin/bash + + eval $(/devinfra/scripts/regions/project_env_vars.py --region="${SENTRY_REGION}") + + /devinfra/scripts/k8s/k8stunnel + + /devinfra/scripts/k8s/k8s-deploy.py \ + --label-selector="service=relay,deploy_if_production=true" \ + --image="us.gcr.io/sentryio/relay:${GO_REVISION_RELAY_REPO}" \ + --container-name="relay" + timeout: 1200 + - progress-to-pops: + approval: + allow_only_on_success: true + type: manual + jobs: + progress-to-pops: + elastic_profile_id: relay + tasks: + - exec: + command: true + timeout: 1200 + - deploy-pops: + fetch_materials: true + jobs: + deploy-pops-monitor: + elastic_profile_id: relay-pop + environment_variables: + SENTRY_REGION: monitor + tasks: + - script: | + ##!/bin/bash + + eval $(/devinfra/scripts/regions/project_env_vars.py --region="${SENTRY_REGION}") + + /devinfra/scripts/k8s/k8stunnel + + /devinfra/scripts/k8s/k8s-deploy.py \ + --label-selector="service=relay-pop" \ + --image="us.gcr.io/sentryio/relay:${GO_REVISION_RELAY_REPO}" \ + --container-name="relay" + timeout: 1200 + - pipeline-complete: + approval: + allow_only_on_success: true + type: success + jobs: + pipeline-complete: + tasks: + - exec: + command: true diff --git a/gocd/generated-pipelines/relay-next-us.yaml b/gocd/generated-pipelines/relay-next-us.yaml new file mode 100644 index 0000000000..ccffe5ae4c --- /dev/null +++ b/gocd/generated-pipelines/relay-next-us.yaml @@ -0,0 +1,173 @@ +format_version: 10 +pipelines: + deploy-relay-next-us: + display_order: 1 + environment_variables: + SENTRY_REGION: us + group: relay-next + lock_behavior: unlockWhenFinished + materials: + deploy-relay-next-pipeline-complete: + pipeline: deploy-relay-next + stage: pipeline-complete + relay_repo: + branch: master + destination: relay + git: git@github.com:getsentry/relay.git + shallow_clone: true + stages: + - checks: + fetch_materials: true + jobs: + checks: + elastic_profile_id: relay + environment_variables: + GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}' + tasks: + - script: | + ##!/bin/bash + + /devinfra/scripts/checks/githubactions/checkruns.py \ + getsentry/relay \ + "${GO_REVISION_RELAY_REPO}" \ + "Integration Tests" \ + "Test (macos-latest)" \ + "Test (windows-latest)" \ + "Test All Features (ubuntu-latest)" \ + "Push GCR Docker Image" + timeout: 1800 + - deploy-production: + fetch_materials: true + jobs: + create_sentry_release: + elastic_profile_id: relay + environment_variables: + SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][relay_sentry_auth_token]}}' + SENTRY_ORG: sentry + SENTRY_PROJECT: relay + SENTRY_URL: https://sentry.my.sentry.io/ + tasks: + - script: | + ##!/bin/bash + + ./relay/scripts/create-sentry-release "${GO_REVISION_RELAY_REPO}" + timeout: 1200 + deploy: + elastic_profile_id: relay + tasks: + - script: | + ##!/bin/bash + + eval $(/devinfra/scripts/regions/project_env_vars.py --region="${SENTRY_REGION}") + + /devinfra/scripts/k8s/k8stunnel + + /devinfra/scripts/k8s/k8s-deploy.py \ + --label-selector="service=relay,deploy_if_production=true" \ + --image="us.gcr.io/sentryio/relay:${GO_REVISION_RELAY_REPO}" \ + --container-name="relay" + timeout: 1200 + - progress-to-pops: + approval: + allow_only_on_success: true + type: manual + jobs: + progress-to-pops: + elastic_profile_id: relay + tasks: + - exec: + command: true + timeout: 1200 + - deploy-pops: + fetch_materials: true + jobs: + create_sentry_release: + elastic_profile_id: relay + environment_variables: + SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][relay_sentry_auth_token]}}' + SENTRY_ORG: sentry + SENTRY_PROJECT: pop-relay + SENTRY_URL: https://sentry.my.sentry.io/ + tasks: + - script: | + ##!/bin/bash + + ./relay/scripts/create-sentry-release "${GO_REVISION_RELAY_REPO}" + timeout: 1200 + deploy-pops-us-pop-1: + elastic_profile_id: relay-pop + environment_variables: + SENTRY_REGION: us-pop-1 + tasks: + - script: | + ##!/bin/bash + + eval $(/devinfra/scripts/regions/project_env_vars.py --region="${SENTRY_REGION}") + + /devinfra/scripts/k8s/k8stunnel + + /devinfra/scripts/k8s/k8s-deploy.py \ + --label-selector="service=relay-pop" \ + --image="us.gcr.io/sentryio/relay:${GO_REVISION_RELAY_REPO}" \ + --container-name="relay" + timeout: 1200 + deploy-pops-us-pop-2: + elastic_profile_id: relay-pop + environment_variables: + SENTRY_REGION: us-pop-2 + tasks: + - script: | + ##!/bin/bash + + eval $(/devinfra/scripts/regions/project_env_vars.py --region="${SENTRY_REGION}") + + /devinfra/scripts/k8s/k8stunnel + + /devinfra/scripts/k8s/k8s-deploy.py \ + --label-selector="service=relay-pop" \ + --image="us.gcr.io/sentryio/relay:${GO_REVISION_RELAY_REPO}" \ + --container-name="relay" + timeout: 1200 + deploy-pops-us-pop-3: + elastic_profile_id: relay-pop + environment_variables: + SENTRY_REGION: us-pop-3 + tasks: + - script: | + ##!/bin/bash + + eval $(/devinfra/scripts/regions/project_env_vars.py --region="${SENTRY_REGION}") + + /devinfra/scripts/k8s/k8stunnel + + /devinfra/scripts/k8s/k8s-deploy.py \ + --label-selector="service=relay-pop" \ + --image="us.gcr.io/sentryio/relay:${GO_REVISION_RELAY_REPO}" \ + --container-name="relay" + timeout: 1200 + deploy-pops-us-pop-4: + elastic_profile_id: relay-pop + environment_variables: + SENTRY_REGION: us-pop-4 + tasks: + - script: | + ##!/bin/bash + + eval $(/devinfra/scripts/regions/project_env_vars.py --region="${SENTRY_REGION}") + + /devinfra/scripts/k8s/k8stunnel + + /devinfra/scripts/k8s/k8s-deploy.py \ + --label-selector="service=relay-pop" \ + --image="us.gcr.io/sentryio/relay:${GO_REVISION_RELAY_REPO}" \ + --container-name="relay" + timeout: 1200 + - pipeline-complete: + approval: + allow_only_on_success: true + type: success + jobs: + pipeline-complete: + tasks: + - exec: + command: true diff --git a/gocd/generated-pipelines/relay-next.yaml b/gocd/generated-pipelines/relay-next.yaml new file mode 100644 index 0000000000..913313b882 --- /dev/null +++ b/gocd/generated-pipelines/relay-next.yaml @@ -0,0 +1,21 @@ +format_version: 10 +pipelines: + deploy-relay-next: + display_order: 0 + group: relay-next + lock_behavior: unlockWhenFinished + materials: + relay_repo: + branch: master + destination: relay + git: git@github.com:getsentry/relay.git + shallow_clone: true + stages: + - pipeline-complete: + approval: + type: manual + jobs: + pipeline-complete: + tasks: + - exec: + command: true diff --git a/gocd/templates/bash/create-sentry-release.sh b/gocd/templates/bash/create-sentry-release.sh new file mode 100644 index 0000000000..6a12581f2b --- /dev/null +++ b/gocd/templates/bash/create-sentry-release.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./relay/scripts/create-sentry-release "${GO_REVISION_RELAY_REPO}" diff --git a/gocd/templates/bash/deploy-pop.sh b/gocd/templates/bash/deploy-pop.sh new file mode 100644 index 0000000000..9dbf8e1419 --- /dev/null +++ b/gocd/templates/bash/deploy-pop.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +eval $(/devinfra/scripts/regions/project_env_vars.py --region="${SENTRY_REGION}") + +/devinfra/scripts/k8s/k8stunnel + +/devinfra/scripts/k8s/k8s-deploy.py \ + --label-selector="service=relay-pop" \ + --image="us.gcr.io/sentryio/relay:${GO_REVISION_RELAY_REPO}" \ + --container-name="relay" diff --git a/gocd/templates/bash/deploy-relay.sh b/gocd/templates/bash/deploy-relay.sh new file mode 100644 index 0000000000..307f489396 --- /dev/null +++ b/gocd/templates/bash/deploy-relay.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +eval $(/devinfra/scripts/regions/project_env_vars.py --region="${SENTRY_REGION}") + +/devinfra/scripts/k8s/k8stunnel + +/devinfra/scripts/k8s/k8s-deploy.py \ + --label-selector="service=relay,deploy_if_production=true" \ + --image="us.gcr.io/sentryio/relay:${GO_REVISION_RELAY_REPO}" \ + --container-name="relay" diff --git a/gocd/templates/bash/github-check-runs.sh b/gocd/templates/bash/github-check-runs.sh new file mode 100644 index 0000000000..27f3b962cb --- /dev/null +++ b/gocd/templates/bash/github-check-runs.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +/devinfra/scripts/checks/githubactions/checkruns.py \ + getsentry/relay \ + "${GO_REVISION_RELAY_REPO}" \ + "Integration Tests" \ + "Test (macos-latest)" \ + "Test (windows-latest)" \ + "Test All Features (ubuntu-latest)" \ + "Push GCR Docker Image" diff --git a/gocd/templates/jsonnetfile.json b/gocd/templates/jsonnetfile.json new file mode 100644 index 0000000000..c05e780858 --- /dev/null +++ b/gocd/templates/jsonnetfile.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "dependencies": [ + { + "source": { + "git": { + "remote": "https://github.com/getsentry/gocd-jsonnet.git", + "subdir": "v1.0.0" + } + }, + "version": "main" + } + ], + "legacyImports": true +} diff --git a/gocd/templates/jsonnetfile.lock.json b/gocd/templates/jsonnetfile.lock.json new file mode 100644 index 0000000000..b5361cb8d5 --- /dev/null +++ b/gocd/templates/jsonnetfile.lock.json @@ -0,0 +1,16 @@ +{ + "version": 1, + "dependencies": [ + { + "source": { + "git": { + "remote": "https://github.com/getsentry/gocd-jsonnet.git", + "subdir": "v1.0.0" + } + }, + "version": "7636a8579792e6e1e66b0b567583e5e05764c39f", + "sum": "eOpSoGZ9y3+6O3qllOXVBdiHfQ2xwcnAJWqlE4k3Rj8=" + } + ], + "legacyImports": false +} diff --git a/gocd/templates/libs/relay-pops.libsonnet b/gocd/templates/libs/relay-pops.libsonnet new file mode 100644 index 0000000000..2d1076c62e --- /dev/null +++ b/gocd/templates/libs/relay-pops.libsonnet @@ -0,0 +1,76 @@ +local STAGE_NAME = 'deploy-pops'; +local gocdtasks = import 'github.com/getsentry/gocd-jsonnet/v1.0.0/gocd-tasks.libsonnet'; + +// Create a gocd job that will run the deploy-pop script +local deploy_pop_job(region) = + { + timeout: 1200, + elastic_profile_id: 'relay-pop', + environment_variables: { + SENTRY_REGION: region, + }, + tasks: [ + gocdtasks.script(importstr '../bash/deploy-pop.sh'), + ], + }; + +// Iterate over a list of regions and create a job for each +local deploy_pop_jobs(regions) = + { + [STAGE_NAME + '-' + region]: deploy_pop_job(region) + for region in regions + }; + +local us_pops_stage() = + { + [STAGE_NAME]: { + fetch_materials: true, + jobs: { + // PoPs have their own Sentry project, which requires separate symbol upload via + // create-sentry-release. They could be moved into the same project with a different + // environment to avoid this. + create_sentry_release: { + timeout: 1200, + elastic_profile_id: 'relay', + environment_variables: { + SENTRY_ORG: 'sentry', + SENTRY_PROJECT: 'pop-relay', + SENTRY_URL: 'https://sentry.my.sentry.io/', + // Temporary; self-service encrypted secrets aren't implemented yet. + // This should really be rotated to an internal integration token. + SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][relay_sentry_auth_token]}}', + }, + tasks: [ + gocdtasks.script(importstr '../bash/create-sentry-release.sh'), + ], + }, + }, + }, + } { + [STAGE_NAME]+: { + jobs+: deploy_pop_jobs([ + 'us-pop-1', + 'us-pop-2', + 'us-pop-3', + 'us-pop-4', + ]), + }, + }; + +local generic_pops_stage(region) = + { + [STAGE_NAME]: { + fetch_materials: true, + jobs: deploy_pop_jobs([region]), + }, + }; + +// The US region deploys create a sentry release and deploys to a number +// of clusters, other regions only deploy to a single cluster. +{ + stage(region):: + if region == 'us' then + us_pops_stage() + else + generic_pops_stage(region), +} diff --git a/gocd/templates/libs/relay.libsonnet b/gocd/templates/libs/relay.libsonnet new file mode 100644 index 0000000000..48fa2a59c8 --- /dev/null +++ b/gocd/templates/libs/relay.libsonnet @@ -0,0 +1,91 @@ +local pops = import './relay-pops.libsonnet'; +local gocdtasks = import 'github.com/getsentry/gocd-jsonnet/v1.0.0/gocd-tasks.libsonnet'; + +function(region) { + environment_variables: { + SENTRY_REGION: region, + }, + group: 'relay-next', + lock_behavior: 'unlockWhenFinished', + materials: { + relay_repo: { + git: 'git@github.com:getsentry/relay.git', + shallow_clone: true, + branch: 'master', + destination: 'relay', + }, + }, + stages: [ + + // Check that github status is good + { + checks: { + fetch_materials: true, + jobs: { + checks: { + environment_variables: { + GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}', + }, + timeout: 1800, + elastic_profile_id: 'relay', + tasks: [ + gocdtasks.script(importstr '../bash/github-check-runs.sh'), + ], + }, + }, + }, + }, + + // Deploy relay + { + 'deploy-production': { + fetch_materials: true, + jobs: { + create_sentry_release: { + environment_variables: { + SENTRY_ORG: 'sentry', + SENTRY_PROJECT: 'relay', + SENTRY_URL: 'https://sentry.my.sentry.io/', + // Temporary; self-service encrypted secrets aren't implemented yet. + // This should really be rotated to an internal integration token. + SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][relay_sentry_auth_token]}}', + }, + timeout: 1200, + elastic_profile_id: 'relay', + tasks: [ + gocdtasks.script(importstr '../bash/create-sentry-release.sh'), + ], + }, + deploy: { + timeout: 1200, + elastic_profile_id: 'relay', + tasks: [ + gocdtasks.script(importstr '../bash/deploy-relay.sh'), + ], + }, + }, + }, + }, + + { + 'progress-to-pops': { + approval: { + type: 'manual', + allow_only_on_success: true, + }, + jobs: { + 'progress-to-pops': { + timeout: 1200, + elastic_profile_id: 'relay', + tasks: [ + gocdtasks.noop, + ], + }, + }, + }, + }, + ] + [ + // Append the relay-pops deployment stages + pops.stage(region), + ], +} diff --git a/gocd/templates/relay.jsonnet b/gocd/templates/relay.jsonnet new file mode 100644 index 0000000000..0291ac8021 --- /dev/null +++ b/gocd/templates/relay.jsonnet @@ -0,0 +1,17 @@ +local relay = import './libs/relay.libsonnet'; +local pipedream = import 'github.com/getsentry/gocd-jsonnet/v1.0.0/pipedream.libsonnet'; + +local pipedream_config = { + name: 'relay-next', + auto_deploy: false, + materials: { + relay_repo: { + git: 'git@github.com:getsentry/relay.git', + shallow_clone: true, + branch: 'master', + destination: 'relay', + }, + }, +}; + +pipedream.render(pipedream_config, relay)