Skip to content

Commit

Permalink
Merge branch 'release/v3.70.2-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
nfranzeck authored and cesmarvin committed Sep 24, 2024
2 parents 7ced201 + 0d86141 commit b612926
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 22 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 7 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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="[email protected]" \
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"

Expand Down Expand Up @@ -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/"}]' \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MAKEFILES_VERSION=9.2.1
VERSION=3.68.1-6
VERSION=3.70.2-1

.DEFAULT_GOAL:=dogu-release

Expand Down
4 changes: 4 additions & 0 deletions docs/gui/release_notes_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions docs/gui/release_notes_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 16 additions & 1 deletion dogu.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
});
17 changes: 9 additions & 8 deletions resources/claim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,41 @@ 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
export NEXUS_USER="${ADMINUSER}"

function claim() {
CLAIM="${1}"
LOCK="${2}"
PLAN=$(mktemp)
if doguctl config claim/"${CLAIM}" > "${PLAN}"; then
echo "exec claim ${CLAIM}"
NEXUS_PASSWORD="${ADMINPW}" \
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

0 comments on commit b612926

Please sign in to comment.