From aea8df06e4936ee35fd1ea1ecc9c26c68a1f84ff Mon Sep 17 00:00:00 2001 From: Steve Hipwell Date: Mon, 13 Jan 2025 16:55:09 +0000 Subject: [PATCH] feat(nexus3): Updated image to v3.76.0 (#1109) Signed-off-by: Steve Hipwell --- charts/nexus3/CHANGELOG.md | 11 +++++++++++ charts/nexus3/Chart.yaml | 8 +++++--- charts/nexus3/README.md | 8 ++++---- charts/nexus3/scripts/configure.sh | 6 +++--- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/charts/nexus3/CHANGELOG.md b/charts/nexus3/CHANGELOG.md index a1165e76..79e3a2b3 100644 --- a/charts/nexus3/CHANGELOG.md +++ b/charts/nexus3/CHANGELOG.md @@ -14,6 +14,16 @@ ## [UNRELEASED] +## [v5.6.0] - 2025-01-13 + +### Added + +- Added a default value of `"default"` for users and roles where this is undefined. ([#1109](https://github.com/stevehipwell/helm-charts/pull/1109)) _@stevehipwell_ + +### Changed + +- Updated the _Nexus3_ OCI image to [v3.76.0](https://github.com/sonatype/nexus-public/releases/tag/release-3.76.0-03). ([#1109](https://github.com/stevehipwell/helm-charts/pull/1109)) _@stevehipwell_ + ## [v5.5.1] - 2024-12-06 ### Changed @@ -769,6 +779,7 @@ RELEASE LINKS --> [UNRELEASED]: https://github.com/stevehipwell/helm-charts/tree/main/charts/nexus3 +[v5.6.0]: https://github.com/stevehipwell/helm-charts/releases/tag/nexus3-5.6.0 [v5.5.1]: https://github.com/stevehipwell/helm-charts/releases/tag/nexus3-5.5.1 [v5.5.0]: https://github.com/stevehipwell/helm-charts/releases/tag/nexus3-5.5.0 [v5.4.1]: https://github.com/stevehipwell/helm-charts/releases/tag/nexus3-5.4.1 diff --git a/charts/nexus3/Chart.yaml b/charts/nexus3/Chart.yaml index 4312b975..bba0c056 100644 --- a/charts/nexus3/Chart.yaml +++ b/charts/nexus3/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: nexus3 description: Helm chart for Sonatype Nexus 3 OSS. type: application -version: 5.5.1 -appVersion: 3.75.1 +version: 5.6.0 +appVersion: 3.76.0 home: https://www.sonatype.com/products/sonatype-nexus-repository icon: https://raw.githubusercontent.com/stevehipwell/helm-charts/main/charts/nexus3/icon.png keywords: @@ -23,5 +23,7 @@ maintainers: annotations: artifacthub.io/alternativeName: nexus artifacthub.io/changes: | + - kind: added + description: "Added a default value of `default` for users and roles where this is undefined." - kind: changed - description: "Updated the _Nexus3_ OCI image to [v3.75.1](https://github.com/sonatype/nexus-public/releases/tag/release-3.75.1-01)." + description: "Updated the _Nexus3_ OCI image to [v3.76.0](https://github.com/sonatype/nexus-public/releases/tag/release-3.76.0-03)." diff --git a/charts/nexus3/README.md b/charts/nexus3/README.md index ef5f2a4f..70f8746f 100644 --- a/charts/nexus3/README.md +++ b/charts/nexus3/README.md @@ -1,6 +1,6 @@ # nexus3 -![Version: 5.5.1](https://img.shields.io/badge/Version-5.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.75.1](https://img.shields.io/badge/AppVersion-3.75.1-informational?style=flat-square) +![Version: 5.6.0](https://img.shields.io/badge/Version-5.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.76.0](https://img.shields.io/badge/AppVersion-3.76.0-informational?style=flat-square) Helm chart for Sonatype Nexus 3 OSS. @@ -25,7 +25,7 @@ Helm chart for Sonatype Nexus 3 OSS. To install the chart using the recommended OCI method you can use the following command. ```shell -helm upgrade --install nexus3 oci://ghcr.io/stevehipwell/helm-charts/nexus3 --version 5.5.1 +helm upgrade --install nexus3 oci://ghcr.io/stevehipwell/helm-charts/nexus3 --version 5.6.0 ``` #### Verification @@ -33,7 +33,7 @@ helm upgrade --install nexus3 oci://ghcr.io/stevehipwell/helm-charts/nexus3 --ve As the OCI chart release is signed by [Cosign](https://github.com/sigstore/cosign) you can verify the chart before installing it by running the following command. ```shell -cosign verify --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp 'https://github\.com/action-stars/helm-workflows/\.github/workflows/release\.yaml@.+' --certificate-github-workflow-repository stevehipwell/helm-charts --certificate-github-workflow-name Release ghcr.io/stevehipwell/helm-charts/nexus3:5.5.1 +cosign verify --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp 'https://github\.com/action-stars/helm-workflows/\.github/workflows/release\.yaml@.+' --certificate-github-workflow-repository stevehipwell/helm-charts --certificate-github-workflow-name Release ghcr.io/stevehipwell/helm-charts/nexus3:5.6.0 ``` ### Non-OCI Repository @@ -42,7 +42,7 @@ Alternatively you can use the legacy non-OCI method via the following commands. ```shell helm repo add stevehipwell https://stevehipwell.github.io/helm-charts/ -helm upgrade --install nexus3 stevehipwell/nexus3 --version 5.5.1 +helm upgrade --install nexus3 stevehipwell/nexus3 --version 5.6.0 ``` ## Values diff --git a/charts/nexus3/scripts/configure.sh b/charts/nexus3/scripts/configure.sh index 3ede7ca4..f607cb16 100644 --- a/charts/nexus3/scripts/configure.sh +++ b/charts/nexus3/scripts/configure.sh @@ -24,7 +24,7 @@ if [[ -z "${password:-}" ]]; then error "No password was provided." fi -while [[ "$(curl -s -o /dev/null -w "%{http_code}" "${NEXUS_HOST}/service/rest/v1/status")" -ne "200" ]]; do +while [[ "$(curl -s -o /dev/null -w "%{http_code}" "${NEXUS_HOST}/service/rest/v1/status" || true)" -ne "200" ]]; do echo "Waiting for Nexus..." sleep 15 done @@ -160,7 +160,7 @@ echo "Configuring roles..." for json_file in "${CONFIG_DIR}"/conf/*-role.json; do if [[ -f "${json_file}" ]]; then id="$(jq -r '.id' "${json_file}")" - source="$(jq -r '.source' "${json_file}")" + source="$(jq -r '.source // "default"' "${json_file}")" status_code=$(curl -sS -o /dev/null -w "%{http_code}" -X GET -H 'Content-Type: application/json' -u "${NEXUS_USER}:${password}" "${NEXUS_HOST}/service/rest/v1/security/roles/${id}?source=${source}") if [[ "${status_code}" -eq 200 ]]; then @@ -183,7 +183,7 @@ echo "Configuring users..." for json_file in "${CONFIG_DIR}"/conf/*-user.json; do if [[ -f "${json_file}" ]]; then id="$(jq -r '.userId' "${json_file}")" - source="$(jq -r '.source' "${json_file}")" + source="$(jq -r '.source // "default' "${json_file}")" out_file="$(mktemp -p "${tmp_dir}")" status_code=$(curl -sS -o "${out_file}" -w "%{http_code}" -X GET -H 'Content-Type: application/json' -u "${NEXUS_USER}:${password}" "${NEXUS_HOST}/service/rest/v1/security/users/?userId=${id}&source=${source}")