From 48d3bf7162264d537a8b7ff85690b7b34fed7396 Mon Sep 17 00:00:00 2001 From: Rui Lopes Date: Mon, 10 Jul 2017 21:16:19 +0100 Subject: [PATCH] upgrade to nexus 3.4.0-02 --- provision/nexus-groovy.sh | 2 +- provision/provision-base.sh | 2 +- provision/provision-nexus.sh | 6 +- provision/provision-nexus/README.md | 2 +- provision/provision-nexus/pom.xml | 2 +- provision/provision-nexus/provision-nexus.iml | 95 ++++++++++--------- .../src/main/groovy/provision.groovy | 6 +- provision/test.sh | 6 +- 8 files changed, 61 insertions(+), 60 deletions(-) diff --git a/provision/nexus-groovy.sh b/provision/nexus-groovy.sh index 3832f3b..ed29d68 100644 --- a/provision/nexus-groovy.sh +++ b/provision/nexus-groovy.sh @@ -4,7 +4,7 @@ set -eux admin_username=${admin_username:-admin} admin_password=${admin_password:-admin123} -# see https://books.sonatype.com/nexus-book/3.3/reference/scripting.html +# see https://books.sonatype.com/nexus-book/3.4/reference/scripting.html function nexus-groovy { local source_filename="/vagrant/provision/provision-nexus/src/main/groovy/$1.groovy" diff --git a/provision/provision-base.sh b/provision/provision-base.sh index 8ec4751..9057693 100644 --- a/provision/provision-base.sh +++ b/provision/provision-base.sh @@ -62,7 +62,7 @@ popd # install and configure nginx to proxy to nexus. -# see https://books.sonatype.com/nexus-book/3.3/reference/install.html#reverse-proxy +# see https://books.sonatype.com/nexus-book/3.4/reference/install.html#reverse-proxy apt-get install -y --no-install-recommends nginx rm -f /etc/nginx/sites-enabled/default cat >/etc/nginx/sites-available/$config_fqdn.conf <1.0-SNAPSHOT - 3.3.1-01 + 3.4.0-02 diff --git a/provision/provision-nexus/provision-nexus.iml b/provision/provision-nexus/provision-nexus.iml index d5e69d3..3dd9554 100644 --- a/provision/provision-nexus/provision-nexus.iml +++ b/provision/provision-nexus/provision-nexus.iml @@ -8,23 +8,23 @@ - - - - + + + + - + - + - + - - - + + + @@ -37,13 +37,13 @@ - + - + - - + + @@ -52,49 +52,50 @@ - - - - - - + + + + + + - - - - + + + + - + - - - - + + + + - - + + - - - + + + - - - + + + + - + - - + + @@ -103,11 +104,11 @@ - - - + + + - + @@ -116,7 +117,7 @@ - + @@ -125,7 +126,7 @@ - - + + \ No newline at end of file diff --git a/provision/provision-nexus/src/main/groovy/provision.groovy b/provision/provision-nexus/src/main/groovy/provision.groovy index 33bfc15..50c4f33 100644 --- a/provision/provision-nexus/src/main/groovy/provision.groovy +++ b/provision/provision-nexus/src/main/groovy/provision.groovy @@ -1,5 +1,5 @@ // run this file inside the Vagrant environment with bash /vagrant/execute-provision.groovy-script.sh -// see https://books.sonatype.com/nexus-book/3.3/reference/scripting.html +// see https://books.sonatype.com/nexus-book/3.4/reference/scripting.html // see https://github.com/sonatype/nexus-book-examples/tree/nexus-3.x/scripting/nexus-script-example import groovy.json.JsonOutput @@ -12,7 +12,7 @@ import org.sonatype.nexus.scheduling.schedule.Daily // create a raw repository backed by the default blob store. // see https://github.com/sonatype/nexus-book-examples/blob/nexus-3.x/scripting/complex-script/rawRepositories.groovy -// see https://books.sonatype.com/nexus-book/3.3/reference/raw.html#_uploading_files_to_hosted_raw_repositories +// see https://books.sonatype.com/nexus-book/3.4/reference/raw.html#_uploading_files_to_hosted_raw_repositories repository.createRawHosted("adhoc-package", "default") @@ -39,7 +39,7 @@ jenkinsPassword = random((('A'..'Z')+('a'..'z')+('0'..'9')).join(), 16) // set the base url. this is used when sending emails. -// see https://books.sonatype.com/nexus-book/3.3/reference/admin.html#admin-base-url +// see https://books.sonatype.com/nexus-book/3.4/reference/admin.html#admin-base-url core.baseUrl("https://" + java.net.InetAddress.getLocalHost().getCanonicalHostName()) diff --git a/provision/test.sh b/provision/test.sh index c87a22e..73085c4 100644 --- a/provision/test.sh +++ b/provision/test.sh @@ -7,7 +7,7 @@ mkdir -p tmp && cd tmp # # test the NuGet repository. -# see https://books.sonatype.com/nexus-book/3.3/reference/nuget.html +# see https://books.sonatype.com/nexus-book/3.4/reference/nuget.html if ! which mono; then sudo apt-get install -y mono-complete @@ -75,7 +75,7 @@ sudo apt-get install -y xmlstarlet # setup the user maven configuration to use nexus as a mirror the # official maven repository. -# see https://books.sonatype.com/nexus-book/3.3/reference/maven.html +# see https://books.sonatype.com/nexus-book/3.4/reference/maven.html # see https://maven.apache.org/guides/mini/guide-mirror-settings.html mkdir -p ~/.m2 cat >~/.m2/settings.xml <<'EOF' @@ -167,7 +167,7 @@ popd apt-get install -y curl # upload. -# see https://books.sonatype.com/nexus-book/3.3/reference/raw.html#_uploading_files_to_hosted_raw_repositories +# see https://books.sonatype.com/nexus-book/3.4/reference/raw.html#_uploading_files_to_hosted_raw_repositories expected='this is an adhoc package' echo "$expected" >package-1.0.0.txt curl --silent --user 'alice.doe:password' --upload-file package-1.0.0.txt http://localhost:8081/repository/adhoc-package/package-1.0.0.txt