-
Notifications
You must be signed in to change notification settings - Fork 68
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
chore: release on tag #4208
chore: release on tag #4208
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,7 +163,7 @@ To deploy to CloudFoundry submit the following: | |
`cf push federalistapp --strategy rolling --vars-file "./.cloudgov/vars/${CF_SPACE}.yml" -f ./cloudgov/manifest.yml` | ||
|
||
### Continuous Integration | ||
We are in the process of migrating from CircleCI to an internal instance of Concourse CI, starting with our staging environment. To use Concourse, one must have appropriate permissions in UAA as administered by the cloud.gov operators. Access to Concourse also requires using the GSA VPN. | ||
Our continuous integration pipeline is run on Concourse CI. To use Concourse, one must have appropriate permissions in UAA as administered by the cloud.gov operators. Access to Concourse also requires using the GSA VPN. | ||
|
||
1. To get started install and authenticate with the `fly` CLI: | ||
- `brew install --cask fly` | ||
|
@@ -172,26 +172,29 @@ We are in the process of migrating from CircleCI to an internal instance of Conc | |
2. Update local credential files (see ci/vars/example.yml) | ||
|
||
#### CI deployments | ||
This repository contains two distinct deployment pipelines in concourse: | ||
- [__Core__](./ci/pipeline.yml) | ||
This repository contains three distinct deployment pipelines for the core application and one for metrics: | ||
- [__Core Production__](./ci/pipeline-production.yml) | ||
- [__Core Staging__](./ci/pipeline-staging.yml) | ||
- [__Core Dev__](./ci/pipeline-dev.yml) | ||
- [__Metrics__](./apps/metrics/ci/pipeline.yml) | ||
|
||
__Core__ deploys the Pages app/api, the admin app, and the queues app. __Metrics__ deploys concourse tasks to check our app/infrastructure health. | ||
__Core [Env]__ deploys the Pages app/api, the admin app, and the queues app for a given environment. __Metrics__ deploys concourse tasks to check our app/infrastructure health. | ||
|
||
__*↓ NOTICE ↓*__ | ||
|
||
> __Core 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) | ||
> __Core Production__ deploys the Pages app/api, the admin app, and the queues app when a new tag is added to the `main` branch. This uses a unique pipeline file: [./ci/pipeline-production.yml](./ci/pipeline-production.yml). This pipeline is also responsible for creating and updating our release PRs. | ||
|
||
> __Core Staging__ deploys the Pages app/api, the admin app, and the queues app when a new commit is added to the `main` branch. This also tests PRs against `main`. This uses a unique pipeline file: [./ci/pipeline-staging.yml](./ci/pipeline-staging.yml) | ||
|
||
> __Core Dev__ deploys the Pages app/api, the admin app, and the queues app when a PR is created into the `main` branch. This uses a unique pipeline file: [./ci/pipeline-dev.yml](./ci/pipeline-dev.yml) | ||
|
||
#### Core 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`. `product` | ||
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 one instance variable associated to it: `deploy-env`. | ||
|
||
|Instance Variable|Pages Dev|Pages Staging|Pages Production| | ||
--- | --- | ---| ---| | ||
|**`deploy-env`**|`dev`|`staging`|`production`| | ||
|**`git-branch`**|`staging`|`staging`|`main`| | ||
|**`product`**|`pages`|`pages`|`pages`| | ||
|
||
##### Pipeline credentials | ||
Concourse CI integrates directly with [Credhub](https://docs.cloudfoundry.org/credhub/) to provide access to credentials/secrets at job runtime. When a job is started, Concourse will resolve the parameters within the pipeline with the latest credentials using the double parentheses notation (ie. `((<credential-name>))`). See more about the [credentials lookup rules](https://concourse-ci.org/credhub-credential-manager.html#credential-lookup-rules). | ||
|
@@ -202,7 +205,7 @@ Some credentials in this pipeline are "compound" credentials that use the pipeli | |
--- | --- | --- | | ||
|**`((deploy-env))-cf-username`**|The deployment environments CloudFoundry deployer username based on the instanced pipeline|:white_check_mark:| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either "development environment's" or "development environment". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skipping these because they aren't part of this PR (will catch on a larger docs review) |
||
|**`((deploy-env))-cf-username`**|The deployment environments CloudFoundry deployer password based on the instanced pipeline|:white_check_mark:| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either "development environment's" or "development environment". |
||
|**`((deploy-env))-((product))-domain`**|The deployment envinronment and product(Pages|Federalist) specific domain for the app|:white_check_mark:| | ||
|**`((deploy-env))-pages-domain`**|The deployment environment specific domain for the app|:white_check_mark:| | ||
|**`((slack-channel))`**| Slack channel | :x:| | ||
|**`((slack-username))`**| Slack username | :x:| | ||
|**`((slack-icon-url))`**| Slack icon url | :x:| | ||
|
@@ -213,25 +216,12 @@ Some credentials in this pipeline are "compound" credentials that use the pipeli | |
|**`((gh-access-token))`**| The Github access token|:x:| | ||
|
||
##### Setting up the pipeline for Core | ||
The pipeline and each of it's instances will only needed to be set once per instance to create the initial pipeline. After the pipelines are set, updates to the respective `git-branch` source will automatically set the pipeline. See the [`set_pipeline` step](https://concourse-ci.org/set-pipeline-step.html) for more information. Run the following command with the fly CLI to set a pipeline instance: | ||
|
||
```bash | ||
$ fly -t <Concourse CI Target Name> set-pipeline -p core \ | ||
-c ci/pipeline.yml \ | ||
-i git-branch=main \ | ||
-i deploy-env=production | ||
-i product=pages | ||
``` | ||
|
||
##### Setting up the pipeline for Core Dev | ||
The pipeline and each of it's instances will only needed to be set once per instance to create the initial pipeline. After the pipelines are set, updates from a source PR will automatically set the pipeline. See the [`set_pipeline` step](https://concourse-ci.org/set-pipeline-step.html) for more information. Run the following command with the fly CLI to set a pipeline instance: | ||
The pipeline and each of it's instances will only needed to be set once per instance to create the initial pipeline. After the pipelines are set, updates to the default branch will automatically set the pipeline. See the [`set_pipeline` step](https://concourse-ci.org/set-pipeline-step.html) for more information. Run the following command with the fly CLI to set a pipeline instance: | ||
|
||
```bash | ||
$ fly -t <Concourse CI Target Name> set-pipeline -p core \ | ||
-c ci/pipeline-dev.yml \ | ||
-i git-branch=staging \ | ||
-i deploy-env=dev | ||
-i product=pages | ||
-c ci/pipeline-<env>.yml \ | ||
-i deploy-env=<env> | ||
``` | ||
|
||
##### Getting or deleting a pipeline instance from the CLI | ||
|
@@ -240,11 +230,11 @@ To get a pipeline instance's config or destroy a pipeline instance, Run the foll | |
```bash | ||
## Get a pipeline instance config | ||
$ fly -t <Concourse CI Target Name> get-pipeline \ | ||
-p core/deploy-env:production,git-branch:main,product:pages | ||
-p core/deploy-env:production | ||
|
||
## Destroy a pipeline | ||
$ fly -t <Concourse CI Target Name> destroy-pipeline \ | ||
-p core/deploy-env:production,git-branch:main,product:pages | ||
-p core/deploy-env:production | ||
``` | ||
|
||
#### Metrics deployment | ||
|
@@ -465,12 +455,6 @@ docs: Close an issue from our product repo | |
Related issue: https://github.com/cloud-gov/product/issues/2486 | ||
``` | ||
|
||
We also allow one additional commit type: `merge`. This is used in place of the default message for merge commits: | ||
|
||
``` | ||
merge: pull request #4190 from cloud-gov/4186-pages-admin-pages-logo | ||
``` | ||
|
||
This convention is enforced via [this ruleset](https://github.com/cloud-gov/pages-core/settings/rules/26912), which checks the commit message against a regex rule before it can be merged to the default branch. | ||
|
||
The benefit of adhering to this convention is that we can more easily reason about our commit history and also generate nice changelogs via [Release Please](https://github.com/googleapis/release-please). | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
outputs: [name: src] | ||
run: | ||
dir: src/admin-client | ||
path: bash | ||
args: [-c, yarn build] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
outputs: [name: src] | ||
params: | ||
PRODUCT: pages | ||
run: | ||
dir: src | ||
path: bash | ||
args: [-c, yarn build] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
run: | ||
path: src/ci/tasks/cancel-deployment.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
outputs: [name: src] | ||
run: | ||
dir: src | ||
path: ci/tasks/configure-admin-client-nginx.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
run: | ||
path: src/ci/tasks/deploy.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
outputs: [name: src] | ||
run: | ||
dir: src/admin-client | ||
path: bash | ||
args: [-c, yarn --pure-lockfile] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
outputs: [name: src] | ||
run: | ||
dir: src | ||
path: bash | ||
args: [-c, yarn --pure-lockfile] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
run: | ||
dir: src/admin-client | ||
path: bash | ||
args: [-c, yarn lint] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
run: | ||
dir: src | ||
path: bash | ||
args: [-c, yarn lint] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
run: | ||
path: src/ci/tasks/restage.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
platform: linux | ||
inputs: [name: src] | ||
run: | ||
path: src/ci/tasks/run-task.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
platform: linux | ||
image_resource: | ||
type: docker-image | ||
source: | ||
repository: karlkfi/concourse-dcind | ||
inputs: | ||
- name: src | ||
- name: redis | ||
- name: postgres | ||
- name: node | ||
run: | ||
dir: src | ||
path: ci/docker/entrypoint.sh | ||
args: | ||
- bash | ||
- -ceux | ||
- | | ||
docker network prune -f | ||
docker-compose -f ci/docker/docker-compose.yml run app app/ci/tasks/test-api.sh | ||
docker-compose -f ci/docker/docker-compose.yml down | ||
docker volume rm $(docker volume ls -q) | ||
docker network prune -f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's beyond the scope of this documentation, but Zscaler changes this, or is at least in the process of doing so.