Skip to content

Initial development

Initial development #7

Workflow file for this run

name: Sandbox
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths-ignore:
- "**.md"
permissions:
contents: read
id-token: write
jobs:
yarn_install:
name: "Yarn install"
runs-on: ubuntu-latest
steps:
# Checkout
# https://github.com/marketplace/actions/checkout
- name: Checkout code
uses: actions/[email protected]
# Setup Node
# https://github.com/marketplace/actions/setup-node-js-environment
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.x
registry-url: https://registry.npmjs.org
- name: Yarn install
working-directory: app
run: |
yarn install
yarn tsc
yarn build:backend
build_and_push_us:
name: "Sandbox Registry: us-docker.pkg.dev"
uses: osinfra-io/github-misc-called-workflows/.github/workflows/[email protected]
if: github.actor != 'dependabot[bot]'
needs: yarn_install
with:
cache_from: type=gha
cache_to: type=gha,mode=max
context: ./app
build_args: |
DD_GIT_REPOSITORY_URL=https://github.com/${{ github.repository }}
DD_GIT_COMMIT_SHA=${{ github.sha }}
file: ./app/packages/backend/Dockerfile
registry: us-docker.pkg.dev
service_account: plt-backstage-github@plt-lz-terraform-tf00-sb.iam.gserviceaccount.com
tags: us-docker.pkg.dev/plt-lz-services-tf7f-sb/plt-docker-standard/backstage:${{ github.sha }}
workload_identity_provider: projects/746490462722/locations/global/workloadIdentityPools/github-actions/providers/github-actions-oidc
main:
name: "Main"
uses: osinfra-io/github-terraform-gcp-called-workflows/.github/workflows/[email protected]
if: github.actor != 'dependabot[bot]'
needs: build_and_push_us
with:
checkout_ref: ${{ github.ref }}
environment: sandbox
github_environment: "Sandbox: Main"
service_account: plt-backstage-github@plt-lz-terraform-tf00-sb.iam.gserviceaccount.com
terraform_plan_args: -var-file=tfvars/sandbox.tfvars -var-file=shared/tfvars/sandbox.tfvars
terraform_state_bucket: plt-backstage-4312-sb
terraform_version: ${{ vars.TERRAFORM_VERSION }}
terraform_workspace: main-sandbox
workload_identity_provider: projects/746490462722/locations/global/workloadIdentityPools/github-actions/providers/github-actions-oidc
secrets:
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
infracost_api_key: ${{ secrets.INFRACOST_API_KEY }}
terraform_plan_secret_args: >-
-var=datadog_api_key=${{ secrets.DATADOG_API_KEY }}
-var=datadog_app_key=${{ secrets.DATADOG_APP_KEY }}
us_east1_b:
name: "Sandbox Regional: us-east1-b"
uses: osinfra-io/github-terraform-gcp-called-workflows/.github/workflows/[email protected]
if: github.actor != 'dependabot[bot]'
needs: main
with:
checkout_ref: ${{ github.ref }}
environment: us-east1-b-sandbox
github_environment: "Sandbox: Regional - us-east1-b"
service_account: plt-backstage-github@plt-lz-terraform-tf00-sb.iam.gserviceaccount.com
terraform_plan_args: -var-file=tfvars/us-east1-b-sandbox.tfvars -var=backstage_version=${{ github.sha }}
terraform_state_bucket: plt-backstage-4312-sb
terraform_version: ${{ vars.TERRAFORM_VERSION }}
terraform_workspace: us-east1-b-sandbox
working_directory: deployments/regional
workload_identity_provider: projects/746490462722/locations/global/workloadIdentityPools/github-actions/providers/github-actions-oidc
secrets:
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
infracost_api_key: ${{ secrets.INFRACOST_API_KEY }}
terraform_plan_secret_args: >-
-var=datadog_api_key=${{ secrets.DATADOG_API_KEY }}
-var=datadog_app_key=${{ secrets.DATADOG_APP_KEY }}
datadog_synthetic_tests:
name: "Sandbox: Datadog synthetic tests"
runs-on: ubuntu-latest
needs: us_east1_b
steps:
# Datadog Synthetics CI
# https://github.com/marketplace/actions/datadog-synthetics-ci
- name: Run Datadog synthetic tests
uses: datadog/[email protected]
with:
api_key: ${{ secrets.DATADOG_API_KEY }}
app_key: ${{ secrets.DATADOG_APP_KEY }}
fail_on_critical_errors: true
test_search_query: "env:sandbox service:backstage team:platform-backstage state:live"