From 99ad94b23ff153cc6ae60db705a9e077820100aa Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Mon, 6 Apr 2020 13:32:12 +0000 Subject: [PATCH 1/3] #2583 Add docker build back for release, but only publish from master to artifactory Signed-off-by: Nigel Jones --- .azure-pipelines/merge.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure-pipelines/merge.yml b/.azure-pipelines/merge.yml index 72d6a5ee38f..b0630dca141 100644 --- a/.azure-pipelines/merge.yml +++ b/.azure-pipelines/merge.yml @@ -5,6 +5,7 @@ trigger: branches: include: - master + - egeria-release-* pr: none variables: @@ -68,6 +69,7 @@ stages: -Ddocker.images=core -Ddockerfile.googleContainerRegistryEnabled=false - task: ArtifactoryPublishBuildInfo@1 + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) inputs: artifactoryService: ODPiArtifactory buildName: 'Egeria' From 3a0e47d5057c9624ef9e5824c7cf75599af29310 Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Mon, 6 Apr 2020 13:46:30 +0000 Subject: [PATCH 2/3] #2583 Ensure docker builds only tagged latest for master Signed-off-by: Nigel Jones --- .azure-pipelines/merge.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.azure-pipelines/merge.yml b/.azure-pipelines/merge.yml index b0630dca141..9020d68b425 100644 --- a/.azure-pipelines/merge.yml +++ b/.azure-pipelines/merge.yml @@ -38,7 +38,10 @@ stages: inputs: command: login containerRegistry: odpi-dockerhub + # Normal build for master - note we have the '-Ddocker.taglatest' set + # This can likely be refactored using variables. - task: ArtifactoryMaven@1 + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) inputs: mavenPomFile: 'pom.xml' javaHomeOption: 'JDKVersion' @@ -68,6 +71,38 @@ stages: -Ddocker.registry=docker.io -Ddocker.images=core -Ddockerfile.googleContainerRegistryEnabled=false + # build for other releases - note we DO NOT have the '-Ddocker.taglatest' set + - task: ArtifactoryMaven@1 + condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) + inputs: + mavenPomFile: 'pom.xml' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + artifactoryResolverService: 'ODPiArtifactory' + targetResolveReleaseRepo: 'egeria-staging' + targetResolveSnapshotRepo: 'egeria-snapshot' + artifactoryDeployService: 'ODPiArtifactory' + targetDeployReleaseRepo: 'egeria-staging' + targetDeploySnapshotRepo: 'egeria-snapshot' + collectBuildInfo: true + buildName: 'Egeria' + buildNumber: '$(Build.BuildNumber)' + includeEnvVars: true + goals: 'clean install' + options: >- + --batch-mode + -e + -s .m2/settings.xml + -Dmerge + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + -P artifactory + -Ddocker + -Ddocker.repo=odpi + -Ddocker.registry=docker.io + -Ddocker.images=core + -Ddockerfile.googleContainerRegistryEnabled=false + # Only publish to artifactory if we are running a master build - task: ArtifactoryPublishBuildInfo@1 condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) inputs: From 4506803481968371da69ea385121d66d7f2e1352 Mon Sep 17 00:00:00 2001 From: Nigel Jones Date: Mon, 6 Apr 2020 13:53:51 +0000 Subject: [PATCH 3/3] #2583 remove rogue tab from yaml Signed-off-by: Nigel Jones --- .azure-pipelines/merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/merge.yml b/.azure-pipelines/merge.yml index 9020d68b425..62df26b4136 100644 --- a/.azure-pipelines/merge.yml +++ b/.azure-pipelines/merge.yml @@ -39,7 +39,7 @@ stages: command: login containerRegistry: odpi-dockerhub # Normal build for master - note we have the '-Ddocker.taglatest' set - # This can likely be refactored using variables. + # This can likely be refactored using variables. - task: ArtifactoryMaven@1 condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) inputs: