Updated publishAirGapZip task
publishAirGapZip now fails the build if the curl fails and uses the
environment variables BDS_PUBLIC_ARTIFACTORY_USERNAME and
BDS_PUBLIC_ARTIFACTORY_PASSWORD
@@ -8,7 +8,7 @@ final String configAirGapPath = "${buildArtifactFolder}/config"
final String dockerAirGapPath = "${airGapFolder}/docker"
final String artifactoryUrl = "http://prd-eng-repo01.dc2.lan:8181/artifactory"
final String artifactoryRepoKey = "bds-integrations"
-final String artifactoryDetectPath = "com/blackducksoftware/integration/${rootProject.name}/${version}/"
+final String artifactoryIntegrationPath = "com/blackducksoftware/integration"
final String airGapZipName = "${rootProject.name}-${version}-air-gap.zip"
configurations {
@@ -133,5 +133,5 @@ task createAirGapZip(type: Zip) {
task publishAirGapZip(type: Exec) {
dependsOn createAirGapZip
- commandLine 'curl', '-u', "${artifactoryUsername}:${artifactoryPassword}", '-X', 'PUT', "${artifactoryUrl}/${artifactoryRepoKey}/${artifactoryDetectPath}/${airGapZipName}", '-T', "${buildArtifactFolder}/${airGapZipName}"
+ commandLine 'curl', '-u', "${System.env.BDS_PUBLIC_ARTIFACTORY_USERNAME}:${System.env.BDS_PUBLIC_ARTIFACTORY_PASSWORD}", '-X', 'PUT', "${artifactoryUrl}/${artifactoryRepoKey}/${artifactoryIntegrationPath}/${rootProject.name}/${version}/${airGapZipName}", '-T', "${buildArtifactFolder}/${airGapZipName}", '-f'
}
