From 913537fb93f1de0cfd7b0fbd39f67d12db6e0a7f Mon Sep 17 00:00:00 2001 From: Christopher Lepski <139237321+clepski@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:15:42 +0200 Subject: [PATCH 1/5] doc: Update RELEASES.md Signed-off-by: Christopher Lepski <139237321+clepski@users.noreply.github.com> --- docs/RELEASES.md | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/docs/RELEASES.md b/docs/RELEASES.md index 2e4ed0a..c2ab03d 100644 --- a/docs/RELEASES.md +++ b/docs/RELEASES.md @@ -2,38 +2,9 @@ ## Create a release -To create a release of the software we are using the release functionality of GitHub. Under the tab ``code`` there is a section -``Releases`` (Right side). When selected all current releases will be displayed, and a new release can be created (draft release). -The standard branch to create a release from should be the ``main`` branch. +### Backend services -Enter the following values when creating a new release: -- **Choose a tag**: Enter a new version using semantic versioning, for example ``0.1.4``. - Also press ``Create new tag`` to create the new label. -- **Target**: This should normally be ``main``. -- **Release title**: Name of the release, use the following template ``Release of ``, for instance - ``Release 0.1.4 of SCL Auto Alignment Service`` -- **Describe the release**: These are the release notes, press the button ``Auto-generate release notes`` to generate these. - Check [Configure release notes generation](#configure-release-notes-generation) to configure how these are generated. - -Now press ``Publish release`` to create the release. For every repository that creates a software product (artifacts or docker images) -a GitHub Action (``release-project.yml``) is defined. This action runs when a release is created. -```yaml -on: - release: - types: [released] -``` - -Depending on the type of project different steps will be executed. -Common steps are: -- Checking out the source code, -- Extracting the entered version from the Git Tag. -- Set version using Maven -- Setup Maven settings.xml file - -Depending on the type of project other steps will be executed. Some examples are: -- Build and publish the software to GitHub Packages using Maven -- Build and publish the docker image to DockerHub using Maven -- Build and publish the docker image to DockerHub using NPM and Docker +We are using [release please](https://github.com/googleapis/release-please) which automatically creates and updates a release PR. The PR contains an up to date changelog based on the conventional commit messsages and sets the new version number. To trigger a release the release please PR has to be merged, which triggers the release please workflow (currently the release please PR has to be merged twice, because it creates a snapshot version first). The workflow will build the Maven packages, upload them to GitHub packages and build the docker image and upload it to docker hub. ## Publish artifacts using Maven @@ -53,7 +24,7 @@ Replace ``[repo-name]`` with the name of the repository from CoMPAS. ## Configure release notes generation -During creating of a release we will use the GitHub feature to automatically generate the release notes using the pull requests. +During creating of a release release please will automatically generate the release notes using commit messages. The way these release notes are created can be configured by adding/updating the file ``release.yml`` to the directory ``.github``. The content of the file ``release.yml`` is currently: From ab2675180398d4fe4da87372c9299cc0263c1689 Mon Sep 17 00:00:00 2001 From: Christopher Lepski <139237321+clepski@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:21:45 +0200 Subject: [PATCH 2/5] doc: Add compas open scd release guide Signed-off-by: Christopher Lepski <139237321+clepski@users.noreply.github.com> --- docs/RELEASES.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/RELEASES.md b/docs/RELEASES.md index c2ab03d..cf8ae64 100644 --- a/docs/RELEASES.md +++ b/docs/RELEASES.md @@ -4,7 +4,13 @@ ### Backend services -We are using [release please](https://github.com/googleapis/release-please) which automatically creates and updates a release PR. The PR contains an up to date changelog based on the conventional commit messsages and sets the new version number. To trigger a release the release please PR has to be merged, which triggers the release please workflow (currently the release please PR has to be merged twice, because it creates a snapshot version first). The workflow will build the Maven packages, upload them to GitHub packages and build the docker image and upload it to docker hub. +We are using [release please](https://github.com/googleapis/release-please) which automatically creates and updates a release PR. The PR contains an up to date changelog based on the conventional commit messsages and sets the new version number. To trigger a release the release please PR has to be merged, which triggers the release please workflow (currently the release please PR has to be merged twice, because it creates a snapshot version first). The workflow will build the Maven packages, upload them to GitHub packages and build the Docker image and upload it to Docker hub. + +### Compas open scd + +In the compas-open-scd repository, update the version number in packages/compas-open-scd/package.json and make sure the submodule pointers are correct. Go to https://github.com/com-pas/compas-open-scd. Under releases click Draft a new release. In Choose a tag, create a new tag using the new version number. Click Generate release notes — review the notes and ensure they’re correct. + +Publishing the release will trigger a Github workflow and build the Docker image and upload it to Docker hub. ## Publish artifacts using Maven From 27f3775d7b15497277ccc0809e6ff90907849838 Mon Sep 17 00:00:00 2001 From: Christopher Lepski <139237321+clepski@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:25:57 +0200 Subject: [PATCH 3/5] doc: Rearrange release doc Signed-off-by: Christopher Lepski <139237321+clepski@users.noreply.github.com> --- docs/RELEASES.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/RELEASES.md b/docs/RELEASES.md index cf8ae64..dd51016 100644 --- a/docs/RELEASES.md +++ b/docs/RELEASES.md @@ -1,17 +1,15 @@ # Releasing software -## Create a release - -### Backend services - -We are using [release please](https://github.com/googleapis/release-please) which automatically creates and updates a release PR. The PR contains an up to date changelog based on the conventional commit messsages and sets the new version number. To trigger a release the release please PR has to be merged, which triggers the release please workflow (currently the release please PR has to be merged twice, because it creates a snapshot version first). The workflow will build the Maven packages, upload them to GitHub packages and build the Docker image and upload it to Docker hub. - -### Compas open scd +## Release Compas open scd In the compas-open-scd repository, update the version number in packages/compas-open-scd/package.json and make sure the submodule pointers are correct. Go to https://github.com/com-pas/compas-open-scd. Under releases click Draft a new release. In Choose a tag, create a new tag using the new version number. Click Generate release notes — review the notes and ensure they’re correct. Publishing the release will trigger a Github workflow and build the Docker image and upload it to Docker hub. +## Release backend service + +We are using [release please](https://github.com/googleapis/release-please) which automatically creates and updates a release PR. The PR contains an up to date changelog based on the conventional commit messsages and sets the new version number. To trigger a release the release please PR has to be merged, which triggers the release please workflow (currently the release please PR has to be merged twice, because it creates a snapshot version first). The workflow will build the Maven packages, upload them to GitHub packages and build the Docker image and upload it to Docker hub. + ## Publish artifacts using Maven To publish artifacts to GiHub Packages a distribution section needs to be added to pom.xml of the root. From cce745dbf309eb14a3a3c2c24ccfe099ecb0ee54 Mon Sep 17 00:00:00 2001 From: Christopher Lepski <139237321+clepski@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:35:42 +0200 Subject: [PATCH 4/5] doc: Update deployment docs Signed-off-by: Christopher Lepski <139237321+clepski@users.noreply.github.com> --- docs/DEPLOYMENT.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/DEPLOYMENT.md b/docs/DEPLOYMENT.md index 01ce752..78b3eca 100644 --- a/docs/DEPLOYMENT.md +++ b/docs/DEPLOYMENT.md @@ -1,6 +1,18 @@ # Deployment of CoMPAS We deploy the (native) Docker image of all CoMPAS services to Docker Hub. This way, it can be pulled and deployed into environments of your choice (OpenShift for example). +## Deploy demo environment + +The [compas deployment repository](https://github.com/com-pas/compas-deployment) contains the deployment definition and workflow. To deploy a new version follow these steps. + +1. Create a new branch and update the relevant Docker image tags to the new versions in `compas/docker-compose-postgresql.yml` + +2. Create a pull request from your branch and request a review from one of the contributors. + +3. Once the pipeline passed and the PR is approved, merge it. + +4. Merging the PR triggers the deployment process via Github Actions. Visit http://demo.compas.energy to confirm the new version is deployed and functioning correctly. + ## Quick Deployment instructions (under construction) The following instructions are terminal instructions for publishing a Quarkus docker image to Docker Hub. This should be done by a GitHub Action in the future. @@ -22,4 +34,4 @@ Few points in this single command: # Sources -[Full documentation about deploying Quarkus application to Docker Hub](https://dev.to/marcuspaulo/tutorial-publish-a-quarkus-application-in-kubernetes-minikube-and-dockerhub-36nd) \ No newline at end of file +[Full documentation about deploying Quarkus application to Docker Hub](https://dev.to/marcuspaulo/tutorial-publish-a-quarkus-application-in-kubernetes-minikube-and-dockerhub-36nd) From f5de83640508e09785c511c695f39e10ccb45fc4 Mon Sep 17 00:00:00 2001 From: Christopher Lepski <139237321+clepski@users.noreply.github.com> Date: Tue, 15 Jul 2025 13:58:20 +0200 Subject: [PATCH 5/5] doc: Add release cycle info Signed-off-by: Christopher Lepski <139237321+clepski@users.noreply.github.com> --- docs/RELEASES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/RELEASES.md b/docs/RELEASES.md index dd51016..014f4cd 100644 --- a/docs/RELEASES.md +++ b/docs/RELEASES.md @@ -1,5 +1,7 @@ # Releasing software +We aim to release about once a month, the releases are done per repository (if they have changes) as Docker images to DockerHub. + ## Release Compas open scd In the compas-open-scd repository, update the version number in packages/compas-open-scd/package.json and make sure the submodule pointers are correct. Go to https://github.com/com-pas/compas-open-scd. Under releases click Draft a new release. In Choose a tag, create a new tag using the new version number. Click Generate release notes — review the notes and ensure they’re correct.