@ -298,18 +298,25 @@ exit $status
docker.image(docker_image_dind).withRun('--privileged') { d ->
docker.image(docker_image_dind).withRun('--privileged') { d ->
docker.image(build_image).inside("--link ${d.id}:docker") {
docker.image(build_image).inside("--link ${d.id}:docker") {
stage(stage_name + 'Prepare') {
stage(stage_name + 'Calculate variables') {
sh './gradlew --no-daemon --parallel clean assemble'
def gradleProperties = readProperties file: 'gradle.properties'
version = gradleProperties.version
}
}
stage(stage_name + 'Publish') {
withCredentials([
if (version ==~ /.*-SNAPSHOT/) { // Only publish snapshots to Azure
usernamePassword(
stage(stage_name + 'Prepare') {
credentialsId: 'hyperledger-azure',
sh './gradlew --no-daemon --parallel clean assemble'
usernameVariable: 'AZURE_USER',
}
passwordVariable: 'AZURE_KEY'
stage(stage_name + 'Publish') {
)
withCredentials([
]) {
usernamePassword(
sh './gradlew --no-daemon --parallel publish'
credentialsId: 'hyperledger-azure',
usernameVariable: 'AZURE_USER',
passwordVariable: 'AZURE_KEY'
)
]) {
sh './gradlew --no-daemon --parallel publish'
}
}
}
}
}
}
}