diff --git a/.github/workflows/validate-pipelines.yml b/.github/workflows/validate-pipelines.yml index d40a6e9d2..4002e4ac9 100644 --- a/.github/workflows/validate-pipelines.yml +++ b/.github/workflows/validate-pipelines.yml @@ -27,22 +27,6 @@ jobs: - 'gocd/**' - '.github/workflows/validate-pipelines.yml' - render: - if: needs.files-changed.outputs.gocd == 'true' - needs: files-changed - name: Render GoCD Pipelines with Jsonnet - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - - uses: getsentry/action-gocd-jsonnet@v1 - with: - jb-install: true - check-for-changes: true - convert-to-yaml: true - jsonnet-dir: gocd/templates - generated-dir: gocd/generated-pipelines - render-as-single-file: false - validate: if: needs.files-changed.outputs.gocd == 'true' needs: files-changed @@ -67,10 +51,8 @@ jobs: - uses: getsentry/action-gocd-jsonnet@v1 with: jb-install: true - convert-to-yaml: true jsonnet-dir: gocd/templates generated-dir: gocd/generated-pipelines - render-as-single-file: true - uses: getsentry/action-validate-gocd-pipelines@v1 with: configrepo: symbolicator__master diff --git a/.gitignore b/.gitignore index f74aa5a28..fcd4a8a20 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,6 @@ site # New test snapshots *.snap.new +# GoCD gocd/templates/vendor/ +gocd/generated-pipelines/ diff --git a/gocd/README.md b/gocd/README.md index 56d9148bd..a1e2a3665 100644 --- a/gocd/README.md +++ b/gocd/README.md @@ -2,18 +2,25 @@ Symbolicator pipelines are rendered using jsonnet. +## Dependencies + +You'll need the following dependencies to build the pipelines: + +```sh +brew install go-jsonnet jsonnet-bundler yq +``` + ## Jsonnet You can render the jsonnet pipelines by running: -``` +```sh make gocd ``` This will clean, fmt, lint and generate the GoCD pipelines to `./gocd/generated-pipelines`. - The pipelines are using the https://github.com/getsentry/gocd-jsonnet libraries to generate the pipeline for each region. @@ -45,15 +52,5 @@ 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 the genered pipelines have the be -commited. - -The dev-infra team is working on a GoCD plugin that will accept -the jsonnet directly, removing the need for commiting the -generated-pipelines. - -### `gocd/pipelines/` - -These are the original pipelines and will be used until we move -to the jsonnet pipelines. +GoCD generates pipelines using the jsonnet files directly, hence why +the generated pipelines are part of the gitignore. diff --git a/gocd/generated-pipelines/rollback-symbolicator.yaml b/gocd/generated-pipelines/rollback-symbolicator.yaml deleted file mode 100644 index d4d4be631..000000000 --- a/gocd/generated-pipelines/rollback-symbolicator.yaml +++ /dev/null @@ -1,43 +0,0 @@ -format_version: 10 -pipelines: - rollback-symbolicator: - display_order: 1 - environment_variables: - ALL_PIPELINE_FLAGS: --pipeline=deploy-symbolicator-s4s --pipeline=deploy-symbolicator-us --pipeline=deploy-symbolicator-customer-1 --pipeline=deploy-symbolicator-customer-2 --pipeline=deploy-symbolicator-customer-3 --pipeline=deploy-symbolicator-customer-4 --pipeline=deploy-symbolicator - GOCD_ACCESS_TOKEN: '{{SECRET:[devinfra][gocd_access_token]}}' - REGION_PIPELINE_FLAGS: --pipeline=deploy-symbolicator-s4s --pipeline=deploy-symbolicator-us --pipeline=deploy-symbolicator-customer-1 --pipeline=deploy-symbolicator-customer-2 --pipeline=deploy-symbolicator-customer-3 --pipeline=deploy-symbolicator-customer-4 - ROLLBACK_MATERIAL_NAME: symbolicator_repo - ROLLBACK_STAGE: deploy_primary - group: symbolicator - lock_behavior: unlockWhenFinished - materials: - deploy-symbolicator-customer-4-pipeline-complete: - pipeline: deploy-symbolicator-customer-4 - stage: pipeline-complete - stages: - - pause_pipelines: - approval: - type: manual - jobs: - rollback: - elastic_profile_id: symbolicator - tasks: - - script: | - ##!/bin/bash - - ## Note: $ALL_PIPELINE_FLAGS has no quoting, for word expansion - ## shellcheck disable=SC2086 - if [[ "${ALL_PIPELINE_FLAGS:-}" ]]; then - set -- $ALL_PIPELINE_FLAGS - fi - - ## Pause all pipelines in the pipedream - gocd-pause-and-cancel-pipelines \ - --pause-message="This pipeline is being rolled back, please check with team before un-pausing." \ - "$@" - - start_rollback: - jobs: - rollback: - elastic_profile_id: symbolicator - tasks: - - script: "##!/bin/bash\n\n## Note: $REGION_PIPELINE_FLAGS has no quoting, for word expansion\n## shellcheck disable=SC2086\nif [[ \"${REGION_PIPELINE_FLAGS:-}\" ]]; then\n set -- $REGION_PIPELINE_FLAGS\nfi\n\n## Get sha from the given pipeline run to deploy to all pipedream pipelines.\nsha=$(gocd-sha-for-pipeline --material-name=\"${ROLLBACK_MATERIAL_NAME}\")\n\necho \"\U0001F4D1 Rolling back to sha: ${sha}\"\n\ngocd-emergency-deploy \\\n --material-name=\"${ROLLBACK_MATERIAL_NAME}\" \\\n --commit-sha=\"${sha}\" \\\n --deploy-stage=\"${ROLLBACK_STAGE}\" \\\n --pause-message=\"This pipeline was rolled back, please check with team before un-pausing.\" \\\n \"$@\"\n" diff --git a/gocd/generated-pipelines/symbolicator-customer-1.yaml b/gocd/generated-pipelines/symbolicator-customer-1.yaml deleted file mode 100644 index 7c4f7d0d9..000000000 --- a/gocd/generated-pipelines/symbolicator-customer-1.yaml +++ /dev/null @@ -1,83 +0,0 @@ -format_version: 10 -pipelines: - deploy-symbolicator-customer-1: - display_order: 4 - environment_variables: - SENTRY_REGION: customer-1 - group: symbolicator - lock_behavior: unlockWhenFinished - materials: - deploy-symbolicator-us-pipeline-complete: - pipeline: deploy-symbolicator-us - stage: pipeline-complete - symbolicator_repo: - branch: master - destination: symbolicator - git: git@github.com:getsentry/symbolicator.git - shallow_clone: true - stages: - - checks: - environment_variables: - GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}' - fetch_materials: true - jobs: - checks: - elastic_profile_id: symbolicator - tasks: - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/githubactions/checkruns.py \ - getsentry/symbolicator \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - 'Tests' \ - 'Sentry-Symbolicator Tests' - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/googlecloud/checkcloudbuild.py \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - sentryio \ - "us.gcr.io/sentryio/symbolicator" - timeout: 1200 - - deploy_primary: - fetch_materials: true - jobs: - create_sentry_release: - elastic_profile_id: symbolicator - environment_variables: - ENVIRONMENT: production - SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][symbolicator_sentry_auth_token]}}' - SENTRY_URL: https://sentry.my.sentry.io/ - tasks: - - script: | - ##!/bin/bash - - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - timeout: 1200 - deploy: - elastic_profile_id: symbolicator - environment_variables: - LABEL_SELECTOR: service=symbolicator - 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 \ - --type="statefulset" \ - --label-selector="${LABEL_SELECTOR}" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" - 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/symbolicator-customer-2.yaml b/gocd/generated-pipelines/symbolicator-customer-2.yaml deleted file mode 100644 index 3072c0d68..000000000 --- a/gocd/generated-pipelines/symbolicator-customer-2.yaml +++ /dev/null @@ -1,83 +0,0 @@ -format_version: 10 -pipelines: - deploy-symbolicator-customer-2: - display_order: 5 - environment_variables: - SENTRY_REGION: customer-2 - group: symbolicator - lock_behavior: unlockWhenFinished - materials: - deploy-symbolicator-customer-1-pipeline-complete: - pipeline: deploy-symbolicator-customer-1 - stage: pipeline-complete - symbolicator_repo: - branch: master - destination: symbolicator - git: git@github.com:getsentry/symbolicator.git - shallow_clone: true - stages: - - checks: - environment_variables: - GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}' - fetch_materials: true - jobs: - checks: - elastic_profile_id: symbolicator - tasks: - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/githubactions/checkruns.py \ - getsentry/symbolicator \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - 'Tests' \ - 'Sentry-Symbolicator Tests' - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/googlecloud/checkcloudbuild.py \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - sentryio \ - "us.gcr.io/sentryio/symbolicator" - timeout: 1200 - - deploy_primary: - fetch_materials: true - jobs: - create_sentry_release: - elastic_profile_id: symbolicator - environment_variables: - ENVIRONMENT: production - SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][symbolicator_sentry_auth_token]}}' - SENTRY_URL: https://sentry.my.sentry.io/ - tasks: - - script: | - ##!/bin/bash - - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - timeout: 1200 - deploy: - elastic_profile_id: symbolicator - environment_variables: - LABEL_SELECTOR: service=symbolicator - 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 \ - --type="statefulset" \ - --label-selector="${LABEL_SELECTOR}" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" - 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/symbolicator-customer-3.yaml b/gocd/generated-pipelines/symbolicator-customer-3.yaml deleted file mode 100644 index 17b0c54e7..000000000 --- a/gocd/generated-pipelines/symbolicator-customer-3.yaml +++ /dev/null @@ -1,83 +0,0 @@ -format_version: 10 -pipelines: - deploy-symbolicator-customer-3: - display_order: 6 - environment_variables: - SENTRY_REGION: customer-3 - group: symbolicator - lock_behavior: unlockWhenFinished - materials: - deploy-symbolicator-customer-2-pipeline-complete: - pipeline: deploy-symbolicator-customer-2 - stage: pipeline-complete - symbolicator_repo: - branch: master - destination: symbolicator - git: git@github.com:getsentry/symbolicator.git - shallow_clone: true - stages: - - checks: - environment_variables: - GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}' - fetch_materials: true - jobs: - checks: - elastic_profile_id: symbolicator - tasks: - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/githubactions/checkruns.py \ - getsentry/symbolicator \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - 'Tests' \ - 'Sentry-Symbolicator Tests' - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/googlecloud/checkcloudbuild.py \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - sentryio \ - "us.gcr.io/sentryio/symbolicator" - timeout: 1200 - - deploy_primary: - fetch_materials: true - jobs: - create_sentry_release: - elastic_profile_id: symbolicator - environment_variables: - ENVIRONMENT: production - SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][symbolicator_sentry_auth_token]}}' - SENTRY_URL: https://sentry.my.sentry.io/ - tasks: - - script: | - ##!/bin/bash - - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - timeout: 1200 - deploy: - elastic_profile_id: symbolicator - environment_variables: - LABEL_SELECTOR: service=symbolicator - 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 \ - --type="statefulset" \ - --label-selector="${LABEL_SELECTOR}" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" - 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/symbolicator-customer-4.yaml b/gocd/generated-pipelines/symbolicator-customer-4.yaml deleted file mode 100644 index 3deaba5de..000000000 --- a/gocd/generated-pipelines/symbolicator-customer-4.yaml +++ /dev/null @@ -1,83 +0,0 @@ -format_version: 10 -pipelines: - deploy-symbolicator-customer-4: - display_order: 7 - environment_variables: - SENTRY_REGION: customer-4 - group: symbolicator - lock_behavior: unlockWhenFinished - materials: - deploy-symbolicator-customer-3-pipeline-complete: - pipeline: deploy-symbolicator-customer-3 - stage: pipeline-complete - symbolicator_repo: - branch: master - destination: symbolicator - git: git@github.com:getsentry/symbolicator.git - shallow_clone: true - stages: - - checks: - environment_variables: - GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}' - fetch_materials: true - jobs: - checks: - elastic_profile_id: symbolicator - tasks: - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/githubactions/checkruns.py \ - getsentry/symbolicator \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - 'Tests' \ - 'Sentry-Symbolicator Tests' - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/googlecloud/checkcloudbuild.py \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - sentryio \ - "us.gcr.io/sentryio/symbolicator" - timeout: 1200 - - deploy_primary: - fetch_materials: true - jobs: - create_sentry_release: - elastic_profile_id: symbolicator - environment_variables: - ENVIRONMENT: production - SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][symbolicator_sentry_auth_token]}}' - SENTRY_URL: https://sentry.my.sentry.io/ - tasks: - - script: | - ##!/bin/bash - - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - timeout: 1200 - deploy: - elastic_profile_id: symbolicator - environment_variables: - LABEL_SELECTOR: service=symbolicator - 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 \ - --type="statefulset" \ - --label-selector="${LABEL_SELECTOR}" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" - 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/symbolicator-customer-5.yaml b/gocd/generated-pipelines/symbolicator-customer-5.yaml deleted file mode 100644 index 49fffe7b8..000000000 --- a/gocd/generated-pipelines/symbolicator-customer-5.yaml +++ /dev/null @@ -1,83 +0,0 @@ -format_version: 10 -pipelines: - deploy-symbolicator-customer-5: - display_order: 8 - environment_variables: - SENTRY_REGION: customer-5 - group: symbolicator - lock_behavior: unlockWhenFinished - materials: - deploy-symbolicator-pipeline-complete: - pipeline: deploy-symbolicator - stage: pipeline-complete - symbolicator_repo: - branch: master - destination: symbolicator - git: git@github.com:getsentry/symbolicator.git - shallow_clone: true - stages: - - checks: - environment_variables: - GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}' - fetch_materials: true - jobs: - checks: - elastic_profile_id: symbolicator - tasks: - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/githubactions/checkruns.py \ - getsentry/symbolicator \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - 'Tests' \ - 'Sentry-Symbolicator Tests' - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/googlecloud/checkcloudbuild.py \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - sentryio \ - "us.gcr.io/sentryio/symbolicator" - timeout: 1200 - - deploy_primary: - fetch_materials: true - jobs: - create_sentry_release: - elastic_profile_id: symbolicator - environment_variables: - ENVIRONMENT: production - SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][symbolicator_sentry_auth_token]}}' - SENTRY_URL: https://sentry.my.sentry.io/ - tasks: - - script: | - ##!/bin/bash - - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - timeout: 1200 - deploy: - elastic_profile_id: symbolicator - environment_variables: - LABEL_SELECTOR: service=symbolicator - 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 \ - --type="statefulset" \ - --label-selector="${LABEL_SELECTOR}" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" - 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/symbolicator-customer-6.yaml b/gocd/generated-pipelines/symbolicator-customer-6.yaml deleted file mode 100644 index 9bd1f1e0d..000000000 --- a/gocd/generated-pipelines/symbolicator-customer-6.yaml +++ /dev/null @@ -1,83 +0,0 @@ -format_version: 10 -pipelines: - deploy-symbolicator-customer-6: - display_order: 9 - environment_variables: - SENTRY_REGION: customer-6 - group: symbolicator - lock_behavior: unlockWhenFinished - materials: - deploy-symbolicator-pipeline-complete: - pipeline: deploy-symbolicator - stage: pipeline-complete - symbolicator_repo: - branch: master - destination: symbolicator - git: git@github.com:getsentry/symbolicator.git - shallow_clone: true - stages: - - checks: - environment_variables: - GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}' - fetch_materials: true - jobs: - checks: - elastic_profile_id: symbolicator - tasks: - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/githubactions/checkruns.py \ - getsentry/symbolicator \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - 'Tests' \ - 'Sentry-Symbolicator Tests' - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/googlecloud/checkcloudbuild.py \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - sentryio \ - "us.gcr.io/sentryio/symbolicator" - timeout: 1200 - - deploy_primary: - fetch_materials: true - jobs: - create_sentry_release: - elastic_profile_id: symbolicator - environment_variables: - ENVIRONMENT: production - SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][symbolicator_sentry_auth_token]}}' - SENTRY_URL: https://sentry.my.sentry.io/ - tasks: - - script: | - ##!/bin/bash - - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - timeout: 1200 - deploy: - elastic_profile_id: symbolicator - environment_variables: - LABEL_SELECTOR: service=symbolicator - 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 \ - --type="statefulset" \ - --label-selector="${LABEL_SELECTOR}" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" - 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/symbolicator-s4s.yaml b/gocd/generated-pipelines/symbolicator-s4s.yaml deleted file mode 100644 index 322aeb940..000000000 --- a/gocd/generated-pipelines/symbolicator-s4s.yaml +++ /dev/null @@ -1,83 +0,0 @@ -format_version: 10 -pipelines: - deploy-symbolicator-s4s: - display_order: 2 - environment_variables: - SENTRY_REGION: s4s - group: symbolicator - lock_behavior: unlockWhenFinished - materials: - deploy-symbolicator-pipeline-complete: - pipeline: deploy-symbolicator - stage: pipeline-complete - symbolicator_repo: - branch: master - destination: symbolicator - git: git@github.com:getsentry/symbolicator.git - shallow_clone: true - stages: - - checks: - environment_variables: - GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}' - fetch_materials: true - jobs: - checks: - elastic_profile_id: symbolicator - tasks: - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/githubactions/checkruns.py \ - getsentry/symbolicator \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - 'Tests' \ - 'Sentry-Symbolicator Tests' - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/googlecloud/checkcloudbuild.py \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - sentryio \ - "us.gcr.io/sentryio/symbolicator" - timeout: 1200 - - deploy_primary: - fetch_materials: true - jobs: - create_sentry_release: - elastic_profile_id: symbolicator - environment_variables: - ENVIRONMENT: production - SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][symbolicator_sentry_auth_token]}}' - SENTRY_URL: https://sentry.my.sentry.io/ - tasks: - - script: | - ##!/bin/bash - - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - timeout: 1200 - deploy: - elastic_profile_id: symbolicator - environment_variables: - LABEL_SELECTOR: service=symbolicator - 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 \ - --type="statefulset" \ - --label-selector="${LABEL_SELECTOR}" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" - 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/symbolicator-us.yaml b/gocd/generated-pipelines/symbolicator-us.yaml deleted file mode 100644 index bf78a8b92..000000000 --- a/gocd/generated-pipelines/symbolicator-us.yaml +++ /dev/null @@ -1,117 +0,0 @@ -format_version: 10 -pipelines: - deploy-symbolicator-us: - display_order: 3 - environment_variables: - SENTRY_REGION: us - group: symbolicator - lock_behavior: unlockWhenFinished - materials: - deploy-symbolicator-s4s-pipeline-complete: - pipeline: deploy-symbolicator-s4s - stage: pipeline-complete - symbolicator_repo: - branch: master - destination: symbolicator - git: git@github.com:getsentry/symbolicator.git - shallow_clone: true - stages: - - checks: - environment_variables: - GITHUB_TOKEN: '{{SECRET:[devinfra-github][token]}}' - fetch_materials: true - jobs: - checks: - elastic_profile_id: symbolicator - tasks: - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/githubactions/checkruns.py \ - getsentry/symbolicator \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - 'Tests' \ - 'Sentry-Symbolicator Tests' - - script: | - ##!/bin/bash - - /devinfra/scripts/checks/googlecloud/checkcloudbuild.py \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - sentryio \ - "us.gcr.io/sentryio/symbolicator" - timeout: 1200 - - deploy_canary: - fetch_materials: true - jobs: - create_sentry_release: - elastic_profile_id: symbolicator - environment_variables: - ENVIRONMENT: canary - SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][symbolicator_sentry_auth_token]}}' - SENTRY_URL: https://sentry.my.sentry.io/ - tasks: - - script: | - ##!/bin/bash - - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - timeout: 1200 - deploy: - elastic_profile_id: symbolicator - environment_variables: - LABEL_SELECTOR: service=symbolicator,deploy_if_canary=true - 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 \ - --type="statefulset" \ - --label-selector="${LABEL_SELECTOR}" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" - timeout: 1200 - - deploy_primary: - approval: - type: manual - fetch_materials: true - jobs: - create_sentry_release: - elastic_profile_id: symbolicator - environment_variables: - ENVIRONMENT: production - SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-temp][symbolicator_sentry_auth_token]}}' - SENTRY_URL: https://sentry.my.sentry.io/ - tasks: - - script: | - ##!/bin/bash - - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - timeout: 1200 - deploy: - elastic_profile_id: symbolicator - environment_variables: - LABEL_SELECTOR: service=symbolicator - 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 \ - --type="statefulset" \ - --label-selector="${LABEL_SELECTOR}" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" - 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/symbolicator.yaml b/gocd/generated-pipelines/symbolicator.yaml deleted file mode 100644 index 84231261e..000000000 --- a/gocd/generated-pipelines/symbolicator.yaml +++ /dev/null @@ -1,21 +0,0 @@ -format_version: 10 -pipelines: - deploy-symbolicator: - display_order: 0 - group: symbolicator - lock_behavior: unlockWhenFinished - materials: - symbolicator_repo: - branch: master - destination: symbolicator - git: git@github.com:getsentry/symbolicator.git - shallow_clone: true - stages: - - pipeline-complete: - approval: - type: manual - jobs: - pipeline-complete: - tasks: - - exec: - command: true diff --git a/gocd/pipelines/symbolicator.yaml b/gocd/pipelines/symbolicator.yaml deleted file mode 100644 index 8fc233e57..000000000 --- a/gocd/pipelines/symbolicator.yaml +++ /dev/null @@ -1,105 +0,0 @@ -# More information on gocd-flavor YAML can be found here: -# - https://github.com/tomzo/gocd-yaml-config-plugin#pipeline -# - https://www.notion.so/sentry/GoCD-New-Service-Quickstart-6d8db7a6964049b3b0e78b8a4b52e25d -format_version: 10 -pipelines: - deploy-symbolicator-old: - environment_variables: - GCP_PROJECT: internal-sentry - GKE_CLUSTER: zdpwkxst - GKE_REGION: us-central1 - GKE_CLUSTER_ZONE: b - GKE_BASTION_ZONE: b - group: symbolicator - display_order: 100 # Ensure it's last pipeline in UI - lock_behavior: unlockWhenFinished - materials: - symbolicator_repo: - git: git@github.com:getsentry/symbolicator.git - shallow_clone: true - branch: master - destination: symbolicator - stages: - - checks: - approval: - type: manual - fetch_materials: true - environment_variables: - # Required for checkruns. - GITHUB_TOKEN: "{{SECRET:[devinfra-github][token]}}" - jobs: - checks: - timeout: 1200 - elastic_profile_id: symbolicator - tasks: - - script: | - /devinfra/scripts/checks/githubactions/checkruns.py \ - getsentry/symbolicator \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - 'Tests' \ - 'Sentry-Symbolicator Tests' - - script: | - /devinfra/scripts/checks/googlecloud/checkcloudbuild.py \ - ${GO_REVISION_SYMBOLICATOR_REPO} \ - sentryio \ - "us.gcr.io/sentryio/symbolicator" - - deploy_canary: - approval: - type: manual - fetch_materials: true - jobs: - create_sentry_release: - environment_variables: - SENTRY_URL: "https://sentry.my.sentry.io/" - ENVIRONMENT: canary - # 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][symbolicator_sentry_auth_token]}}" - timeout: 1200 - elastic_profile_id: symbolicator - tasks: - - script: | - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - deploy: - timeout: 1200 - elastic_profile_id: symbolicator - tasks: - - script: | - /devinfra/scripts/k8s/k8stunnel \ - && /devinfra/scripts/k8s/k8s-deploy.py \ - --type="statefulset" \ - --label-selector="service=symbolicator,deploy_if_canary=true" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" - - deploy_production: - approval: - type: manual - fetch_materials: true - jobs: - create_sentry_release: - environment_variables: - SENTRY_URL: "https://sentry.my.sentry.io/" - ENVIRONMENT: production - # 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][symbolicator_sentry_auth_token]}}" - timeout: 1200 - elastic_profile_id: symbolicator - tasks: - - script: | - ./symbolicator/scripts/create-sentry-release "${GO_REVISION_SYMBOLICATOR_REPO}" "${ENVIRONMENT}" - deploy: - timeout: 1200 - elastic_profile_id: symbolicator - tasks: - # canary and lpq have the label `deploy_if_production=true`, so this - # will update all deployments. - - script: | - /devinfra/scripts/k8s/k8stunnel \ - && /devinfra/scripts/k8s/k8s-deploy.py \ - --type="statefulset" \ - --label-selector="service=symbolicator,deploy_if_production=true" \ - --image="us.gcr.io/sentryio/symbolicator:${GO_REVISION_SYMBOLICATOR_REPO}" \ - --container-name="symbolicator" \ - --container-name="cleanup" diff --git a/gocd/templates/jsonnetfile.json b/gocd/templates/jsonnetfile.json index cd72d9304..aac849aa0 100644 --- a/gocd/templates/jsonnetfile.json +++ b/gocd/templates/jsonnetfile.json @@ -8,7 +8,7 @@ "subdir": "libs" } }, - "version": "v1.4.2" + "version": "v1.5.1" } ], "legacyImports": true diff --git a/gocd/templates/jsonnetfile.lock.json b/gocd/templates/jsonnetfile.lock.json index d305a24f6..a0d938a01 100644 --- a/gocd/templates/jsonnetfile.lock.json +++ b/gocd/templates/jsonnetfile.lock.json @@ -8,8 +8,8 @@ "subdir": "libs" } }, - "version": "a4d0a7bedf0dc3cce9a28a85e95b736b139a7d4e", - "sum": "iSfWUcTtYZpJ4WEgQAqjD7I/Vi2UFpF0CXvtSIhqMXY=" + "version": "22b351221458e2d9add1014d6230e76f1bdd40c1", + "sum": "gF65Dh1Po+61V0CV5F05UFDEki0Z4ov4739GZXShqcM=" } ], "legacyImports": false