From 0f345ca74c289d32d6554272d505210234d2f8e3 Mon Sep 17 00:00:00 2001 From: Philip Gichuhi Date: Wed, 4 Dec 2024 15:31:22 +0300 Subject: [PATCH 1/2] chore: Update release pipeline labels for 1ES compliance --- .azure-pipelines/ci-build.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index a73f960..2a7cfbb 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -34,6 +34,12 @@ extends: - stage: build jobs: - job: build + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Publish Microsoft.Kiota.*.nupkg and release pipeline scripts' + artifactName: Nugets + targetPath: $(Build.ArtifactStagingDirectory) steps: - task: UseDotNet@2 # needed for ESRP sign @@ -226,12 +232,6 @@ extends: Contents: 'scripts\**' TargetFolder: '$(Build.ArtifactStagingDirectory)' - - task: 1ES.PublishPipelineArtifact@1 - displayName: 'Upload Artifact: Nugets' - inputs: - artifactName: Nugets - targetPath: $(Build.ArtifactStagingDirectory) - - stage: deploy condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded()) dependsOn: build @@ -239,6 +239,13 @@ extends: - deployment: deploy_dotnet_kiota_libs dependsOn: [] environment: nuget-org + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + artifactName: Nugets + targetPath: $(Pipeline.Workspace) strategy: runOnce: deploy: @@ -251,11 +258,6 @@ extends: inputs: versionSpec: '>=6.11.0' checkLatest: true - - task: DownloadPipelineArtifact@2 - displayName: Download nupkg from artifacts - inputs: - artifact: Nugets - source: current - task: PowerShell@2 displayName: 'Extract release information to pipeline' inputs: From 19e403529c08326b5be08bfe3ef4a25eaa8987ae Mon Sep 17 00:00:00 2001 From: Philip Gichuhi Date: Wed, 4 Dec 2024 15:34:46 +0300 Subject: [PATCH 2/2] rename artifacts to intuitive name --- .azure-pipelines/ci-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 2a7cfbb..e29a697 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -38,7 +38,7 @@ extends: outputs: - output: pipelineArtifact displayName: 'Publish Microsoft.Kiota.*.nupkg and release pipeline scripts' - artifactName: Nugets + artifactName: ArtifactsForRelease targetPath: $(Build.ArtifactStagingDirectory) steps: @@ -244,7 +244,7 @@ extends: isProduction: true inputs: - input: pipelineArtifact - artifactName: Nugets + artifactName: ArtifactsForRelease targetPath: $(Pipeline.Workspace) strategy: runOnce: