Skip to content

Commit

Permalink
SONAR-23852 Creates new version structure
Browse files Browse the repository at this point in the history
  • Loading branch information
davividal committed Jan 10, 2025
1 parent 2194a60 commit 4da89c7
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 51 deletions.
42 changes: 22 additions & 20 deletions .cirrus/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
CURRENT_LTA_VERSION: 9.9.7
CURRENT_VERSION: 10.8.1
NEXT_VERSION: 2025.1

# Must be in the format YY.MM.0.###### where ###### is the build number
COMMUNITY_BUILD_VERSION: 25.1.0.102122

Expand Down Expand Up @@ -62,9 +63,9 @@ multi_arch_build_gcp_staging_task:
only_if: $CIRRUS_CRON == 'nightly-mend-scan' || $TRIGGER == 'PUSH_GCP_STAGING_IMAGES'
env:
matrix:
- version: 10/datacenter/app
- version: 2025.1/datacenter/app
STAGING_IMAGE_NAME: ${GCLOUD_STAGING_REGISTRY}/${GCLOUD_STAGING_PRODUCT_NAME}
- version: 10/datacenter/search
- version: 2025.1/datacenter/search
STAGING_IMAGE_NAME: ${GCLOUD_STAGING_REGISTRY}/${GCLOUD_STAGING_PRODUCT_NAME}/sonarqube-dce-search
ec2_instance:
<<: *VM_TEMPLATE
Expand Down Expand Up @@ -112,19 +113,20 @@ multi_arch_build_9_x_task:
- version: 9/datacenter/search
tag: $CURRENT_LTA_VERSION-datacenter-search

multi_arch_build_10_x_task:
multi_arch_build_2025_x_task:
<<: *multi_arch_build_task_template
skip: "!changesInclude('10/**/*') && !changesInclude('.cirrus/*')"
alias: multi_arch_build_sonarqube_server_task
skip: "!changesInclude('2025.1/**/*') && !changesInclude('.cirrus/*')"
env:
matrix:
- version: 10/developer
tag: $NEXT_VERSION-developer
- version: 10/enterprise
tag: $NEXT_VERSION-enterprise
- version: 10/datacenter/app
tag: $NEXT_VERSION-datacenter-app
- version: 10/datacenter/search
tag: $NEXT_VERSION-datacenter-search
- version: ${NEXT_VERSION}/developer
tag: ${NEXT_VERSION}-developer
- version: ${NEXT_VERSION}/enterprise
tag: ${NEXT_VERSION}-enterprise
- version: ${NEXT_VERSION}/datacenter/app
tag: ${NEXT_VERSION}-datacenter-app
- version: ${NEXT_VERSION}/datacenter/search
tag: ${NEXT_VERSION}-datacenter-search

multi_arch_build_community_build_task:
<<: *multi_arch_build_task_template
Expand All @@ -141,7 +143,7 @@ private_scan_task:
WS_WSS_URL: https://saas-eu.whitesourcesoftware.com/agent
matrix:
- tag: $CURRENT_LTA_VERSION-datacenter-app
- tag: $NEXT_VERSION-datacenter-app
- tag: ${NEXT_VERSION}-datacenter-app
ec2_instance:
<<: *CI_SCANNER
login_script:
Expand All @@ -153,7 +155,7 @@ private_scan_task:
- java -jar /usr/local/bin/wss-unified-agent.jar -c .cirrus/wss-unified-agent.config -apiKey $MEND_API_KEY -product ${WS_PRODUCTNAME} -project ${STAGING_IMAGE_NAME}:${tag} -wss.url ${WS_WSS_URL} -docker.scanImages true
depends_on:
- multi_arch_build_9_x
- multi_arch_build_10_x
- multi_arch_build_sonarqube_server

public_scan_task:
only_if: $CIRRUS_CRON == 'nightly-mend-scan'
Expand Down Expand Up @@ -211,9 +213,9 @@ multi_arch_test_9_x_task:
tag: $CURRENT_LTA_VERSION-datacenter
depends_on: multi_arch_build_9_x

multi_arch_test_10_x_task:
multi_arch_test_2025_x_task:
<<: *multi_arch_test_task_template
skip: "!changesInclude('10/**/*') && !changesInclude('.cirrus/*')"
skip: "!changesInclude('2025.1/**/*') && !changesInclude('.cirrus/*')"
matrix:
- env:
CIRRUS_ARCH: arm64
Expand All @@ -226,12 +228,12 @@ multi_arch_test_10_x_task:
env:
matrix:
- test_name: docker
tag: $NEXT_VERSION-developer
tag: ${NEXT_VERSION}-developer
- test_name: docker
tag: $NEXT_VERSION-enterprise
tag: ${NEXT_VERSION}-enterprise
- test_name: docker-compose
tag: $NEXT_VERSION-datacenter
depends_on: multi_arch_build_10_x
tag: ${NEXT_VERSION}-datacenter
depends_on: multi_arch_build_sonarqube_server

multi_arch_test_community_build_task:
<<: *multi_arch_test_task_template
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ jobs:
uses: ./.github/workflows/release-template.yml
with:
tag: ${{ matrix.tag }}
release-10-x:
name: Upload Release Assets for 10-X releases
if: contains(github.event.release.name, '10.')
release-2025-x:
name: Upload Release Assets for 2025.X releases
if: contains(github.event.release.name, 'SonarQube Server 2025.')
permissions:
contents: write
id-token: write
strategy:
fail-fast: false
matrix:
tag:
- 10-developer
- 10-enterprise
- 10-datacenter-app
- 10-datacenter-search
- 2025-developer
- 2025-enterprise
- 2025-datacenter-app
- 2025-datacenter-search
uses: ./.github/workflows/release-template.yml
with:
tag: ${{ matrix.tag }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM eclipse-temurin:17-jre-noble

LABEL io.k8s.description="SonarQube is a self-managed, automatic code review tool that systematically helps you deliver Clean Code."
LABEL io.k8s.description="SonarQube Server is a self-managed, automatic code review tool that systematically helps you deliver Clean Code."
LABEL io.openshift.min-cpu=400m
LABEL io.openshift.min-memory=2048M
LABEL io.openshift.non-scalable=false
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM eclipse-temurin:17-jre-noble

LABEL io.k8s.description="SonarQube is a self-managed, automatic code review tool that systematically helps you deliver Clean Code."
LABEL io.k8s.description="SonarQube Server is a self-managed, automatic code review tool that systematically helps you deliver Clean Code."
LABEL io.openshift.min-cpu=400m
LABEL io.openshift.min-memory=2048M
LABEL io.openshift.non-scalable=false
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion 10/developer/Dockerfile → 2025.1/developer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM eclipse-temurin:17-jre-noble

LABEL io.k8s.description="SonarQube is a self-managed, automatic code review tool that systematically helps you deliver Clean Code."
LABEL io.k8s.description="SonarQube Server is a self-managed, automatic code review tool that systematically helps you deliver Clean Code."
LABEL io.openshift.min-cpu=400m
LABEL io.openshift.min-memory=2048M
LABEL io.openshift.non-scalable=true
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion 10/enterprise/Dockerfile → 2025.1/enterprise/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM eclipse-temurin:17-jre-noble

LABEL io.k8s.description="SonarQube is a self-managed, automatic code review tool that systematically helps you deliver Clean Code."
LABEL io.k8s.description="SonarQube Server is a self-managed, automatic code review tool that systematically helps you deliver Clean Code."
LABEL io.openshift.min-cpu=400m
LABEL io.openshift.min-memory=2048M
LABEL io.openshift.non-scalable=true
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion community-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM eclipse-temurin:17-jre-noble

LABEL io.k8s.description="SonarQube is a self-managed, automatic code review tool that systematically helps you deliver Clean Code."
LABEL io.k8s.description="SonarQube Community Build is a self-managed, automatic code review tool that systematically helps you deliver Clean Code."
LABEL io.openshift.min-cpu=400m
LABEL io.openshift.min-memory=2048M
LABEL io.openshift.non-scalable=true
Expand Down
29 changes: 11 additions & 18 deletions release.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
# Releasing

Docker image release cycle and SonarQube Server product
---
## Docker image release cycle and SonarQube Server product

We consider the **docker image** as part of the SonarQube Server **product**. Therefore, it follows the same release process.

Overview
--------
## Overview

Release of a new version of the official SonarQube Server Docker images is made of several operations. (Please note that in case of a patch release that should not include the latest changes on master, you need to release from a new branch - e.g., `release/10.8.1` - and propagate the changes to master afterwards).

1. Set the new version of SonarQube Server (`SONARQUBE_VERSION`) to be released in the Dockerfiles. In case of community build, please remember to update `community-build/Dockerfile` only.
2. If you are releasing a new LTA, set `CURRENT_LTA_VERSION` in `.cirrus/tasks.yml`. Otherwise, if you are releasing a Community build, set `COMMUNITY_BUILD_VERSION` only. In all the other cases where a paid edition is about to be releases, set `CURRENT_VERSION` (please note that the nightly build will fail before the public image becomes available).
3. Update the docker hub SonarQube Server's documentation (if applicable)
4. Add a GIT tag for the new version
1. If you are releasing a SonarQube Server version, you need to [Draft a New Release](https://github.com/SonarSource/docker-sonarqube/releases/new), where the name matches "SonarQube Server 2025."
1. If you are releasing a SonarQube Server version, you need to [Draft a New Release](https://github.com/SonarSource/docker-sonarqube/releases/new), where the name matches "SonarQube Server 2025.", followed by the month version, i.e., "SonarQube Server 2025.1".
2. Likewise, if you are releasing a Community Build, the release name should match "Community Build", followed by the month version, i.e., "Community Build 25.1".
5. Update Docker Hub's SonarQube Server images


Bump the version of SonarQube Server in Dockerfiles
-----------------------------
## Bump the version of SonarQube Server in Dockerfiles

The version of SonarQube Server is hardcoded in each Dockerfile of this repository and must be updated in master branch.

Update the docker hub SonarQube Server's documentation (if applicable)
-------------------------------
## Update the docker hub SonarQube Server's documentation (if applicable)

If needed, prepare PR of Docker Hub documentation [https://github.com/docker-library/docs](https://github.com/docker-library/docs)

Expand All @@ -41,30 +37,27 @@ Until SonarQube Server is released and the public artifacts are available, keep

For more and up to date documentation, see https://github.com/docker-library/docs.


Update Docker Hub's SonarQube Server images
-----------------------
## Update Docker Hub's SonarQube Server images

In order to update the Docker Hub images, a Pull Request must be created on the [official-images](https://github.com/docker-library/official-images) repository.

To do so you can use your own personal fork.

Create a feature branch on the fork:

* `GitCommit` must be updated to this repository master branch's HEAD.
* `GitFetch` is the branch/tag (e.g., refs/tags/10.8.1) where the commit can be found. Setting this value is only needed if you are releasing from a branch different from master.
* `Tags` and `Directory` must be added/updated appropriatly for each edition
* see https://github.com/docker-library/official-images/pull/8837/files as an example

Until SonarQube Server is released and the public artifacts are available, keep your PR a draft PR to make it clear it is not ready to be merged yet.

* Create the PR [here](https://github.com/docker-library/official-images/compare)
* If the documentation was updated in the step before, reference that PR in this PR.
* If the documentation was updated in the step before, reference that PR in this PR.
* Click on *compare across fork* to be able to use the fork as head repository.


For more and up to date documentation, see https://github.com/docker-library/official-images.


Add a GIT tag for the new version
----------------
## Add a GIT tag for the new version

The commit referenced in the DockerHub Pull Request must be tagged with the (marketing) version of SQ: eg. `8.0`, `8.0.1`, `8.1`.
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sonar.projectKey=SonarSource_docker-sonarqube_AYcnOvlJTpBOcQuGEdI5
sonar.sources=9/,10/
sonar.sources=9/,2025.1/
sonar.organization=sonarsource

0 comments on commit 4da89c7

Please sign in to comment.