Skip to content

Commit 429f4ab

Browse files
authored
Prepare release 4.11 (#1358)
1 parent 2eb5f35 commit 429f4ab

File tree

62 files changed

+2927
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2927
-155
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
runs-on: ubuntu-22.04
5252
strategy:
5353
matrix:
54-
version: ['10.8.0'] # 9.9 = LTS
54+
version: ['2025.5.0']
5555
edition: ['developer', 'enterprise']
5656
steps:
5757
-
@@ -66,6 +66,21 @@ jobs:
6666
run: |
6767
cd sonarqube && ./test.sh --sq-version=${{ matrix.version }} --sq-edition=${{ matrix.edition }}
6868
69+
sonarqube-postgresql:
70+
name: SonarQube PostgreSQL tests
71+
runs-on: ubuntu-22.04
72+
steps:
73+
-
74+
name: Checkout repository
75+
uses: actions/checkout@v4.2.2
76+
-
77+
name: Build docker image
78+
run: |
79+
./.github/workflows/build-docker-image.sh \
80+
--imagename ods-sonarqube-postgresql \
81+
--dockerdir sonarqube/docker \
82+
--dockerfile Dockerfile.database
83+
6984
nexus:
7085
name: Nexus tests
7186
runs-on: ubuntu-22.04

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@
55
### Added
66

77
### Changed
8-
- Adapted Sonarqube server configuration to make projects private and have custom gate ([#1347](https://github.com/opendevstack/ods-core/pull/1347))
98

109
### Fixed
1110

11+
## [4.11.0] - 2025-12-03
12+
13+
### Added
14+
- New core component, OpenDevStack API service ([#1356](https://github.com/opendevstack/ods-core/pull/1356)) & ([#1357](https://github.com/opendevstack/ods-core/pull/1357))
15+
16+
### Changed
17+
- Change Cnes report to custom SonarQube report ([#1354](https://github.com/opendevstack/ods-core/pull/1354))
18+
- Adapted Sonarqube server configuration to make projects private and have custom gate ([#1347](https://github.com/opendevstack/ods-core/pull/1347))
19+
- Update Aqua cli to 2022.4.829 ([#1353](https://github.com/opendevstack/ods-core/pull/1353))
20+
- Update SonarQube and use local image for database ([#1343](https://github.com/opendevstack/ods-core/pull/1343))
21+
- Cleanup SonarQube backup process as data folder for server does not need backup ([#1355](https://github.com/opendevstack/ods-core/pull/1355))
22+
1223
## [4.10.0] - 2025-10-08
1324
### Added
1425
- Added post creation process ([#1351](https://github.com/opendevstack/ods-core/pull/1351))

Makefile

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ SHELL = /bin/bash
44
MAKEFLAGS += --warn-undefined-variables
55
MAKEFLAGS += --no-builtin-rules
66

7-
# Load environment variables from .env file
7+
# Load environment variables from ods-core.env file
88
include ../ods-configuration/ods-core.env
99
export $(shell sed 's/=.*//' ../ods-configuration/ods-core.env)
1010

11+
# Load environment variables from ods-core.ods-api-service.env file
12+
include ../ods-configuration/ods-core.ods-api-service.env
13+
export $(shell sed 's/=.*//' ../ods-configuration/ods-core.ods-api-service.env)
14+
1115
INSECURE := false
1216
INSECURE_FLAG :=
1317
ifeq ($(INSECURE), $(filter $(INSECURE), true yes))
@@ -131,13 +135,13 @@ apply-sonarqube-chart:
131135

132136
## Start build of BuildConfig "sonarqube".
133137
start-sonarqube-build:
134-
ocp-scripts/start-and-follow-build.sh --namespace $(ODS_NAMESPACE) --build-config sonarqube
138+
ocp-scripts/start-and-follow-build.sh --namespace $(ODS_NAMESPACE) --build-config sonarqube && ocp-scripts/start-and-follow-build.sh --namespace $(ODS_NAMESPACE) --build-config sonarqube-postgresql
135139
@echo "Visit $(SONARQUBE_URL)/setup to see if any update actions need to be taken."
136140
.PHONY: start-sonarqube-build
137141

138142
## Configure SonarQube service.
139143
configure-sonarqube:
140-
cd sonarqube && ./configure.sh --sonarqube=$(SONARQUBE_URL) $(INSECURE_FLAG)
144+
cd sonarqube && ./configure.sh --sonarqube=$(SONARQUBE_URL) --database-config=true $(INSECURE_FLAG)
141145
.PHONY: configure-sonarqube
142146

143147

@@ -178,23 +182,48 @@ start-opentelemetry-collector-build:
178182
ocp-scripts/start-and-follow-build.sh --namespace $(ODS_NAMESPACE) --build-config opentelemetry-collector
179183
.PHONY: start-opentelemetry-collector-build
180184

185+
# ODS API SERVICE
186+
## Install or update Ods API Service.
187+
install-ods-api-service: start-ods-api-service-build apply-ods-api-service-chart
188+
.PHONY: ods-api-service
189+
190+
## Start build of BuildConfig "Ods API Service".
191+
start-ods-api-service-build:
192+
cd ods-api-service/build-config && oc process -f template.yaml -p ODS_NAMESPACE=$(ODS_NAMESPACE) -p ODS_IMAGE_TAG=$(ODS_IMAGE_TAG) -p BITBUCKET_URL=$(BITBUCKET_URL) -p ODS_BITBUCKET_PROJECT=$(ODS_BITBUCKET_PROJECT) -p ODS_GIT_REF=$(ODS_GIT_REF) -p ODS_API_SERVICE_VERSION=$(ODS_API_SERVICE_VERSION) | oc apply --namespace $(ODS_NAMESPACE) -f -
193+
ocp-scripts/start-and-follow-build.sh --namespace $(ODS_NAMESPACE) --build-config ods-api-service
194+
.PHONY: start-ods-api-service-build
195+
196+
## Apply OpenShift resources related to the Ods API Service.
197+
apply-ods-api-service-chart:
198+
cd ods-api-service/chart && envsubst < values.yaml.template > values.yaml && helm upgrade --install --namespace $(ODS_NAMESPACE) \
199+
-f values.yaml \
200+
--set projectId=$(ODS_NAMESPACE) \
201+
--set appSelector=app=ods-api-service \
202+
--set registry=$(DOCKER_REGISTRY) \
203+
--set componentId=ods-api-service \
204+
--set global.projectId=$(ODS_NAMESPACE) \
205+
--set global.appSelector=app=ods-api-service \
206+
--set global.registry=$(DOCKER_REGISTRY) \
207+
--set global.componentId=ods-api-service \
208+
--set imageNamespace=$(ODS_NAMESPACE) \
209+
--set imageTag=$(ODS_IMAGE_TAG) \
210+
--set global.imageNamespace=$(ODS_NAMESPACE) \
211+
--set global.imageTag=$(ODS_IMAGE_TAG) \
212+
--set ODS_OPENSHIFT_APP_DOMAIN=$(OPENSHIFT_APPS_BASEDOMAIN) \
213+
ods-api-service . && rm values.yaml
214+
.PHONY: apply-ods-api-service-chart
215+
181216

182217
# BACKUP
183218
## Create a backup of the current state.
184-
backup: backup-sonarqube backup-ocp-config
219+
backup: backup-ocp-config
185220
.PHONY: backup
186221

187222
## Create a backup of OpenShift resources in "ods" namespace.
188223
backup-ocp-config:
189224
tailor export --namespace $(ODS_NAMESPACE) > backup_ods.yml
190225
.PHONY: backup-ocp-config
191226

192-
## Create a backup of the SonarQube database in backup storage and in the current directory.
193-
backup-sonarqube:
194-
cd sonarqube && ./backup.sh --namespace $(ODS_NAMESPACE) --local-copy=true --backup-dir `pwd`
195-
.PHONY: backup-sonarqube
196-
197-
198227
# PVC MIGRATION
199228
## Migrate data from one PVC to another. Options: SOURCE_PVC, TARGET_PVC, THREADS (default: 5), CPU_REQUEST (default: 1), MEMORY (default: 2)
200229
migrate-pvc-data:

configuration-sample/ods-core.env.sample

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ NEXUS_STORAGE_PROVISIONER="ebs.csi.aws.com"
8989
# Storage class for Nexus data, for AWS this should be "gp3-csi"
9090
NEXUS_STORAGE_CLASS_DATA="gp3-csi"
9191

92-
# Storage class for Nexus backup, for AWS this should be "gp2-encrypted"
92+
# Storage class for Nexus backup, for AWS this should be "csi-aws-vsc"
9393
NEXUS_STORAGE_CLASS_BACKUP="csi-aws-vsc"
9494

9595
# Nexus snapshot configuration, default to run daily at 2 AM
@@ -124,6 +124,8 @@ SONAR_ADMIN_PASSWORD_B64=changeme
124124
# Authentication token used by sonar-scanner-cli from Jenkins pipelines.
125125
# Do not change the value manually - the token is created and set automatically during "make configure-sonarqube".
126126
SONAR_AUTH_TOKEN_B64=changeme
127+
# Web authetification code, needed for liveness Probe
128+
SONAR_WEB_SYSTEMPASSCODE_B64=changeme
127129

128130
# Toggle authentication via SAML
129131
SONAR_AUTH_SAML='true'
@@ -138,14 +140,17 @@ SONAR_SAML_CERTIFICATE_B64=changeme
138140
# Image to use for the PostgreSQL database. This needs to be compatible with
139141
# your SonarQube version, see https://docs.sonarqube.org/latest/requirements/requirements/.
140142
# Take care when upgrading either database or SQ version.
141-
# E.g. registry.redhat.io/rhel9/postgresql-15
142-
SONAR_DATABASE_IMAGE=docker-registry.default.svc:5000/openshift/postgresql:15
143+
# E.g. registry.redhat.io/rhel10/postgresql-16
144+
SONAR_DATABASE_IMAGE=registry.redhat.io/rhel10/postgresql-16
143145
# Connection string for JDBC. Typically this does not need to be changed.
144146
SONAR_DATABASE_JDBC_URL=jdbc:postgresql://sonarqube-postgresql:5432/sonarqube
145147
# Database name for SonarQube. Typically this does not need to be changed.
146148
SONAR_DATABASE_NAME=sonarqube
147149
# Password of SonarQube database - should be set to a secure password.
148150
SONAR_DATABASE_PASSWORD_B64=changeme
151+
SONAR_DATABASE_SUPER_NAME=super_sonarqube
152+
# Super Password of SonarQube database - should be set to a secure password.
153+
SONAR_DATABASE_SUPER_PASSWORD_B64=changeme
149154
# User of SonarQube database. Typically this does not need to be changed.
150155
SONAR_DATABASE_USER=sonarqube
151156

@@ -157,29 +162,62 @@ SONAR_EDITION=developer
157162
# SonarQube version.
158163
# See Dockerhub https://hub.docker.com/_/sonarqube/tags
159164
# Officially supported is:
160-
# - 10.8.0
161-
SONAR_VERSION=10.8.0
165+
# - 2025.5.0
166+
SONAR_VERSION=2025.5.0
162167

163168
# SonarQube memory and CPU resources
164-
SONARQUBE_CPU_REQUEST=200m
165-
SONARQUBE_MEMORY_REQUEST=2Gi
166-
SONARQUBE_CPU_LIMIT=1
167-
SONARQUBE_MEMORY_LIMIT=4Gi
169+
SONARQUBE_CPU_REQUEST=300m
170+
SONARQUBE_MEMORY_REQUEST=5Gi
171+
SONARQUBE_CPU_LIMIT=2
172+
SONARQUBE_MEMORY_LIMIT=5Gi
168173

169174
# SonarQube data and backup capacity
170175
SONARQUBE_DATA_CAPACITY=2Gi
171176
SONARQUBE_EXTENSIONS_CAPACITY=1Gi
172177

173178
# SonarQube database memory and CPU resources
174-
SONARQUBE_DB_CPU_REQUEST=100m
175-
SONARQUBE_DB_MEMORY_REQUEST=256Mi
176-
SONARQUBE_DB_CPU_LIMIT=1
179+
SONARQUBE_DB_CPU_REQUEST=200m
180+
SONARQUBE_DB_MEMORY_REQUEST=512Mi
181+
SONARQUBE_DB_CPU_LIMIT=2
177182
SONARQUBE_DB_MEMORY_LIMIT=512Mi
178183

179184
# SonarQube database and backup capacity
180185
SONARQUBE_DB_CAPACITY=2Gi
181186
SONARQUBE_DB_BACKUP_CAPACITY=1Gi
182187

188+
# SonarQube data storage name
189+
SONARQUBE_DATA_STORAGE_NAME="sonarqube-data-storage"
190+
191+
# Storage class provisioner for SonarQube data, for AWS this should be "ebs.csi.aws.com"
192+
SONARQUBE_STORAGE_PROVISIONER=""
193+
194+
# Storage class for SonarQube data, for AWS this should be "gp3-csi"
195+
SONARQUBE_STORAGE_CLASS_DATA=""
196+
197+
# Storage class provisioner for fast SonarQube storage, for AWS this should be "ebs.csi.aws.com"
198+
SONARQUBE_FAST_STORAGE_PROVISIONER="ebs.csi.aws.com"
199+
200+
# Storage class for fast SonarQube data, for AWS this should be "gp3-csi"
201+
SONARQUBE_FAST_STORAGE_CLASS_DATA="gp3-csi"
202+
203+
# Storage class for fast SonarQube backup, for AWS this should be "csi-aws-vsc"
204+
SONARQUBE_FAST_STORAGE_CLASS_BACKUP="csi-aws-vsc"
205+
206+
# SonarQube backup configuration, default to run daily at 2 AM
207+
SONARQUBE_BACKUP_SCHEDULE="0 2 * * *"
208+
209+
# SonarQube DB backup TTL in days (default: 30 days)
210+
SONARQUBE_DB_BACKUP_TTL=30
211+
212+
# SonarQube scan configuration
213+
SONAR_SCAN_ENABLED="true"
214+
SONAR_SCAN_EXCLUSIONS=".json,.xml,**/__pycache__/**,**/*.pyc,/venv/,/.venv/,/site-packages/,/node_modules/,/dist/,/build/,/out/,/coverage/,/.next/,/.parcel-cache/,/target/,/.gradle/,/.mvn/,/vendor/,/bin/,/obj/,/build/libs/,/.terraform/,/pkg/,/android/,/ios/,/www/,/target/**,/Cargo.lock,/target/,/**/*.class,/**/*.jar,/**/*.war"
215+
SONAR_SCAN_NEXUS_REPOSITORY=leva-documentation
216+
SONAR_SCAN_ALERT_EMAILS=
217+
SONAR_SCAN_PROJECTS_PRIVATE="false"
218+
SONAR_SCAN_ACCOUNT=cd-user-with-password
219+
220+
183221
#########
184222
# Jira #
185223
#########
@@ -273,8 +311,8 @@ JENKINS_AGENT_BASE_SNYK_DISTRIBUTION_URL=https://github.com/snyk/snyk/releases/d
273311
# Releases are published at https://download.aquasec.com/scanner
274312
# Check Aqua versions backward compatibility at https://docs.aquasec.com/docs/version-compatibility-of-components#section-backward-compatibility-across-two-major-versions
275313
# To Download the aquaSec scanner cli and check their documentaion requires a valid account on aquasec.com
276-
# Latest tested version is 2022.4.760
277-
# Example: https://<USER>:<PASSWORD>@download.aquasec.com/scanner/2022.4.760/scannercli
314+
# Latest tested version is 2022.4.829
315+
# Example: https://<USER>:<PASSWORD>@download.aquasec.com/scanner/2022.4.829/scannercli
278316
JENKINS_AGENT_BASE_AQUASEC_SCANNERCLI_URL=
279317

280318
# Repository of shared library
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#####################################################
2+
# Global configuration for OpenDevStack Api Service #
3+
#####################################################
4+
5+
# OpenDevStack Api Service Version
6+
# See https://github.com/opendevstack/ods-api-service/releases
7+
ODS_API_SERVICE_VERSION=0.0.1
8+
9+
# JVM configuration
10+
JAVA_OPTS=-Xmx1g -Djavax.net.ssl.trustStore=/home/default/custom-truststore.jks -Djavax.net.ssl.trustStorePassword=changeit
11+
12+
# Logging Configuration
13+
DEFAULT_LOG_LEVEL=INFO
14+
15+
# OAuth2 Configuration
16+
OAUTH2_ISSUER=https://sts.example.com/tenant-id/
17+
OAUTH2_AUDIENCE=api://example-audience-id
18+
OAUTH2_JWK_SET_URI=https://sts.example.com/tenant-id/discovery/keys
19+
20+
# Certificate URLs
21+
CERT_URLS=https://example.com/pki/root-ca.crt,https://example.com/pki/issuing-ca-01.crt
22+
23+
# OpenAPI Configuration
24+
OPENAPI_SERVER_URL=https://ods-api-service.example.com
25+
CONTACT_EMAIL=support@example.com
26+
27+
# AAP Configuration
28+
AAP_BASE_URL=https://aap.example.com/api/v2/
29+
AAP_USERNAME=aap-user
30+
AAP_PASSWORD=aap-password-change-me
31+
32+
# UIPath Configuration
33+
UIPATH_HOST=https://uipath.example.com
34+
UIPATH_CLIENT_ID=example-client-id
35+
UIPATH_CLIENT_SECRET=example-client-secret
36+
UIPATH_TENANCY_NAME=default
37+
UIPATH_ORGANIZATION_UNIT_ID=1
38+
UIPATH_LOGIN_ENDPOINT=/api/Account/Authenticate
39+
UIPATH_QUEUE_ITEMS_ENDPOINT=/odata/QueueItems
40+
41+
# Projects Info Service
42+
PROJECTS_INFO_SERVICE_BASE_URL=https://projects-info-service.example.com
43+
AZURE_ACCESS_TOKEN=example-azure-token
44+
AZURE_DATAHUB_GROUP_ID=example-datahub-group
45+
TESTING_HUB_API_URL=https://testinghub-api.example.com/v1/projects
46+
TESTING_HUB_API_TOKEN=example-testing-hub-token
47+
TESTING_HUB_DEFAULT_PROJECTS=PROJECT1:1, PROJECT2:2
48+
49+
# OpenShift Cluster Tokens
50+
OPENSHIFT_USTEST_API_URL=https://api.us-test.example.com:6443
51+
OPENSHIFT_USTEST_TOKEN=example-ustest-token-change-me
52+
53+
OPENSHIFT_EUDEV_API_URL=https://api.eu-dev.example.com:6443
54+
OPENSHIFT_EUDEV_TOKEN=example-eudev-token-change-me
55+
56+
OPENSHIFT_USDEV_API_URL=https://api.us-dev.example.com:6443
57+
OPENSHIFT_USDEV_TOKEN=example-usdev-token-change-me
58+
59+
OPENSHIFT_CNDEV_API_URL=https://api.cn-dev.example.com:6443
60+
OPENSHIFT_CNDEV_TOKEN=example-cndev-token-change-me
61+
62+
OPENSHIFT_INHDEV_API_URL=https://api.inh-dev.example.com:6443
63+
OPENSHIFT_INHDEV_TOKEN=example-inhdev-token-change-me
64+
65+
# Bitbucket Platforms Configuration
66+
BITBUCKET_PLATFORMS_BASE_PATH=https://bitbucket.example.com/projects/PLATFORMS/repos/sections-links/raw/
67+
BITBUCKET_PLATFORMS_USTEST=us-test-sections.yml?at=main
68+
BITBUCKET_PLATFORMS_EUDEV=eu-sections.yml?at=main
69+
BITBUCKET_PLATFORMS_USDEV=us-sections.yml?at=main
70+
BITBUCKET_PLATFORMS_CNDEV=cn-sections.yml?at=main
71+
BITBUCKET_PLATFORMS_INHDEV=inh-sections.yml?at=main
72+
BITBUCKET_PLATFORMS_BEARER_TOKEN=example-bitbucket-bearer-token
73+
74+
# Project Users JWT Secret
75+
PROJECT_USERS_JWT_SECRET=example-jwt-secret-key-256bit-change-in-production
76+
PROJECT_USERS_WORKFLOW_NAME=example-api-service-add-user-to-project-workflow
77+
PROJECT_USERS_JWT_EXPIRATION_HOURS=24
78+
79+
# OpenTelemetry Endpoint
80+
OTEL_EXPORTER_OTLP_ENDPOINT=http://opentelemetry-collector.example.com
81+

jenkins/agent-base/Dockerfile.ubi8

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ FROM quay.io/openshift/origin-jenkins-agent-base
22

33
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
44

5-
ENV SONAR_SCANNER_VERSION=6.2.1.4610 \
6-
CNES_REPORT_VERSION=5.0.0 \
5+
ENV SONAR_SCANNER_VERSION=7.3.0.5189 \
6+
SONAR_REPORT_VERSION=1.2 \
77
COSIGN_VERSION=2.4.3 \
88
TAILOR_VERSION=1.3.4 \
99
SOPS_VERSION=3.9.0 \
@@ -57,12 +57,12 @@ RUN cd /tmp \
5757
&& /usr/local/sonar-scanner-cli/bin/sonar-scanner --version
5858
ENV PATH=/usr/local/sonar-scanner-cli/bin:$PATH
5959

60-
# Add sq cnes report jar.
60+
# Add sq report jar.
6161
RUN cd /tmp \
62-
&& curl -sSL https://github.com/cnescatlab/sonar-cnes-report/releases/download/${CNES_REPORT_VERSION}/sonar-cnes-report-${CNES_REPORT_VERSION}.jar -o cnesreport.jar \
63-
&& mkdir /usr/local/cnes \
64-
&& mv cnesreport.jar /usr/local/cnes/cnesreport.jar \
65-
&& chmod 777 /usr/local/cnes/cnesreport.jar
62+
&& curl -sSL https://github.com/opendevstack/sonar-report/releases/download/v${SONAR_REPORT_VERSION}/sonar-report-v${SONAR_REPORT_VERSION}.jar -o sonar-report.jar \
63+
&& mkdir /usr/local/sonar \
64+
&& mv sonar-report.jar /usr/local/sonar/sonar-report.jar \
65+
&& chmod 777 /usr/local/sonar/sonar-report.jar
6666

6767
# Install sigstore/cosign
6868
RUN cd /tmp \

0 commit comments

Comments
 (0)