Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nexus3): Fixed user config #1116

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions charts/nexus3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

## [UNRELEASED]

## [v5.6.1] - 2025-01-21

### Fixed

- Fixed user configuration bug ([#1115](https://github.com/stevehipwell/helm-charts/issues/1115)). ([#1116](https://github.com/stevehipwell/helm-charts/pull/1116)) _@stevehipwell_

## [v5.6.0] - 2025-01-13

### Added
Expand Down Expand Up @@ -779,6 +785,7 @@ RELEASE LINKS
-->

[UNRELEASED]: https://github.com/stevehipwell/helm-charts/tree/main/charts/nexus3
[v5.6.1]: https://github.com/stevehipwell/helm-charts/releases/tag/nexus3-5.6.1
[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
Expand Down
8 changes: 3 additions & 5 deletions charts/nexus3/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: nexus3
description: Helm chart for Sonatype Nexus 3 OSS.
type: application
version: 5.6.0
version: 5.6.1
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
Expand All @@ -23,7 +23,5 @@ 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.76.0](https://github.com/sonatype/nexus-public/releases/tag/release-3.76.0-03)."
- kind: fixed
description: "Fixed user configuration bug."
8 changes: 4 additions & 4 deletions charts/nexus3/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# nexus3

![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)
![Version: 5.6.1](https://img.shields.io/badge/Version-5.6.1-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.

Expand All @@ -25,15 +25,15 @@ 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.6.0
helm upgrade --install nexus3 oci://ghcr.io/stevehipwell/helm-charts/nexus3 --version 5.6.1
```

#### Verification

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.6.0
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.1
```

### Non-OCI Repository
Expand All @@ -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.6.0
helm upgrade --install nexus3 stevehipwell/nexus3 --version 5.6.1
```

## Values
Expand Down
6 changes: 5 additions & 1 deletion charts/nexus3/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ config:
privileges: []
roles:
- nx-admin
- id: test-role
name: test
description: test role
privileges: []
roles: []
users:
- userId: test
firstName: Test
Expand All @@ -83,7 +88,6 @@ config:
firstName: Test2
lastName: User
emailAddress: [email protected]
source: default
status: active
roles:
- nx-anonymous
Expand Down
2 changes: 1 addition & 1 deletion charts/nexus3/scripts/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 // "default' "${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}")
Expand Down
Loading