From 67dce1292e55d4de40f71a0c8847ec959c090501 Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Fri, 14 Jan 2022 09:06:31 -0800 Subject: [PATCH] Add Manifest Generation (#3241) * add manifest generation * enable bom signing * swap to publish-artifact, add necessary artifact upload for ci.tests. --- .../templates/jobs/archetype-sdk-client.yml | 11 ++++++++++ eng/pipelines/templates/jobs/ci.tests.yml | 21 ++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index aedd53cf7..6d03482e2 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -63,6 +63,7 @@ jobs: variables: VcpkgDependencies: curl[winssl] libxml2 VCPKG_DEFAULT_TRIPLET: 'x64-windows-static' + Package.EnableSBOMSigning: true steps: - template: /eng/common/pipelines/templates/steps/check-spelling.yml parameters: @@ -209,3 +210,13 @@ jobs: path: $(Build.ArtifactStagingDirectory)/docs - template: /eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml + + - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 + displayName: 'Generate BOM' + inputs: + BuildDropPath: $(Build.SourcesDirectory)/build + + - template: /eng/common/pipelines/templates/steps/publish-artifact.yml + parameters: + ArtifactPath: '$(Build.SourcesDirectory)/build/_manifest' + ArtifactName: 'release_artifact_manifest' diff --git a/eng/pipelines/templates/jobs/ci.tests.yml b/eng/pipelines/templates/jobs/ci.tests.yml index a6814599e..56e091373 100644 --- a/eng/pipelines/templates/jobs/ci.tests.yml +++ b/eng/pipelines/templates/jobs/ci.tests.yml @@ -229,4 +229,23 @@ jobs: artifactName: map-files-$(MapFileArtifactName) path: $(Build.ArtifactStagingDirectory) condition: eq(variables['PublishMapFiles'], 'true') - displayName : Publish map file artifacts \ No newline at end of file + displayName : Publish map file artifacts + + - pwsh: | + $artifactName = "$(Agent.JobName)" + $parts = $artifactName -split ' ' + if ($parts[1]) { + $artifactName = $parts[1] + } + Write-Host "##vso[task.setvariable variable=BomArtifactName;]$artifactName" + displayName: Set bom file artifact name + + - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 + displayName: 'Generate BOM' + inputs: + BuildDropPath: $(Build.ArtifactStagingDirectory) + + - template: /eng/common/pipelines/templates/steps/publish-artifact.yml + parameters: + ArtifactPath: '$(Build.ArtifactStagingDirectory)/_manifest' + ArtifactName: 'bom_manifest_$(BomArtifactName)' \ No newline at end of file