Commit 6ebb627e authored by Josh Steinberg's avatar Josh Steinberg

update jenkins to pull nexus

parent a0127dab
......@@ -76,12 +76,17 @@ pipeline {
stage("Pull from Nexus"){
steps{
script{
pom = readMavenPom file: "pom.xml";
GROUP_ID=pom.groupId
ARTIFACT_ID=pom.artifactId
LOCAL_FILE="spring-boot-complete-0.0.1-SNAPSHOT.jar"
script{
pom = readMavenPom file: "pom.xml";
sh 'curl http://${NEXUS_URL/nexus/service/local/artifact/maven/redirect?r=${NEXUS_REPOSITORY}&g=${pom.groupId}&a=${pom.artifactId}&v=${pom.version}&p=jar'
}
NEXUS_RESOLVE_URL="${NEXUS_BASE_URL}artifact/maven/resolve?g=${GROUP_ID}a=${ARTIFACT_ID}&r=${NEXUS_REPOSITORY}&v=${NEXUS_VERSION}"
REPOSITORY_LOCAL_PATH=`curl -s "${NEXUS_RESOLVE_URL}" | xmllint --xpath "//artifact-resolution/data/repositoryPath/text()" -`
ARTIFACT_DOWNLOAD_URL="${NEXUS_BASE_URL}/repositories/${NEXUS_REPOSITORY}/content${REPOSITORY_LOCAL_PATH}"
curl -o "${LOCAL_FILE}" "${ARTIFACT_DOWNLOAD_URL}"
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment