This change is backwards compatible with existing system configs but
lets the user spec this env var which will take precedence. This is
useful, for example, to point at nexus3.edgexfoundry.org if you have
NEXUS_URL=nexus.edgexfoundry.org.
Change-Id: Ibbba26670ab374fd98e1bf20f78ffff7f8b7c52a
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
:server-id: The id of a server as defined in settings.xml.
+:Optional parameters:
+
+ :ALT_NEXUS_SERVER: URL of custom nexus server.
+ If set this will take precedence.
+ Use this to point at nexus3.$PROJECTDOMAIN
+ for example.
+
lf-infra-deploy-maven-file
--------------------------
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
-NEXUS_URL="${NEXUSPROXY:-$NEXUS_URL}"
+ALT_NEXUS_URL="${ALT_NEXUS_URL}"
+
+if [ -z "$ALT_NEXUS_URL" ]
+then
+ NEXUS_URL="${NEXUSPROXY:-$NEXUS_URL}"
+else
+ NEXUS_URL="${ALT_NEXUS_URL}"
+fi
+
CREDENTIAL=$(xmlstarlet sel -N "x=http://maven.apache.org/SETTINGS/1.0.0" \
-t -m "/x:settings/x:servers/x:server[x:id='${SERVER_ID}']" \
-v x:username -o ":" -v x:password \