From 7c31f192cc4485920fa606b292e508d4bf16742a Mon Sep 17 00:00:00 2001 From: Shishir Bhat Date: Mon, 28 Mar 2022 21:43:16 -0700 Subject: [PATCH 1/6] Test sha256sum --- azure-pipelines/publishing/github-release.yml | 86 +++++++++++-------- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/azure-pipelines/publishing/github-release.yml b/azure-pipelines/publishing/github-release.yml index 0f7291a7..551088f5 100644 --- a/azure-pipelines/publishing/github-release.yml +++ b/azure-pipelines/publishing/github-release.yml @@ -25,42 +25,42 @@ parameters: - false stages: -- stage: pre_build - jobs: - - job: print_variables - steps: - - task: CmdLine@2 - inputs: - script: | - echo "Release title: $(Release.Title)" - echo "Release tag: $(Release.Version)" - echo "Tag used to generate changelog: $(Release.PreviousVersion)" +#- stage: pre_build +# jobs: +# - job: print_variables +# steps: +# - task: CmdLine@2 +# inputs: +# script: | +# echo "Release title: $(Release.Title)" +# echo "Release tag: $(Release.Version)" +# echo "Tag used to generate changelog: $(Release.PreviousVersion)" -- stage: release_build - jobs: - - template: templates/release-native-build-steps.yml - parameters: - targetOsArch: 'ubuntu1804_x64' - - template: templates/release-docker-build-steps.yml - parameters: - targetOsArch: 'ubuntu1804_arm64' - imageVersion: ${{variables.imageVersion}} - - template: templates/release-docker-build-steps.yml - parameters: - targetOsArch: 'ubuntu2004_x64' - imageVersion: ${{variables.imageVersion}} - - template: templates/release-docker-build-steps.yml - parameters: - targetOsArch: 'ubuntu2004_arm64' - imageVersion: ${{variables.imageVersion}} - - template: templates/release-docker-build-steps.yml - parameters: - targetOsArch: 'debian9_arm32' - imageVersion: ${{variables.imageVersion}} - - template: templates/release-docker-build-steps.yml - parameters: - targetOsArch: 'debian10_arm32' - imageVersion: ${{variables.imageVersion}} +#- stage: release_build +# jobs: +# - template: templates/release-native-build-steps.yml +# parameters: +# targetOsArch: 'ubuntu1804_x64' +# - template: templates/release-docker-build-steps.yml +# parameters: +# targetOsArch: 'ubuntu1804_arm64' +# imageVersion: ${{variables.imageVersion}} +# - template: templates/release-docker-build-steps.yml +# parameters: +# targetOsArch: 'ubuntu2004_x64' +# imageVersion: ${{variables.imageVersion}} +# - template: templates/release-docker-build-steps.yml +# parameters: +# targetOsArch: 'ubuntu2004_arm64' +# imageVersion: ${{variables.imageVersion}} +# - template: templates/release-docker-build-steps.yml +# parameters: +# targetOsArch: 'debian9_arm32' +# imageVersion: ${{variables.imageVersion}} +# - template: templates/release-docker-build-steps.yml +# parameters: +# targetOsArch: 'debian10_arm32' +# imageVersion: ${{variables.imageVersion}} - stage: release condition: succeeded() @@ -69,8 +69,11 @@ stages: steps: - task: DownloadBuildArtifacts@0 inputs: - buildType: 'current' + buildType: 'specific' + project: 'client' + pipeline: '42' downloadType: 'specific' + itemPattern: '**/*.tar' downloadPath: '$(Build.ArtifactStagingDirectory)' - task: CmdLine@2 @@ -81,13 +84,22 @@ stages: ls -lR $(Build.ArtifactStagingDirectory)/**/*.tar displayName: Release Information + - task: Bash@3 + inputs: + targetType: 'inline' + script: 'sha256sum ./*.tar > ../hashes_sha256.txt' + workingDirectory: $(Build.ArtifactStagingDirectory)/github-release-artifacts + displayName: Compute hashes of archive files + - task: GitHubRelease@1 condition: eq(${{parameters.SkipPublishing}}, false) inputs: gitHubConnection: 'github_gauth' repositoryName: 'microsoft/do-client' action: 'create' - assets: '$(Build.ArtifactStagingDirectory)/**/*.tar' + assets: | + '$(Build.ArtifactStagingDirectory)/**/*.tar' + '$(Build.ArtifactStagingDirectory)/hashes*.txt' tagSource: 'userSpecifiedTag' tag: '$(Release.Version)' title: '$(Release.Title)' From 59e2c40f37c3a90b3284cfd7ec6e34624607efbd Mon Sep 17 00:00:00 2001 From: Shishir Bhat Date: Mon, 28 Mar 2022 21:52:53 -0700 Subject: [PATCH 2/6] Display hashes, draft release option --- azure-pipelines/publishing/github-release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/azure-pipelines/publishing/github-release.yml b/azure-pipelines/publishing/github-release.yml index 551088f5..9aa5ee43 100644 --- a/azure-pipelines/publishing/github-release.yml +++ b/azure-pipelines/publishing/github-release.yml @@ -23,6 +23,12 @@ parameters: values: - true - false + - name: PublishAsDraft + displayName: Publish as draft + type: boolean + values: + - true + - false stages: #- stage: pre_build @@ -91,6 +97,13 @@ stages: workingDirectory: $(Build.ArtifactStagingDirectory)/github-release-artifacts displayName: Compute hashes of archive files + - task: Bash@3 + inputs: + targetType: 'inline' + script: 'cat ./hashes_sha256.txt' + workingDirectory: $(Build.ArtifactStagingDirectory) + displayName: Display hashes of archive files + - task: GitHubRelease@1 condition: eq(${{parameters.SkipPublishing}}, false) inputs: @@ -104,6 +117,7 @@ stages: tag: '$(Release.Version)' title: '$(Release.Title)' isPreRelease: true + isDraft: ${{parameters.PublishAsDraft}} changeLogCompareToRelease: 'lastNonDraftReleaseByTag' changeLogCompareToReleaseTag: '$(Release.PreviousVersion)' changeLogType: 'commitBased' From 7888e63bba61ff9889d9daafbf3ec89e0fa5c394 Mon Sep 17 00:00:00 2001 From: Shishir Bhat Date: Mon, 28 Mar 2022 21:56:31 -0700 Subject: [PATCH 3/6] Add build ID --- azure-pipelines/publishing/github-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines/publishing/github-release.yml b/azure-pipelines/publishing/github-release.yml index 9aa5ee43..6b535bad 100644 --- a/azure-pipelines/publishing/github-release.yml +++ b/azure-pipelines/publishing/github-release.yml @@ -78,6 +78,7 @@ stages: buildType: 'specific' project: 'client' pipeline: '42' + buildId: '3656' downloadType: 'specific' itemPattern: '**/*.tar' downloadPath: '$(Build.ArtifactStagingDirectory)' From f0537cffcaae1fcc1ce0b1f6c3acbc3ec107c771 Mon Sep 17 00:00:00 2001 From: Shishir Bhat Date: Mon, 28 Mar 2022 22:02:43 -0700 Subject: [PATCH 4/6] Specific ver download --- azure-pipelines/publishing/github-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines/publishing/github-release.yml b/azure-pipelines/publishing/github-release.yml index 6b535bad..c0ffa114 100644 --- a/azure-pipelines/publishing/github-release.yml +++ b/azure-pipelines/publishing/github-release.yml @@ -78,6 +78,7 @@ stages: buildType: 'specific' project: 'client' pipeline: '42' + buildVersionToDownload: 'specific' buildId: '3656' downloadType: 'specific' itemPattern: '**/*.tar' From f55e4ac4cd739b02f87c200a5a539a1ac37cc12e Mon Sep 17 00:00:00 2001 From: Shishir Bhat Date: Mon, 28 Mar 2022 22:10:06 -0700 Subject: [PATCH 5/6] Debug no artifacts --- azure-pipelines/publishing/github-release.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/azure-pipelines/publishing/github-release.yml b/azure-pipelines/publishing/github-release.yml index c0ffa114..a2106c0e 100644 --- a/azure-pipelines/publishing/github-release.yml +++ b/azure-pipelines/publishing/github-release.yml @@ -106,6 +106,14 @@ stages: workingDirectory: $(Build.ArtifactStagingDirectory) displayName: Display hashes of archive files + - task: CmdLine@2 + inputs: + script: | + echo "Directory to be published: $(Build.ArtifactStagingDirectory)" + echo Content to be published: + ls -lR $(Build.ArtifactStagingDirectory) + displayName: Release Information + - task: GitHubRelease@1 condition: eq(${{parameters.SkipPublishing}}, false) inputs: @@ -113,8 +121,8 @@ stages: repositoryName: 'microsoft/do-client' action: 'create' assets: | - '$(Build.ArtifactStagingDirectory)/**/*.tar' - '$(Build.ArtifactStagingDirectory)/hashes*.txt' + $(Build.ArtifactStagingDirectory)/**/*.tar + $(Build.ArtifactStagingDirectory)/hashes*.txt tagSource: 'userSpecifiedTag' tag: '$(Release.Version)' title: '$(Release.Title)' From e9bdbcbcd2c2c2470a69b3b8eb20c580bbb7ceb8 Mon Sep 17 00:00:00 2001 From: Shishir Bhat Date: Mon, 28 Mar 2022 22:20:03 -0700 Subject: [PATCH 6/6] Finalize changes --- azure-pipelines/publishing/github-release.yml | 85 ++++++++----------- 1 file changed, 36 insertions(+), 49 deletions(-) diff --git a/azure-pipelines/publishing/github-release.yml b/azure-pipelines/publishing/github-release.yml index a2106c0e..74b5f1a5 100644 --- a/azure-pipelines/publishing/github-release.yml +++ b/azure-pipelines/publishing/github-release.yml @@ -31,42 +31,42 @@ parameters: - false stages: -#- stage: pre_build -# jobs: -# - job: print_variables -# steps: -# - task: CmdLine@2 -# inputs: -# script: | -# echo "Release title: $(Release.Title)" -# echo "Release tag: $(Release.Version)" -# echo "Tag used to generate changelog: $(Release.PreviousVersion)" +- stage: pre_build + jobs: + - job: print_variables + steps: + - task: CmdLine@2 + inputs: + script: | + echo "Release title: $(Release.Title)" + echo "Release tag: $(Release.Version)" + echo "Tag used to generate changelog: $(Release.PreviousVersion)" -#- stage: release_build -# jobs: -# - template: templates/release-native-build-steps.yml -# parameters: -# targetOsArch: 'ubuntu1804_x64' -# - template: templates/release-docker-build-steps.yml -# parameters: -# targetOsArch: 'ubuntu1804_arm64' -# imageVersion: ${{variables.imageVersion}} -# - template: templates/release-docker-build-steps.yml -# parameters: -# targetOsArch: 'ubuntu2004_x64' -# imageVersion: ${{variables.imageVersion}} -# - template: templates/release-docker-build-steps.yml -# parameters: -# targetOsArch: 'ubuntu2004_arm64' -# imageVersion: ${{variables.imageVersion}} -# - template: templates/release-docker-build-steps.yml -# parameters: -# targetOsArch: 'debian9_arm32' -# imageVersion: ${{variables.imageVersion}} -# - template: templates/release-docker-build-steps.yml -# parameters: -# targetOsArch: 'debian10_arm32' -# imageVersion: ${{variables.imageVersion}} +- stage: release_build + jobs: + - template: templates/release-native-build-steps.yml + parameters: + targetOsArch: 'ubuntu1804_x64' + - template: templates/release-docker-build-steps.yml + parameters: + targetOsArch: 'ubuntu1804_arm64' + imageVersion: ${{variables.imageVersion}} + - template: templates/release-docker-build-steps.yml + parameters: + targetOsArch: 'ubuntu2004_x64' + imageVersion: ${{variables.imageVersion}} + - template: templates/release-docker-build-steps.yml + parameters: + targetOsArch: 'ubuntu2004_arm64' + imageVersion: ${{variables.imageVersion}} + - template: templates/release-docker-build-steps.yml + parameters: + targetOsArch: 'debian9_arm32' + imageVersion: ${{variables.imageVersion}} + - template: templates/release-docker-build-steps.yml + parameters: + targetOsArch: 'debian10_arm32' + imageVersion: ${{variables.imageVersion}} - stage: release condition: succeeded() @@ -75,13 +75,8 @@ stages: steps: - task: DownloadBuildArtifacts@0 inputs: - buildType: 'specific' - project: 'client' - pipeline: '42' - buildVersionToDownload: 'specific' - buildId: '3656' + buildType: 'current' downloadType: 'specific' - itemPattern: '**/*.tar' downloadPath: '$(Build.ArtifactStagingDirectory)' - task: CmdLine@2 @@ -106,14 +101,6 @@ stages: workingDirectory: $(Build.ArtifactStagingDirectory) displayName: Display hashes of archive files - - task: CmdLine@2 - inputs: - script: | - echo "Directory to be published: $(Build.ArtifactStagingDirectory)" - echo Content to be published: - ls -lR $(Build.ArtifactStagingDirectory) - displayName: Release Information - - task: GitHubRelease@1 condition: eq(${{parameters.SkipPublishing}}, false) inputs: