Skip to content

Commit ad024a7

Browse files
Update CI/CD docs for both projects
1 parent 0d0c505 commit ad024a7

1 file changed

Lines changed: 33 additions & 31 deletions

File tree

docs/pipeline.md

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Bedrock and Springfield run a series of automated tests as part of continuous in
77
- Redirect tests (see [Testing redirects](redirects.md#testing-redirects)).
88
- Functional tests (see [Front-end testing](testing.md)).
99

10-
**Deployed site URLs:**
10+
## Deployed site URLs:
1111

1212
=== "Bedrock"
1313

@@ -73,11 +73,11 @@ The change is developed locally, and page specific integration tests can be exec
7373

7474
### Pull request
7575

76-
Once a pull request is submitted, a [Unit Tests Github Action](https://github.com/mozilla/bedrock/actions/workflows/pull_request_tests.yml) will run both the Python and JavaScript unit tests, as well as the suite of redirect headless HTTP(s) response checks.
76+
Once a pull request is submitted, a Unit Tests Github Action (/actions/workflows/pull_request_tests.yml) will run both the Python and JavaScript unit tests, as well as the suite of redirect headless HTTP(s) response checks.
7777

7878
### Push to main branch
7979

80-
Whenever a change is pushed to the main branch, a new image is built and deployed to the dev environment, and the full suite of headless and UI tests are run. This is handled by the pipeline, and is subject to change according to the settings in the Github Action workflow defined in `bedrock/.github/workflows/integration_tests.yml`.
80+
Whenever a change is pushed to the main branch, a new image is built and deployed to the dev environment, and the full suite of headless and UI tests are run. This is handled by the pipeline, and is subject to change according to the settings in the Github Action workflow defined in `/.github/workflows/integration_tests.yml`.
8181

8282
The tests for the dev environment are currently configured as follows:
8383

@@ -90,34 +90,34 @@ The tests for the dev environment are currently configured as follows:
9090
!!! note
9191
**The deployment workflow runs like this**
9292

93-
1. A push to the `main`/`stage`/`prod`/`run-integration-tests` branch of `mozilla/bedrock` triggers a webhook ping to the (private) `mozilla-sre-deploy/deploy-bedrock` repo.
93+
1. A push to the `main`/`stage`/`prod`/`run-integration-tests` branch of `mozilla/bedrock` or `mozmeao/springfield` triggers a webhook ping to the (private) `mozilla-sre-deploy/deploy-bedrock` repo.
9494

95-
2. A Github Action (GHA) in `mozilla-sre-deploy/deploy-bedrock` builds a "release"-ready Bedrock container image, which it stores in a private container registry (private because our infra requires container-image access to be locked down). Using the same commit, the workflow also builds an equivalent set of public Bedrock container images, which are pushed to Docker Hub.
95+
2. A Github Action (GHA) in `mozilla-sre-deploy/deploy-bedrock` builds a "release"-ready container image, which it stores in a private container registry (private because our infra requires container-image access to be locked down). Using the same commit, the workflow also builds an equivalent set of public container images, which are pushed to Docker Hub.
9696

9797
3. The GHA deploys the relevant container image to the appropriate environment.
9898

99-
4. The GHA pings a webhook back in `mozilla/bedrock` to run integration tests against the environment that has just been deployed.
99+
4. The GHA pings a webhook back in `mozilla/bedrock` or `mozmeao/springfield` to run integration tests against the environment that has just been deployed.
100100

101101
### Push to stage branch
102102

103-
Whenever a change is pushed to the stage branch, a production docker image is built, published to [Docker Hub](https://hub.docker.com/r/mozmeao/bedrock/tags), and deployed to a [public staging environment](https://www.allizom.org). Once the new image is deployed, the full suite of UI tests is run against it again, but this time with the addition of the ``headless download tests``.
103+
Whenever a change is pushed to the stage branch, a production docker image is built, published to Docker Hub ([bedrock](https://hub.docker.com/r/mozmeao/bedrock/tags) / [springfield](https://hub.docker.com/r/mozmeao/springfield/tags)), and deployed to a public [staging environment](#deployed-site-urls). Once the new image is deployed, the full suite of UI tests is run against it again, but this time with the addition of the ``headless download tests``.
104104

105105
### Push to prod branch (tagged) {: #tagged-commit }
106106

107107
!!! both "Mind the path"
108108
This section is written with Bedrock as an example, but applies - with renamed paths - to Springfield, too.
109109

110110

111-
When a tagged commit is pushed to the `prod` branch, a production container image (private, see above) is built, and a set of public images is also built and pushed to [Docker Hub](https://hub.docker.com/r/mozmeao/bedrock/tags) if needed (usually this will have already happened as a result of a push to the `main` or `stage` branch). The production image is deployed to each [production](https://www.mozilla.org) deployment.
111+
When a tagged commit is pushed to the `prod` branch, a production container image (private, see above) is built, and a set of public images is also built and pushed to Docker Hub ([bedrock](https://hub.docker.com/r/mozmeao/bedrock/tags) / [springfield](https://hub.docker.com/r/mozmeao/springfield/tags)) if needed (usually this will have already happened as a result of a push to the `main` or `stage` branch). The production image is deployed to each [production](#deployed-site-urls) deployment.
112112

113113
**Push to prod cheat sheet**
114114

115115
1. Check out the `main` branch
116116

117-
2. Make sure the `main` branch is up to date with `mozilla/bedrock main`
117+
2. Make sure the `main` branch is up to date with `mozilla/bedrock main` / `mozmeao/springfield main`
118118

119119
3. Check that dev deployment is green:
120-
1. View the [Integration Tests Github Action](https://github.com/mozilla/bedrock/actions/workflows/integration_tests.yml) and look at the run labelled `Run Integration tests for main`
120+
1. View the Integration Tests Github Action ([bedrock](https://github.com/mozilla/bedrock/actions/workflows/integration_tests.yml) / [springfield](https://github.com/mozmeao/springfield/actions/workflows/integration_tests.yml)) and look at the run labelled `Run Integration tests for main`
121121

122122
4. Check that stage deployment is also green (`Run Integration tests for stage`)
123123

@@ -126,31 +126,33 @@ When a tagged commit is pushed to the `prod` branch, a production container imag
126126
!!! note
127127
By default the `tag-release.sh` script will push to the `origin` git remote. If you'd like for it to push to a different remote name you can either pass in a `-r` or `--remote` argument, or set the `MOZ_GIT_REMOTE` environment variable. So the following are equivalent:
128128

129-
``` bash
130-
# for Bedrock / www.mozilla.org
131-
bin/tag-release.sh --push -r mozilla
132-
```
129+
=== "Bedrock"
133130

134-
``` bash
135-
# for Bedrock / www.mozilla.org
136-
MOZ_GIT_REMOTE=mozilla bin/tag-release.sh --push
137-
```
131+
``` bash
132+
# for Bedrock / www.mozilla.org
133+
bin/tag-release.sh --push -r mozilla
134+
```
138135

139-
And if you'd like to just tag and not push the tag anywhere, you may omit the `--push` parameter.
136+
``` bash
137+
# for Bedrock / www.mozilla.org
138+
MOZ_GIT_REMOTE=mozilla bin/tag-release.sh --push
139+
```
140140

141+
=== "Springfield"
141142

142-
For Springfield, the repo's organization is `mozmeao` not `mozilla`:
143+
``` bash
144+
# for Springfield / www.firefox.com
145+
bin/tag-release.sh --push -r mozmeao
146+
```
143147

144-
``` bash
145-
# for Springfield / www.firefox.com
146-
bin/tag-release.sh --push -r mozmeao
147-
```
148+
``` bash
149+
# for Springfield / www.firefox.com
150+
MOZ_GIT_REMOTE=mozmeao bin/tag-release.sh --push
151+
```
148152

149-
``` bash
150-
# for Springfield / www.firefox.com
151-
MOZ_GIT_REMOTE=mozmeao bin/tag-release.sh --push
152-
```
153+
And if you'd like to just tag and not push the tag anywhere, you may omit the `--push` parameter.
153154

155+
154156
## What Is Currently Deployed?
155157

156158
You can look at the git log of the `main` branch to find the last commit with a date-tag on it (e.g. `2022-05-05`): this commit will be the last one that was deployed to production. You can also use the following links to compare Dev (`main`), with Stage and/or Prod:
@@ -169,11 +171,11 @@ You can look at the git log of the `main` branch to find the last commit with a
169171

170172
## Updating Selenium
171173

172-
There are several components for Selenium, which are independently versioned. The first is the Python client, and this can be updated via the [test dependencies](https://github.com/mozilla/bedrock/blob/main/requirements/dev.txt). The other components are the Selenium versions used in both SauceLabs and the local Selenium grid. These versions are selected automatically based on the required OS / Browser configuration, so they should not need to be updated or specified independently.
174+
There are several components for Selenium, which are independently versioned. The first is the Python client, and this can be updated via the test dependencies in `/requirements/dev.txt`. The other components are the Selenium versions used in both SauceLabs and the local Selenium grid. These versions are selected automatically based on the required OS / Browser configuration, so they should not need to be updated or specified independently.
173175

174176
## Adding test runs
175177

176-
Test runs can be added by creating a new job in `bedrock/.github/workflows/integration_tests.yml` with the desired variables and pushing that branch to Github. For example, if you wanted to run the smoke tests in IE10 (using Saucelabs) you could add the following clause to the matrix:
178+
Test runs can be added by creating a new job in `/.github/workflows/integration_tests.yml` with the desired variables and pushing that branch to Github. For example, if you wanted to run the smoke tests in IE10 (using Saucelabs) you could add the following clause to the matrix:
177179

178180
``` yaml
179181
- LABEL: test-ie10-saucelabs
@@ -189,7 +191,7 @@ You can use [Sauce Labs platform configurator](https://wiki.saucelabs.com/displa
189191
190192
## Pushing to the integration tests branch
191193
192-
If you have commit rights to our Github repo (mozilla/bedrock) you can simply push your branch to the branch named `run-integration-tests`, and the app will be deployed and the full suite of integration tests for that branch will be run. Please announce in our Slack channel (#www on mozilla.slack.com) that you'll be doing this so that we don't get conflicts. Also remember that you'll likely need to force push, as there may be commits on that branch which aren't in yours -- so, if you have the `mozilla/bedrock` remote set as `mozilla`:
194+
If you have commit rights to our Github repos (mozilla/bedrock and mozmeao/springfield) you can simply push your branch to the branch named `run-integration-tests`, and the app will be deployed and the full suite of integration tests for that branch will be run. Please announce in our Slack channel (#www or #springfield-dev on mozilla.slack.com) that you'll be doing this so that we don't get conflicts. Also remember that you'll likely need to force push, as there may be commits on that branch which aren't in yours -- so, if you have the remote set as `mozilla`:
193195

194196
``` bash
195197
git push -f mozilla $(git branch --show-current):run-integration-tests

0 commit comments

Comments
 (0)