Create a new release¶
Vocabulary¶
On this page, we use the word version for a major version of GeoMapFish
(2.0), and the word release for each step in this version
(2.0.0rc1, 2.0.0, 2.0.1, …).
MapFish Geoportal is the pack that includes ngeo and c2cgeoportal;
since 2014, both projects are synchronizing their major versions.
For example, <release> can be 2.0.0rc1 for the first release candidate
of the version 2.0, 2.0.0 for the final release, 2.0.1 for
the first bug fix release, and <version> can be 2.0, 2.1, …
The version lifecycle involves the ngeo, c2cgeoportal, the demo and argocd-gs-gmf-apps
repositories; when a version is added, all of them should be consistent.
Tasks to do¶
For ngeo,
follows the documentation on ngeo.
On branch creation (start of the integration phase):
Create the new branch on demo
Create the new branch
Clean the workflows of the new branch
Use the
ngeopackage linked to the new branchCreate the new Transifex resources
Update the master branch
Configure the new branch
Add the migration test from the new version
Verify that the change log creation is working
On release creation:
Reset the change log
Do the tags
Publish it
Create the new demo
Use the new demo
Note
All changes should be committed.
The branch protection is automatically applied by the repository rulesets
(they match the refs/heads/[0-9].[0-9] and refs/heads/[0-9].[0-9][0-9] branches).
Create the new branch on demo¶
You should create the new version branch.
You should set the default branch to the new branch.
On the new branch:
Set
VERSION=<next version>in thescripts/upgradefile.Copy the file
.github/workflows/upgrade-<new version>.yamlto.github/workflows/upgrade-<next version>.yamland update:the workflow and the job names,
the
repository_dispatchtype togeomapfish_<next version>_updated,the branch matrix to
prod-<next version>andprod-<next version>-advance.
Add the new branch to the
update_l10n.yamlmatrix with the URLhttps://geomapfish-demo-<next version>.camptocamp.com/, and to therebuild.yamlmatrix (once the demo is deployed).
Create the new branch¶
You should create the new version branch, directly from the master branch.
NEW_VERSION=x.y
git fetch origin
git push origin origin/master:refs/heads/"${NEW_VERSION}"
- In the files
.github/workflows/main.yamland.github/workflows/qgis.yamlsetMAIN_BRANCHto <new version>.
Clean the workflows of the new branch: only the workflows that are also relevant on a stabilization branch
should be kept (main.yaml, qgis.yaml, tag.yaml, pull-request-automation.yaml), the ones that
only make sense on the default branch (ngeo-*.yaml, rebuild-*.yaml, …) should be removed.
Use the ngeo package linked to the new branch¶
In c2cgeoportal new version branch, in the file geoportal/package.json, set the ngeo version to
version-<new version>-latest.
Create the new Transifex resources¶
Run:
NEW_VERSION=x.y
NEXT_VERSION=x.y+1
tx pull --source --branch="${NEW_VERSION}" --force \
--resources=geomapfish.c2cgeoportal_geoportal,geomapfish.c2cgeoportal_admin
tx pull --translations --branch="${NEW_VERSION}" --force --all \
--resources=geomapfish.c2cgeoportal_geoportal,geomapfish.c2cgeoportal_admin
tx push --branch="${NEXT_VERSION}" --source --force \
--resources=geomapfish.c2cgeoportal_geoportal,geomapfish.c2cgeoportal_admin
tx push --branch="${NEXT_VERSION}" --translation --force \
--resources=geomapfish.c2cgeoportal_geoportal,geomapfish.c2cgeoportal_admin
Note
The ngeo Transifex resources are pushed from the ngeo repository. If a resource reached the branch
limit, ngeo puts the branch in the resource name (e.g. gmf-apps-2-11) instead of using a branch:
report the rename in the .tx/config file and in the dependencies.mk pull command, without the
--branch argument.
Create a pull request¶
Create a pull request to update the new version branch.
NEW_VERSION=x.y
git checkout -b "setup-${NEW_VERSION}"
pre-commit run --files=geoportal/package.json npm-lock
git add geoportal/package.json geoportal/package-lock.json .github/workflows/main.yaml .github/workflows/qgis.yaml
git commit -m "Use ngeo version ${NEW_VERSION}"
git push --set-upstream origin "setup-${NEW_VERSION}"
Create the pull request on GitHub.
Update the master branch¶
Copy the maintenance workflow of an existing version (e.g. .github/workflows/ngeo-<new version - 1>.yaml)
to .github/workflows/ngeo-<new version>.yaml and update it:
the
nameand the job name toUpdate ngeo <new version>,the repository dispatch type to
ngeo_<new version>_updated,MAIN_BRANCHandMAJOR_VERSIONto<new version>,the
QGIS_VERSIONused to build the QGIS server,the
ci/test-upgradesteps with the ones from the new version branch.
This workflow checks out the stabilization branch, updates the ngeo package, the change log and the
version, pushes the changes on the stabilization branch and republishes the images with:
tag-publish --type=rebuild --version=<new version> --docker-versions=...
Configure the new branch¶
- In the file
.github/workflows/main.yamland.github/workflows/qgis.yamlsetMAJOR_VERSIONto <next version>.
In the Makefile, update the default value for MAJOR_VERSION, MAJOR_MINOR_VERSION and VERSION.
In the scripts/get-version file, update the default MAJOR_VERSION.
In the scripts/updated_version file, update the version used to select the json output of npm list.
Add the migration test from the new version¶
In the ci/test-upgrade file:
rename the current development version test (e.g.
v210) to the next version (v211) with thecreatefunction,add the migration test from the new version (
v210) with thecreate-oldfunction and the used image tag (e.g.2.10.0), and add the associated case and cleanup.
In the .github/workflows/main.yaml file, add the ci/test-upgrade step of the new version.
Reset the change log¶
On the c2cgeoportal new version branch:
Empty the file
CHANGELOG.mdSet the content of the file
ci/changelog.yamlto:commits: c2cgeoportal: {} ngeo: {} pulls: c2cgeoportal: {} ngeo: {} releases: []
Security information¶
On the master branch, update the file SECURITY.md with the security information by adding:
| x.y | To be defined |
The GHCI application uses this file to keep the Renovate baseBranchPatterns and the
backport <version> labels up to date.
Create the pull request¶
NEXT_VERSION=x.y+1
git checkout -b "start-${NEXT_VERSION}"
git add --all
git commit -m "Start the version ${NEXT_VERSION}"
git push --set-upstream origin "start-${NEXT_VERSION}"
Publish it¶
Send a release email to the geomapfish@googlegroups.com and
geomapfish-dev@lists.camptocamp.com mailing lists.
Create the new demo¶
Create the new demo on Kubernetes:
In argocd-gs-gmf-apps, add the files of the new version
(values/geomapfish/<next version>-*.yaml, apps/prod/demo/gmf-<next version>,
apps/prod/demo/ingress-<next version> and apps/values/demo/values-geomapfish-<next version>.yaml
with the incremented REDIS_DB).
Defer the geomapfish-demo-master/geomapfish-demo-latest ingress switches until the images of the
new version are published.
Use the new demo¶
On ngeo master branch change all the URL
from https://geomapfish-demo-<new version>.camptocamp.com
to https://geomapfish-demo-<next version>.camptocamp.com.