upgrade to nexus 3.93.1-04

This commit is contained in:
Rui Lopes
2026-06-24 07:24:24 +00:00
parent c2bb10709e
commit 1503db862f
8 changed files with 16 additions and 10 deletions
+2 -2
View File
@@ -47,7 +47,7 @@ Launch the environment:
time vagrant up --provider=libvirt --no-destroy-on-error --no-tty
```
Access the [Nexus home page](https://nexus.example.com) and login as the `admin` user and password `admin`.
Access the [Nexus home page](https://nexus.example.com) and login as the `admin` user and password `password`.
You can also login with one of the example accounts, e.g. `alice.doe` and password `password`.
@@ -155,7 +155,7 @@ You can also access the database cli shell as:
sudo -i # switch to the root user.
systemctl stop nexus # make sure nexus is not running while you use the database.
su -s /bin/bash nexus # switch to the nexus user.
nexus_home=/opt/nexus/nexus-3.87.1-01 # make sure you have the correct version here.
nexus_home=/opt/nexus/nexus-3.93.1-04 # make sure you have the correct version here.
nexus_data="$(realpath $nexus_home/../sonatype-work/nexus3)"
install -d $nexus_data/../tmp
rm -f $nexus_data/../tmp/h2-*.jar
+1 -1
View File
@@ -6,7 +6,7 @@ nexus_domain=$(hostname --fqdn)
. /vagrant/provision/nexus-groovy.sh
# NB this is the default nexus password, which will be changed to
# 'admin' by the provision.groovy script that we run bellow.
# 'password' by the provision.groovy script that we run bellow.
admin_password='admin123'
# list existing scripts.
+1 -1
View File
@@ -2,7 +2,7 @@
set -euxo pipefail
admin_username=${admin_username:-admin}
admin_password=${admin_password:-admin}
admin_password=${admin_password:-password}
# see https://help.sonatype.com/display/NXRM3/REST+and+Integration+API
# see https://nexus.example.com/swagger-ui/
+3 -3
View File
@@ -35,12 +35,12 @@ pushd /opt/nexus
# see https://help.sonatype.com/en/download-archives---repository-manager-3.html
# see https://help.sonatype.com/en/release-notes.html
# see https://help.sonatype.com/en/sonatype-nexus-repository.html
nexus_version=3.87.1-01
nexus_version=3.93.1-04
nexus_home=/opt/nexus/nexus-$nexus_version
nexus_tarball=nexus-$nexus_version-linux-x86_64.tar.gz
nexus_download_url=https://download.sonatype.com/nexus/3/$nexus_tarball
wget -q $nexus_download_url
tar xf $nexus_tarball # NB this creates the $nexus_home (e.g. nexus-3.87.1-01) and sonatype-work directories.
tar xf $nexus_tarball # NB this creates the $nexus_home (e.g. nexus-3.93.1-04) and sonatype-work directories.
rm $nexus_tarball
sed -i -E 's,#!.+,#!/usr/bin/bash,g' "$nexus_home/bin/nexus"
install -d -o nexus -g nexus -m 700 .java # java preferences are saved here (the default java.util.prefs.userRoot preference).
@@ -160,7 +160,7 @@ unset GNUPGHOME
bash /vagrant/provision/execute-provision.groovy-script.sh
# set the api credentials.
api_auth="admin:admin"
api_auth="admin:password"
# accept the End User License Agreement (EULA).
+1 -1
View File
@@ -17,7 +17,7 @@ binaries: binaries-download
binaries-download:
mkdir -p binaries
wget -qO- https://download.sonatype.com/nexus/3/nexus-3.87.1-01-unix.tar.gz \
wget -qO- https://download.sonatype.com/nexus/3/nexus-3.93.1-04-unix.tar.gz \
| tar xzf - --strip-components 1 -C binaries
clean:
+1 -1
View File
@@ -8,7 +8,7 @@
<version>1.0-SNAPSHOT</version>
<properties>
<nx-version>3.87.1-01</nx-version>
<nx-version>3.93.1-04</nx-version>
</properties>
<dependencies>
<dependency>
@@ -63,7 +63,7 @@ security.anonymousAccess = true
// NB we set it to something different than the default (admin123) to get
// rid of the "Default Admin Credentials" warning... and because this
// password is easier to remember.
security.securitySystem.changePassword('admin', 'admin')
security.securitySystem.changePassword('admin', 'password')
// create users in the deployer role.
+6
View File
@@ -33,6 +33,12 @@ curl \
user = "alice.doe:password"
EOF
# wait until the Release file exists.
# NB for some reason, after an upload, nexus seems to refresh the repo in
# background, so its unclear when its ready. here we loop and hope for
# the best.
bash -c "while [[ -z \"\$(wget -qO- https://$nexus_domain/repository/apt-hosted/dists/noble/Release | grep '/Packages$')\" ]]; do sleep 5; done"
# import the apt-hosted key.
nexus_apt_hosted_keyring_path="/etc/apt/keyrings/$nexus_domain-apt-hosted.gpg"
gpg --dearmor -o "$nexus_apt_hosted_keyring_path" </vagrant/shared/apt-hosted-public.key