From a65c46f8b4fc065d657792b47444dba00e79ed20 Mon Sep 17 00:00:00 2001 From: brais <26645694+braisvq1996@users.noreply.github.com> Date: Wed, 17 Jul 2024 14:45:51 +0200 Subject: [PATCH] Release 4.5.1 (#1294) --- CHANGELOG.md | 8 ++++++++ configuration-sample/ods-core.env.sample | 2 +- jenkins/webhook-proxy/main.go | 10 ++++++++++ sonarqube/chart/Chart.yaml | 2 +- sonarqube/test.sh | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ade0de9e3..fb8c1eb4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,14 @@ ### Fixed +## [4.5.1] - 2024-07-17 + +### Added +- Added webhook proxy logic to skip requests with the ref id starting with "refs/notes/" ([#1288](https://github.com/opendevstack/ods-core/pull/1288)) + +### Changed +- Update SonarQube to 9.9.6 ([#1292](https://github.com/opendevstack/ods-core/pull/1292)) + ## [4.5.0] - 2024-06-06 ### Added diff --git a/configuration-sample/ods-core.env.sample b/configuration-sample/ods-core.env.sample index a381f39e0..d3f83b9f9 100644 --- a/configuration-sample/ods-core.env.sample +++ b/configuration-sample/ods-core.env.sample @@ -135,7 +135,7 @@ SONAR_EDITION=community # See Dockerhub https://hub.docker.com/_/sonarqube/tags # Officially supported is: # - 9.9 (LTS release) -SONAR_VERSION=9.9.5 +SONAR_VERSION=9.9.6 # SonarQube memory and CPU resources SONARQUBE_CPU_REQUEST=200m diff --git a/jenkins/webhook-proxy/main.go b/jenkins/webhook-proxy/main.go index e14e324da..132fcceab 100644 --- a/jenkins/webhook-proxy/main.go +++ b/jenkins/webhook-proxy/main.go @@ -392,6 +392,16 @@ func (s *Server) HandleRoot() http.HandlerFunc { return } + // Skip requests with where the ref id is starting with "refs/notes/" + // Reference 1: https://community.atlassian.com/t5/Bitbucket-questions/disable-quot-git-notes-add-quot-behaviour-for-semantic-release/qaq-p/1837322 + // Reference 2: https://github.com/semantic-release/semantic-release/discussions/2017#discussioncomment-995308 + if len(req.Changes) > 0 && strings.Contains(req.Changes[0].Ref.DisplayID, "refs/notes/") { + log.Println(requestID, "Skipping request with refs/notes/ prefix in ref id") + // Return 200 OK to Bitbucket to avoid retries + http.Error(w, "OK", http.StatusOK) + return + } + if req.EventKey == "repo:refs_changed" { repo = req.Repository.Slug if component == "" { diff --git a/sonarqube/chart/Chart.yaml b/sonarqube/chart/Chart.yaml index 67e524ece..2dcab6e8b 100644 --- a/sonarqube/chart/Chart.yaml +++ b/sonarqube/chart/Chart.yaml @@ -21,4 +21,4 @@ version: 1.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "9.9.5" +appVersion: "9.9.6" diff --git a/sonarqube/test.sh b/sonarqube/test.sh index 97975f531..d15e6f018 100755 --- a/sonarqube/test.sh +++ b/sonarqube/test.sh @@ -6,7 +6,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ODS_CORE_DIR=${SCRIPT_DIR%/*} ODS_CONFIGURATION_DIR="${ODS_CORE_DIR}/../ods-configuration" -SONAR_VERSION=9.9.4 +SONAR_VERSION=9.9.6 SONAR_EDITION="community" function usage {