From 20d2c1d1f374f5b6ee8c56600199532622ed6d2e Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Tue, 7 Jan 2025 14:45:28 -0800 Subject: [PATCH] Auto deploy the default branch to moda (#53801) --- .github/branch_protection_settings/main.json | 19 +++++++++-- config/moda/deployment.yaml | 33 +++++++++++++++++--- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/.github/branch_protection_settings/main.json b/.github/branch_protection_settings/main.json index 39c2b0491e00..29e0c828d766 100644 --- a/.github/branch_protection_settings/main.json +++ b/.github/branch_protection_settings/main.json @@ -41,7 +41,10 @@ "workflows", "lint-code", "secret-scanning", - "pagelist" + "pagelist", + "docs-internal-docker-image / docs-internal-docker-image", + "docs-internal-docker-security / docs-internal-docker-security", + "docs-internal-moda-config-bundle / docs-internal-moda-config-bundle" ], "contexts_url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/required_status_checks/contexts", "checks": [ @@ -85,7 +88,19 @@ { "context": "workflows", "app_id": 15368 }, { "context": "lint-code", "app_id": 15368 }, { "context": "secret-scanning", "app_id": 15368 }, - { "context": "pagelist", "app_id": 15368 } + { "context": "pagelist", "app_id": 15368 }, + { + "context": "docs-internal-docker-image / docs-internal-docker-image", + "app_id": 15368 + }, + { + "context": "docs-internal-docker-security / docs-internal-docker-security", + "app_id": 15368 + }, + { + "context": "docs-internal-moda-config-bundle / docs-internal-moda-config-bundle", + "app_id": 15368 + } ] }, "restrictions": { diff --git a/config/moda/deployment.yaml b/config/moda/deployment.yaml index a8edafe09980..d77c5bb51341 100644 --- a/config/moda/deployment.yaml +++ b/config/moda/deployment.yaml @@ -1,13 +1,36 @@ -required_builds: - - docs-internal-moda-config-bundle / docs-internal-moda-config-bundle - - docs-internal-docker-image / docs-internal-docker-image - - docs-internal-docker-security / docs-internal-docker-security +# Deploy configuration reference: https://thehub.github.com/epd/engineering/products-and-services/internal/moda/reference/deployment-yaml/ + environments: - name: production - auto_deploy: true + require_pipeline: true cluster_selector: profile: general region: iad + +required_builds: + - docs-internal-moda-config-bundle / docs-internal-moda-config-bundle + - docs-internal-docker-image / docs-internal-docker-image + - docs-internal-docker-security / docs-internal-docker-security + +# Make the pipeline start automatically when a PR is enqueued +auto_start_pipeline: production_rollout + +pipelines: + production_rollout: + thread_notifications: true + notify_users_via_dm: false + timeout: 1200 + stages: + - name: full_production + kind: deployment + start_message: We are now going to deploy {{app}}/{{ref}}! Please pause or cancel the pipeline after the deploy if you want more time before auto-merging your pull request(s). + config: + environment: production + timeout: 1200 + # gates: + # - kind: timer + # duration: 1200 + notifications: slack_channels: - '#docs-ops'