I'm trying to set-up jenkins build pipeline. It should contains three steps:
- Build project
- Publish artifact to nexus
- Deploy artifact to host
Step 2 should trigger step 3 with full nexus artifact name as a parameter. I don't know how to obtain that value.
Here is my gradle configuration:
uploadArchives {
repositories {
mavenDeployer{
repository(url: "hereMyNexusRepo") {
authentication(userName: "admin", password: "admin123")
}
pom.version = "1.0-SNAPSHOT"
pom.artifactId = "artifactId"
pom.groupId = "groupId"
pom.packaging='jar'
}
}
}
Artifact published by this task has a name that is concatenation of 3 known values:
- groupId
- artifactId
- version
and unknown values
- date
- time
Sample artifact path looks as follow:
groupId/1.0-SNAPSHOT/artifactId-1.0-20170323.225852-2.jar
How can I get this path? Or can I override it from Jenkins?