Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs, drop nightly restage #475

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,24 +197,19 @@ We use Concourse CI for our CI/CD system. To use Concourse, one must have approp
2. Update local credential files (see ci/vars/example.yml)

#### CI deployments
This repository contains two distinct deployment pipelines in concourse:
- [__build-container__](./ci/pipeline.yml)
- [__build-container dev__](./ci/pipeline-dev.yml)
This repository contains three distinct deployment pipelines in concourse:
- [__build-container production__](./ci/pipeline-production.yml); starts on a new tag pushed to the `main` branch
- [__build-container staging__](./ci/pipeline-staging.yml); starts on a new commit pushed to the `main` branch.
- [__build-container dev__](./ci/pipeline-dev.yml); starts when a PR is created into the `main` branch.

__build-container__ creates the site build container image, pushes it to ECR, and then deploys the image for the build container app.
Each pipeline runs tests, creates the appropriate site build container image, pushes it to ECR, and then deploys the image for the build container app.

__*↓ NOTICE ↓*__

> __build-container dev__ deploys the Pages app/api, the admin app, and the queues app when a PR is created into the `staging` branch. This uses a unique pipeline file: [./ci/pipeline-dev.yml](./ci/pipeline-dev.yml)

#### Deployment
##### Pipeline instance variables
Three instances of the pipeline are set for the `pages dev`, `pages staging` and `pages production` environments. Instance variables are used to fill in Concourse pipeline parameter variables bearing the same name as the instance variable. See more on [Concourse vars](https://concourse-ci.org/vars.html). Each instance of the pipeline has three instance variables associated to it: `deploy-env`, `git-branch`.

|Instance Variable|Pages Dev|Pages Staging|Pages Production|
--- | --- | ---| ---|
|**`deploy-env`**|`dev`|`staging`|`production`|
|**`git-branch`**|`staging`|`staging`|`main`|

## Public domain

Expand Down
36 changes: 3 additions & 33 deletions ci/pipeline-dev.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
#@ load("funcs.lib.yml", "slack_hook")

env-cf: &env-cf
CF_API: https://api.fr.cloud.gov
CF_USERNAME: ((((deploy-env))-cf-username))
CF_PASSWORD: ((((deploy-env))-cf-password))
CF_ORG: gsa-18f-federalist
CF_SPACE: ((deploy-env))
#@ load("@ytt:data", "data")
#@ load("@ytt:template", "template")

#! JOBS

Expand Down Expand Up @@ -87,7 +82,7 @@ jobs:
image: general-task
file: src/ci/partials/deploy.yml
params:
<<: *env-cf
_: #@ template.replace(data.values.env_cf)
CF_APP_NAME: pages-build-container-((deploy-env))
CF_MANIFEST: .cloudgov/manifest.yml
CF_VARS_FILE: .cloudgov/vars/pages-((deploy-env)).yml
Expand All @@ -98,23 +93,6 @@ jobs:

on_failure: #@ slack_hook("failure", "deployment")

- name: nightly-((deploy-env))
plan:
- get: nightly
trigger: true
- get: src
resource: pr-((deploy-env))
- get: general-task
- get: pipeline-tasks
- task: restage
image: general-task
file: pipeline-tasks/tasks/restage.yml
params:
<<: *env-cf
CF_APP_NAME: pages-build-container-((deploy-env))
on_success: #@ slack_hook("success", "nightly restage")
on_failure: #@ slack_hook("failure", "nightly restage")

- name: audit-dependencies
plan:
- get: src
Expand Down Expand Up @@ -170,13 +148,6 @@ resources:
disable_forks: true
ignore_drafts: false

- name: nightly
type: time
source:
start: 12:00 AM
stop: 1:00 AM
location: America/New_York

- name: image-repository
type: registry-image
source:
Expand All @@ -198,5 +169,4 @@ resource_types:
- name: git
- name: slack-notification
- name: pull-request
- name: time
- name: registry-image
37 changes: 3 additions & 34 deletions ci/pipeline-production.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
#@ load("funcs.lib.yml", "slack_hook")

env-cf: &env-cf
CF_API: https://api.fr.cloud.gov
CF_USERNAME: ((((deploy-env))-cf-username))
CF_PASSWORD: ((((deploy-env))-cf-password))
CF_ORG: gsa-18f-federalist
CF_SPACE: ((deploy-env))
#@ load("@ytt:data", "data")
#@ load("@ytt:template", "template")

#! JOBS

Expand Down Expand Up @@ -62,7 +57,7 @@ jobs:
image: general-task
file: src/ci/partials/deploy.yml
params:
<<: *env-cf
_: #@ template.replace(data.values.env_cf)
CF_APP_NAME: pages-build-container-((deploy-env))
CF_MANIFEST: .cloudgov/manifest.yml
CF_VARS_FILE: .cloudgov/vars/pages-((deploy-env)).yml
Expand All @@ -74,24 +69,6 @@ jobs:
on_success: #@ slack_hook("success", "deployment")
on_failure: #@ slack_hook("failure", "deployment")

- name: nightly-((deploy-env))
plan:
- get: nightly
trigger: true
- get: src
resource: src-((deploy-env))-tagged
trigger: true
params: { depth: 1 }
- get: general-task
- task: restage
image: general-task
file: src/ci/partials/restage.yml
params:
<<: *env-cf
CF_APP_NAME: pages-build-container-((deploy-env))
on_success: #@ slack_hook("success", "nightly restage")
on_failure: #@ slack_hook("failure", "nightly restage")

- name: audit-dependencies
plan:
- get: src
Expand Down Expand Up @@ -120,13 +97,6 @@ resources:
tag_filter: 0.*.*
fetch_tags: true

- name: nightly
type: time
source:
start: 12:00 AM
stop: 1:00 AM
location: America/New_York

- name: image-repository
type: registry-image
source:
Expand All @@ -148,5 +118,4 @@ resource_types:
- name: git
- name: slack-notification
- name: pull-request
- name: time
- name: registry-image
37 changes: 3 additions & 34 deletions ci/pipeline-staging.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
#@ load("funcs.lib.yml", "slack_hook")

env-cf: &env-cf
CF_API: https://api.fr.cloud.gov
CF_USERNAME: ((((deploy-env))-cf-username))
CF_PASSWORD: ((((deploy-env))-cf-password))
CF_ORG: gsa-18f-federalist
CF_SPACE: ((deploy-env))
#@ load("@ytt:data", "data")
#@ load("@ytt:template", "template")

#! JOBS

Expand Down Expand Up @@ -62,7 +57,7 @@ jobs:
image: general-task
file: src/ci/partials/deploy.yml
params:
<<: *env-cf
_: #@ template.replace(data.values.env_cf)
CF_APP_NAME: pages-build-container-((deploy-env))
CF_MANIFEST: .cloudgov/manifest.yml
CF_VARS_FILE: .cloudgov/vars/pages-((deploy-env)).yml
Expand All @@ -74,24 +69,6 @@ jobs:
on_success: #@ slack_hook("success", "deployment")
on_failure: #@ slack_hook("failure", "deployment")

- name: nightly-((deploy-env))
plan:
- get: nightly
trigger: true
- get: src
resource: src-((deploy-env))
trigger: true
params: { depth: 1 }
- get: general-task
- task: restage
image: general-task
file: src/ci/partials/restage.yml
params:
<<: *env-cf
CF_APP_NAME: pages-build-container-((deploy-env))
on_success: #@ slack_hook("success", "nightly restage")
on_failure: #@ slack_hook("failure", "nightly restage")

- name: audit-dependencies
plan:
- get: src
Expand All @@ -118,13 +95,6 @@ resources:
branch: main
commit_verification_keys: ((cloud-gov-pages-gpg-keys))

- name: nightly
type: time
source:
start: 12:00 AM
stop: 1:00 AM
location: America/New_York

- name: image-repository
type: registry-image
source:
Expand All @@ -146,5 +116,4 @@ resource_types:
- name: git
- name: slack-notification
- name: pull-request
- name: time
- name: registry-image
Loading