Skip to content

Commit

Permalink
NO-JIRA Fix missing package generation on non-LTA branches
Browse files Browse the repository at this point in the history
  • Loading branch information
carminevassallo committed Dec 20, 2024
1 parent a849fe0 commit dc35134
Show file tree
Hide file tree
Showing 71 changed files with 913 additions and 3,111 deletions.
10 changes: 3 additions & 7 deletions .cirrus/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@ set -xeuo pipefail

PREVIOUS_RELEASE=$(gh api "/repos/{owner}/{repo}/releases" --jq "[.[] | select(.target_commitish==\"${TARGET_BRANCH}\")][1].tag_name")

# There MIGHT be a some edge case where PREVIOUS_RELEASE shouldn't be HEAD,
# for example, releasing a patch for non-LTA. To be investigated.
[[ -z "${PREVIOUS_RELEASE}" ]] && PREVIOUS_RELEASE="HEAD" || echo "${PREVIOUS_RELEASE}"

CHARTS=$(ct list-changed --since "${PREVIOUS_RELEASE}" --target-branch "${TARGET_BRANCH}")
[[ -z "${PREVIOUS_RELEASE}" ]] && CHARTS=("charts/sonarqube-dce" "charts/sonarqube") || CHARTS=$(ct list-changed --since "${PREVIOUS_RELEASE}" --target-branch "${TARGET_BRANCH}")

BUILD_METADATA="-${BUILD_NUMBER}"
[[ ${CIRRUS_RELEASE:-} != "" ]] && BUILD_METADATA=""

echo "${CHARTS}"
echo "${CHARTS[@]}"

for chart in ${CHARTS}; do
for chart in ${CHARTS[@]}; do
_original_version=$(yq '.version' "${chart}"/Chart.yaml)
_new_version="${_original_version}${BUILD_METADATA}"
helm dependency build "${chart}"
Expand Down
4 changes: 4 additions & 0 deletions charts/sonarqube-dce/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All changes to this chart will be documented in this file.
* Update Chart's version to 2025.1.0
* Update ingress-nginx subchart to 4.11.3

## [10.8.1]
* Update Chart's version to 10.8.1
* Upgrade SonarQube Server to 10.8.1

## [10.8.0]
* Update Chart's version to 10.8.0
* Upgrade SonarQube Server to 10.8.0
Expand Down
6 changes: 3 additions & 3 deletions charts/sonarqube-dce/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: sonarqube-dce
description: SonarQube is a self-managed, automatic code review tool that systematically helps you deliver clean code. As a core element of our Sonar solution, SonarQube integrates into your existing workflow and detects issues in your code to help you perform continuous code inspections of your projects. The tool analyses 30+ different programming languages and integrates into your CI pipeline and DevOps platform to ensure that your code meets high-quality standards.
type: application
version: 2025.1.0
appVersion: 10.8.0
appVersion: 10.8.1
keywords:
- coverage
- security
Expand Down Expand Up @@ -37,9 +37,9 @@ annotations:
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/images: |
- name: sonarqube-app
image: sonarqube:10.8.0-datacenter-app
image: sonarqube:10.8.1-datacenter-app
- name: sonarqube-search
image: sonarqube:10.8.0-datacenter-search
image: sonarqube:10.8.1-datacenter-search
charts.openshift.io/name: sonarqube-dce
dependencies:
- name: postgresql
Expand Down
6 changes: 3 additions & 3 deletions charts/sonarqube-dce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Please note that this chart does NOT support SonarQube Community, Developer, and

## Compatibility

Compatible SonarQube Version: `10.8.0`
Compatible SonarQube Version: `10.8.1`

Supported Kubernetes Versions: From `1.24` to `1.31`
Supported Openshift Versions: From `4.11` to `4.16`
Expand Down Expand Up @@ -282,7 +282,7 @@ The following table lists the configurable parameters of the SonarQube chart and
| Parameter | Description | Default |
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- |
| `searchNodes.image.repository` | search image repository | `sonarqube` |
| `searchNodes.image.tag` | search image tag | `10.8.0-datacenter-search` |
| `searchNodes.image.tag` | search image tag | `10.8.1-datacenter-search` |
| `searchNodes.image.pullPolicy` | search image pull policy | `IfNotPresent` |
| `searchNodes.image.pullSecret` | (DEPRECATED) search imagePullSecret to use for private repository | `nil` |
| `searchNodes.image.pullSecrets` | search imagePullSecrets to use for private repository | `nil` |
Expand Down Expand Up @@ -339,7 +339,7 @@ The following table lists the configurable parameters of the SonarQube chart and
| Parameter | Description | Default |
| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `applicationNodes.image.repository` | app image repository | `sonarqube` |
| `applicationNodes.image.tag` | app image tag | `10.8.0-datacenter-app` |
| `applicationNodes.image.tag` | app image tag | `10.8.1-datacenter-app` |
| `applicationNodes.image.pullPolicy` | app image pull policy | `IfNotPresent` |
| `applicationNodes.image.pullSecret` | (DEPRECATED) app imagePullSecret to use for private repository | `nil` |
| `applicationNodes.image.pullSecrets` | app imagePullSecrets to use for private repository | `nil` |
Expand Down
4 changes: 2 additions & 2 deletions charts/sonarqube-dce/ci/cirrus-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ searchNodes:
replicaCount: 1
image:
repository: "sonarsource/sonarqube"
tag: "10.8.0-datacenter-search"
tag: "10.8.1-datacenter-search"
pullSecrets:
- name: pullsecret

Expand All @@ -14,7 +14,7 @@ ApplicationNodes:
jwtSecret: "mnGBJtmwRbIREqy3vSw6Cinoi2WEom9JH+iw/tXOJX4="
image:
repository: "sonarsource/sonarqube"
tag: "10.8.0-datacenter-app"
tag: "10.8.1-datacenter-app"
pullSecrets:
- name: pullsecret

Expand Down
4 changes: 2 additions & 2 deletions charts/sonarqube-dce/openshift-verifier/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ searchNodes:
replicaCount: 1
image:
repository: "sonarsource/sonarqube"
tag: "10.8.0-datacenter-search"
tag: "10.8.1-datacenter-search"
pullSecrets:
- name: pullsecret

Expand All @@ -22,6 +22,6 @@ ApplicationNodes:
jwtSecret: "dZ0EB0KxnF++nr5+4vfTCaun/eWbv6gOoXodiAMqcFo="
image:
repository: "sonarsource/sonarqube"
tag: "10.8.0-datacenter-app"
tag: "10.8.1-datacenter-app"
pullSecrets:
- name: pullsecret
4 changes: 2 additions & 2 deletions charts/sonarqube-dce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
searchNodes:
image:
repository: sonarqube
tag: 10.8.0-datacenter-search
tag: 10.8.1-datacenter-search
pullPolicy: IfNotPresent
# If using a private repository, the imagePullSecrets to use
# pullSecrets:
Expand Down Expand Up @@ -153,7 +153,7 @@ searchNodes:
applicationNodes:
image:
repository: sonarqube
tag: 10.8.0-datacenter-app
tag: 10.8.1-datacenter-app
pullPolicy: IfNotPresent
# If using a private repository, the imagePullSecrets to use
# pullSecrets:
Expand Down
2 changes: 1 addition & 1 deletion charts/sonarqube/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: sonarqube
description: SonarQube is a self-managed, automatic code review tool that systematically helps you deliver clean code. As a core element of our Sonar solution, SonarQube integrates into your existing workflow and detects issues in your code to help you perform continuous code inspections of your projects. The tool analyses 30+ different programming languages and integrates into your CI pipeline and DevOps platform to ensure that your code meets high-quality standards.
type: application
version: 2025.1.1
version: 2025.1.0
appVersion: 10.8.1
keywords:
- coverage
Expand Down
4 changes: 2 additions & 2 deletions charts/sonarqube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Please note that this chart only supports SonarQube Community, Developer, and En

## Compatibility

Compatible SonarQube Server Version: `10.8.0`
Compatible SonarQube Server Version: `10.8.1`
Compatible SonarQube Community Build: `24.12.0.100206`

Supported Kubernetes Versions: From `1.24` to `1.31`
Expand Down Expand Up @@ -292,7 +292,7 @@ The following table lists the configurable parameters of the SonarQube chart and
| Parameter | Description | Default |
| ------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------ |
| `image.repository` | image repository | `sonarqube` |
| `image.tag` | `sonarqube` image tag. Please note that the default `10.8.0-{{ .Values.edition }}` is deprecated. | `10.8.0-{{ .Values.edition }}` |
| `image.tag` | `sonarqube` image tag. Please note that the default `10.8.1-{{ .Values.edition }}` is deprecated. | `10.8.1-{{ .Values.edition }}` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecret` | (DEPRECATED) imagePullSecret to use for private repository | `None` |
| `image.pullSecrets` | imagePullSecrets to use for private repository | `None` |
Expand Down
2 changes: 1 addition & 1 deletion charts/sonarqube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ image:
repository: sonarqube
# (DEPRECATED) The "image.tag" parameter is set to be empty as default.
# image.tag is set according to the edition and community fields, user-defined have precedance.
# tag: 10.8.0-{{ .Values.edition }}
# tag: 10.8.1-{{ .Values.edition }}
pullPolicy: IfNotPresent
# If using a private repository, the imagePullSecrets to use
# pullSecrets:
Expand Down
81 changes: 79 additions & 2 deletions tests/dynamic-compatibility-test/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,88 @@
module github.com/gruntwork-io/terratest-helm-testing-example/test

go 1.13
go 1.21

toolchain go1.22.2

require (
github.com/gruntwork-io/terratest v0.46.16
github.com/stretchr/testify v1.9.0
golang.org/x/sys v0.22.0 // indirect
k8s.io/api v0.28.4
k8s.io/apimachinery v0.28.4
)

require (
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/aws/aws-sdk-go v1.44.122 // indirect
github.com/boombuler/barcode v1.0.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-sql-driver/mysql v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gonvenience/bunt v1.3.5 // indirect
github.com/gonvenience/neat v1.3.12 // indirect
github.com/gonvenience/term v1.0.2 // indirect
github.com/gonvenience/text v1.0.7 // indirect
github.com/gonvenience/wrap v1.1.2 // indirect
github.com/gonvenience/ytbx v1.4.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gruntwork-io/go-commons v0.8.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/homeport/dyff v1.6.0 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-ciede2000 v0.0.0-20170301095244-782e8c62fec3 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-ps v1.0.0 // indirect
github.com/mitchellh/hashstructure v1.1.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/otp v1.2.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/texttheater/golang-levenshtein v1.0.1 // indirect
github.com/urfave/cli v1.22.2 // indirect
github.com/virtuald/go-ordered-json v0.0.0-20170621173500-b18e6e673d74 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/client-go v0.28.4 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit dc35134

Please sign in to comment.