You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pipeline.md
+33-31Lines changed: 33 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Bedrock and Springfield run a series of automated tests as part of continuous in
7
7
- Redirect tests (see [Testing redirects](redirects.md#testing-redirects)).
8
8
- Functional tests (see [Front-end testing](testing.md)).
9
9
10
-
**Deployed site URLs:**
10
+
## Deployed site URLs:
11
11
12
12
=== "Bedrock"
13
13
@@ -73,11 +73,11 @@ The change is developed locally, and page specific integration tests can be exec
73
73
74
74
### Pull request
75
75
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.
77
77
78
78
### Push to main branch
79
79
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`.
81
81
82
82
The tests for the dev environment are currently configured as follows:
83
83
@@ -90,34 +90,34 @@ The tests for the dev environment are currently configured as follows:
90
90
!!! note
91
91
**The deployment workflow runs like this**
92
92
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.
94
94
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.
96
96
97
97
3. The GHA deploys the relevant container image to the appropriate environment.
98
98
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.
100
100
101
101
### Push to stage branch
102
102
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``.
104
104
105
105
### Push to prod branch (tagged) {: #tagged-commit }
106
106
107
107
!!! both "Mind the path"
108
108
This section is written with Bedrock as an example, but applies - with renamed paths - to Springfield, too.
109
109
110
110
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.
112
112
113
113
**Push to prod cheat sheet**
114
114
115
115
1. Check out the `main` branch
116
116
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`
118
118
119
119
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`
121
121
122
122
4. Check that stage deployment is also green (`Run Integration tests for stage`)
123
123
@@ -126,31 +126,33 @@ When a tagged commit is pushed to the `prod` branch, a production container imag
126
126
!!! note
127
127
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:
128
128
129
-
``` bash
130
-
# for Bedrock / www.mozilla.org
131
-
bin/tag-release.sh --push -r mozilla
132
-
```
129
+
=== "Bedrock"
133
130
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
+
```
138
135
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
+
```
140
140
141
+
=== "Springfield"
141
142
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
+
```
143
147
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
+
```
148
152
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.
153
154
155
+
154
156
## What Is Currently Deployed?
155
157
156
158
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
169
171
170
172
## Updating Selenium
171
173
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.
173
175
174
176
## Adding test runs
175
177
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:
177
179
178
180
```yaml
179
181
- LABEL: test-ie10-saucelabs
@@ -189,7 +191,7 @@ You can use [Sauce Labs platform configurator](https://wiki.saucelabs.com/displa
189
191
190
192
## Pushing to the integration tests branch
191
193
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`:
193
195
194
196
``` bash
195
197
git push -f mozilla $(git branch --show-current):run-integration-tests
0 commit comments