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
| Dev |`$(AGENCY_RESOURCE_GROUP_PREFIX)-eligibility-dev`|`dev`|`main`|
22
+
| Test |`$(AGENCY_RESOURCE_GROUP_PREFIX)-eligibility-test`|`test`| release candidate tag |
23
+
| Prod |`$(AGENCY_RESOURCE_GROUP_PREFIX)-eligibility-prod`|`default`| release tag |
24
+
25
+
(See [Version number format](../releases.md#version-number-format) for naming pattern for release candidate/release tags.)
24
26
25
27
All resources in these Resource Groups should be reflected in Terraform in this repository. The exceptions are:
26
28
@@ -86,7 +88,14 @@ Docker logs can be viewed in the Advanced Tools for the instance. The URL patter
86
88
87
89
## Making changes
88
90
89
-
Terraform is [`plan`](https://www.terraform.io/cli/commands/plan)'d when code is pushed to any branch on GitHub, then [`apply`](https://www.terraform.io/cli/commands/apply)'d when merged to `main`. While other automation for this project is done through GitHub Actions, we use an Azure Pipeline (above) for a couple of reasons:
91
+
Terraform is [`plan`](https://www.terraform.io/cli/commands/plan)'d when commits that change any file under the `terraform` directory are either:
92
+
93
+
- merged into the `main` branch
94
+
- tagged with a release candidate or release tag
95
+
96
+
Then, the Azure DevOps pipeline that ran the `plan` will wait for approval to run [`apply`](https://www.terraform.io/cli/commands/apply).
97
+
98
+
While other automation for this project is done through GitHub Actions, we use an Azure DevOps Pipeline (above) for a couple of reasons:
90
99
91
100
- Easier authentication with the Azure API using a service connnection
92
101
- Log output is hidden, avoiding accidentally leaking secrets
@@ -133,7 +142,7 @@ In general, the steps that must be done manually before the pipeline can be run
133
142
- Create Resource Group and storage account dedicated to the Terraform state
134
143
- Create container in storage account for Terraform state
135
144
- Create environment Resource Group for each environment, Region: West US
136
-
- We create these manually to avoid having to give the pipeline service connection permissions for creating resource groups
145
+
- We create these manually to avoid having to give the pipeline service connection permissions for creating resource groups
137
146
- Create Terraform workspace for each environment
138
147
- Trigger a pipeline run to verify `plan` and `apply`
139
148
- Known chicken-and-egg problem: Terraform both creates the Key Vault and expects a secret within it, so will always fail on the first deploy. Add the Benefits slack email secret and re-run the pipeline.
@@ -142,14 +151,14 @@ Once the pipeline has run, there are a few more steps to be done manually in the
142
151
143
152
-[Create the service principal](https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal#app-registration-app-objects-and-service-principals)
144
153
- Give the ETL service principal access to the `prod` storage account created by the pipeline:
145
-
- Navigate to the storage account container
146
-
- Select **Access Control (IAM)**
147
-
- Select **Add**, then select **Add role assignment**
148
-
- In the **Role** tab, select `Storage Blob Data Contributor`
149
-
- In the **Members** tab, select `Select Members` and search for the ETL service principal. Add it to the role.
150
-
- Also in the **Members** tab, add a description of `This role assignment gives write access only for the path of the hashed data file.`
151
-
- In the **Conditions** tab, select **Add condition** and change the editor type to `Code`
152
-
- Add the following condition into the editor, filling in `<filename>` with the appropriate value:
154
+
- Navigate to the storage account container
155
+
- Select **Access Control (IAM)**
156
+
- Select **Add**, then select **Add role assignment**
157
+
- In the **Role** tab, select `Storage Blob Data Contributor`
158
+
- In the **Members** tab, select `Select Members` and search for the ETL service principal. Add it to the role.
159
+
- Also in the **Members** tab, add a description of `This role assignment gives write access only for the path of the hashed data file.`
160
+
- In the **Conditions** tab, select **Add condition** and change the editor type to `Code`
161
+
- Add the following condition into the editor, filling in `<filename>` with the appropriate value:
Copy file name to clipboardexpand all lines: docs/releases.md
+15-3
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,24 @@ The `eligibility-server` is published as a Docker image on the GitHub Container
4
4
5
5
Every push to the `main` (default) branch that changes files relevant to the application builds and updates the `dev` package, via the [`docker-publish`](https://github.com/cal-itp/eligibility-server/blob/main/.github/workflows/docker-publish.yml) GitHub Action.
6
6
7
-
Every release created also pushes a new package publication.
7
+
Commits that are tagged with our version number format for release candidates and releases will update the `test` and `prod` packages, respectively.
8
8
9
9
## Versions
10
10
11
11
All versions of the package may be viewed on the [package all versions page](https://github.com/cal-itp/eligibility-server/pkgs/container/eligibility-server/versions).
12
12
13
-
The `main` (default) branch is published at the `dev` tag:
13
+
The `main` (default) branch is published at the `dev` tag.
14
14
15
-
The official releases will be tagged with a version number and their respective environment (`test`, `prod`) tag.
15
+
The official releases will be tagged with a version number.
16
+
17
+
## Version number format
18
+
19
+
`eligibility-server` uses the [CalVer](https://calver.org/) versioning scheme, where version numbers for releases look like: `YYYY.0M.R`
20
+
21
+
-`YYYY` is the 4-digit year of the release; e.g. `2021`, `2022`
22
+
-`0M` is the 2-digit, 0-padded month of the release; e.g. `02` is February, `12`
23
+
is December.
24
+
-`R` is the 1-based release counter for the given year and month;
25
+
e.g. `1` for the first release of the month, `2` for the second, and so on.
26
+
27
+
Version numbers for release candidates append `-rcR`, where `R` is the 1-based release counter for the anticipated release. For example, the first release candidate for the `2024.01.1` release would be `2024.01.1-rc1`.
0 commit comments