diff --git a/CHANGELOG.md b/CHANGELOG.md index 08004a21..5192ce4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v3.70.2-1] - 2024-09-24 +## Changed +- Upgrade Nexus to version 3.70.2-01 + +### Fixed +- [#142] Reuse of claim once after upgrade via blueprint + ## [v3.68.1-6] - 2024-09-18 ### Changed - [#139] Update nexus carp to v1.4.1 diff --git a/Dockerfile b/Dockerfile index 9aba332c..ae2ad752 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,22 @@ -# registry.cloudogu.com/official/nexus -FROM registry.cloudogu.com/official/java:11.0.24-1 as builder +FROM registry.cloudogu.com/official/java:11.0.24-3 as builder LABEL maintainer="hello@cloudogu.com" \ NAME="official/nexus" \ - VERSION="3.68.1-6" + VERSION="3.70.2-1" WORKDIR /build # The version of nexus to install -ENV NEXUS_VERSION=3.68.1-02 \ +ENV NEXUS_VERSION=3.70.2-01 \ TINI_VERSION=0.19.0 \ - NEXUS_CLAIM_VERSION=1.0.0 \ + NEXUS_CLAIM_VERSION=1.1.1 \ NEXUS_CARP_VERSION=1.4.1 \ NEXUS_SCRIPTING_VERSION=0.2.0 \ SHIRO_VERSION=1.11.0 \ NEXUS_BUILD_DIR=/build/opt/sonatype/nexus \ BUILD_BIN_DIR=/build/usr/bin \ SHA256_TINI="c5b0666b4cb676901f90dfcb37106783c5fe2077b04590973b885950611b30ee" \ - SHA256_NEXUS_TAR="6a04eb770e0c4415d3033de757b07ddfdfd15beadbf839d4b33438246e4325a7" \ - SHA256_NEXUS_CLAIM="a34608ac7b516d6bc91f8a157bea286919c14e5fb5ecc76fc15edccb35adec42" \ + SHA256_NEXUS_TAR="c4c4e144bea61a7b7dddafca5d9c5d69da2731ee4b6fd59cd49a0976b9bd4b57" \ + SHA256_NEXUS_CLAIM="74b0f9d752855a14533e829e658cb619fc2832d845860af2e0ddbf0cdd47a785" \ SHA256_NEXUS_SCRIPTING="60c7f3d8a0c97b1d90d954ebad9dc07dbeb7927934b618c874b2e72295cafb48" \ SHA256_NEXUS_CARP="db742df8f4c672d1aaa049efa097756d1f9b86e050331a01406cb97e11c41485" @@ -58,8 +57,7 @@ RUN set -o errexit \ && mvn dependency:get -DgroupId=org.apache.shiro.tools -DartifactId=shiro-tools-hasher -Dclassifier=cli -Dversion=${SHIRO_VERSION} \ && cp /root/.m2/repository/org/apache/shiro/tools/shiro-tools-hasher/${SHIRO_VERSION}/shiro-tools-hasher-${SHIRO_VERSION}-cli.jar /build/shiro-tools-hasher.jar - -FROM registry.cloudogu.com/official/java:11.0.24-1 +FROM registry.cloudogu.com/official/java:11.0.24-3 ENV SERVICE_TAGS=webapp \ SERVICE_ADDITIONAL_SERVICES='[{"name": "docker-registry", "port": 8082, "location": "v2", "pass": "nexus/repository/docker-registry/v2/"}]' \ diff --git a/Makefile b/Makefile index 0bed0fa7..ed088af8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ MAKEFILES_VERSION=9.2.1 -VERSION=3.68.1-6 +VERSION=3.70.2-1 .DEFAULT_GOAL:=dogu-release diff --git a/docs/gui/release_notes_de.md b/docs/gui/release_notes_de.md index f9ababaf..c340218a 100644 --- a/docs/gui/release_notes_de.md +++ b/docs/gui/release_notes_de.md @@ -4,6 +4,10 @@ Im Folgenden finden Sie die Release Notes für das Sonatype Nexus-Dogu. Technische Details zu einem Release finden Sie im zugehörigen [Changelog](https://docs.cloudogu.com/de/docs/dogus/nexus/CHANGELOG/). +## Release 3.70.2-1 +* Update der Nexus Version auf 3.70.2-01 +* Claim-Once kann nach Upgrade mittels Blueprint neu gesetzt werden + ## Release 3.68.1-6 * Die interne Passwortgenerierung wurde durch eine neue CARP-Version abgesichert. * Die Cloudogu-eigenen Quellen werden von der MIT-Lizenz auf die AGPL-3.0-only relizensiert. diff --git a/docs/gui/release_notes_en.md b/docs/gui/release_notes_en.md index c7cd3419..109b03a1 100644 --- a/docs/gui/release_notes_en.md +++ b/docs/gui/release_notes_en.md @@ -4,6 +4,10 @@ Below you will find the release notes for the Sonatype Nexus Dogu. Technical details on a release can be found in the corresponding [Changelog](https://docs.cloudogu.com/en/docs/dogus/nexus/CHANGELOG/). +## Release 3.70.2-1 +* Update of the Nexus Version to 3.70.2-01 +* Claim-Once can be reused after upgrading via blueprint + ## Release 3.68.1-6 * The internal password generation has been secured by a new CARP version. * Relicense own code to AGPL-3.0-only diff --git a/dogu.json b/dogu.json index 41592346..d7daa851 100644 --- a/dogu.json +++ b/dogu.json @@ -1,6 +1,6 @@ { "Name": "official/nexus", - "Version": "3.68.1-6", + "Version": "3.70.2-1", "DisplayName": "Sonatype Nexus", "Description": "The Nexus Repository is like the local warehouse where all of the parts and finished goods used in your software supply chain are stored and distributed.", "Url": "http://www.sonatype.org/nexus", @@ -71,6 +71,21 @@ } ], "Configuration": [ + { + "Name": "claim/once", + "Description": "A claim script definition which is only executed once. After that, it will set the claim/once.lock key which prevents further execution.", + "Optional": true + }, + { + "Name": "claim/once.lock", + "Description": "If this key is set to true it will prevent the claim/once script from being executed.", + "Optional": true + }, + { + "Name": "claim/always", + "Description": "A claim script definition which will always be executed at startup.", + "Optional": true + }, { "Name": "nexus.repository.sandbox.enable", "Description": "Enable repository sandboxing", diff --git a/integrationTests/cypress/support/step_definitions/dogu_integration_test_library_steps.js b/integrationTests/cypress/support/step_definitions/dogu_integration_test_library_steps.js index 0ad62915..c36d48f3 100644 --- a/integrationTests/cypress/support/step_definitions/dogu_integration_test_library_steps.js +++ b/integrationTests/cypress/support/step_definitions/dogu_integration_test_library_steps.js @@ -10,17 +10,17 @@ doguTestLibrary.registerSteps(); When(/^the user clicks the dogu logout button$/, function () { Cypress.on('uncaught:exception', () => { return false; }); // Catch nexus errors and prevent test from failing cy.fullyLoadPageAndClosePopups() - cy.get('#nx-header-signout-1146-btnInnerEl').click(); + cy.get('#nx-header-signout-1150-btnEl').click(); }); Then(/^the user has administrator privileges in the dogu$/, function () { Cypress.on('uncaught:exception', () => { return false; }); // Catch nexus errors and prevent test from failing cy.fullyLoadPageAndClosePopups() - cy.get('#button-1127-btnIconEl').should('be.visible') + cy.get('#nx-header-mode-1130-innerCt').should('be.visible') }); Then(/^the user has no administrator privileges in the dogu$/, function () { Cypress.on('uncaught:exception', () => { return false; }); // Catch nexus errors and prevent test from failing cy.fullyLoadPageAndClosePopups() - cy.get('#button-1127-btnIconEl').should('not.be.visible') + cy.get('#nx-header-mode-1130-innerCt').should('not.be.visible') }); diff --git a/resources/claim.sh b/resources/claim.sh index 3eaae424..b212bad5 100755 --- a/resources/claim.sh +++ b/resources/claim.sh @@ -11,7 +11,7 @@ if ! doguctl wait --port 8081 --timeout 120; then exit 1 fi -ONCE_LOCK="/var/lib/nexus/claim.once" +ONCE_LOCK="claim/once.lock" # NEXUS_URL is already set correctly # NEXUS_SERVER is already set in Dockerfile @@ -19,7 +19,6 @@ export NEXUS_USER="${ADMINUSER}" function claim() { CLAIM="${1}" - LOCK="${2}" PLAN=$(mktemp) if doguctl config claim/"${CLAIM}" > "${PLAN}"; then echo "exec claim ${CLAIM}" @@ -27,24 +26,26 @@ function claim() { nexus-claim plan -i "${PLAN}" -o "-" | \ NEXUS_PASSWORD="${ADMINPW}" \ nexus-claim apply -i "-" - - if [[ "${LOCK}" != "" ]]; then - echo 1 > "${ONCE_LOCK}" + if [[ "${CLAIM}" == "once" ]]; then + doguctl config claim/"${CLAIM}" "true" fi fi rm -f "${PLAN}" } function claim_once() { - claim "once" "${ONCE_LOCK}" + claim "once" } function claim_always() { - claim "always" "" + claim "always" } -if [[ ! -f "${ONCE_LOCK}" ]]; then +if [[ "$(doguctl config --default "false" "${ONCE_LOCK}")" == "false" ]]; then + echo "Executing claim once..." claim_once +else + echo "Claim once was already executed. Skipping..." fi claim_always