From 99a54f658eb7f9b98ef66f96340530b2b790f9a5 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 15:35:47 -0800 Subject: [PATCH 01/12] Add SPDX task to build output --- azure-pipelines.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 593d2f2d..7e638ba1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -38,7 +38,14 @@ stages: $(Build.SourcesDirectory)/**/*.ts ErrorLevel: 'warn' - - stage: build_test + - job: sbom + steps: + - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 + displayName: 'Generation Task ๐Ÿงพ' + inputs: + BuildDropPath: '$(System.ArtifactsDirectory)/buildOutput' + +- stage: build_test displayName: 'Build & Test' pool: vmImage: 'ubuntu-latest' From d8d9bd285904ed96b2266f285ede1f8612134f9f Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 15:37:50 -0800 Subject: [PATCH 02/12] Fix broken indent for build_test stage --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7e638ba1..7cc6c74a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,7 +45,7 @@ stages: inputs: BuildDropPath: '$(System.ArtifactsDirectory)/buildOutput' -- stage: build_test + - stage: build_test displayName: 'Build & Test' pool: vmImage: 'ubuntu-latest' From f22bfa1d5756c8d3e17764ba8f9cdb2bf4324618 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 15:45:52 -0800 Subject: [PATCH 03/12] Update ArtifactsDirectory location --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7cc6c74a..adce9752 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -43,7 +43,7 @@ stages: - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 displayName: 'Generation Task ๐Ÿงพ' inputs: - BuildDropPath: '$(System.ArtifactsDirectory)/buildOutput' + BuildDropPath: '$(Build.ArtifactsDirectory)/buildOutput' - stage: build_test displayName: 'Build & Test' From 511374a764d13cf7d4fd1981cf7059facd93dca8 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 16:08:18 -0800 Subject: [PATCH 04/12] Use (Build.ArtifactsStagingDirectory) for SBOM files --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index adce9752..b66198ea 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -43,7 +43,7 @@ stages: - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 displayName: 'Generation Task ๐Ÿงพ' inputs: - BuildDropPath: '$(Build.ArtifactsDirectory)/buildOutput' + BuildDropPath: '$(Build.ArtifactsStagingDirectory)/buildOutput' - stage: build_test displayName: 'Build & Test' From 44885c434eaafb3fd0586c6a2539934134645823 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 16:14:48 -0800 Subject: [PATCH 05/12] Update to use $(Build.ArtifactStagingDirectory) --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b66198ea..41d91c64 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -43,7 +43,7 @@ stages: - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 displayName: 'Generation Task ๐Ÿงพ' inputs: - BuildDropPath: '$(Build.ArtifactsStagingDirectory)/buildOutput' + BuildDropPath: '$(Build.ArtifactStagingDirectory)/buildOutput' - stage: build_test displayName: 'Build & Test' From becf2e2bc3a7077a8cef9d3df938b07f8973fb31 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 16:20:44 -0800 Subject: [PATCH 06/12] Move manifest generation after build step --- azure-pipelines.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 41d91c64..90143c77 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -38,13 +38,6 @@ stages: $(Build.SourcesDirectory)/**/*.ts ErrorLevel: 'warn' - - job: sbom - steps: - - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 - displayName: 'Generation Task ๐Ÿงพ' - inputs: - BuildDropPath: '$(Build.ArtifactStagingDirectory)/buildOutput' - - stage: build_test displayName: 'Build & Test' pool: @@ -99,6 +92,11 @@ stages: - script: npm run build displayName: 'Build Toolkit ๐Ÿ—' + - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 + displayName: 'Generation Task ๐Ÿงพ' + inputs: + BuildDropPath: '$(Build.ArtifactStagingDirectory)/dist' + - job: docs timeoutInMinutes: 10 From d04cab3687f67e920eb3ca4d59f950d014a37c03 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 16:26:04 -0800 Subject: [PATCH 07/12] Copy build files into temporary staging --- azure-pipelines.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 90143c77..b1f23bce 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -92,10 +92,17 @@ stages: - script: npm run build displayName: 'Build Toolkit ๐Ÿ—' + - task: CopyFiles@2 + inputs: + SourceFolder: "$(System.DefaultWorkingDirectory)/dist" + Contents: | + **/* + TargetFolder: "$(Build.ArtifactStagingDirectory)" + - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 displayName: 'Generation Task ๐Ÿงพ' inputs: - BuildDropPath: '$(Build.ArtifactStagingDirectory)/dist' + BuildDropPath: '$(Build.ArtifactStagingDirectory)' - job: docs timeoutInMinutes: 10 From 4b97315b9b9b0d71d8200d93825026cc433209e9 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 16:34:34 -0800 Subject: [PATCH 08/12] chore: More descriptive displayNames for build steps --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b1f23bce..2f70e91a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -93,6 +93,7 @@ stages: displayName: 'Build Toolkit ๐Ÿ—' - task: CopyFiles@2 + displayName: "Copy to Staging ๐Ÿ“‚" inputs: SourceFolder: "$(System.DefaultWorkingDirectory)/dist" Contents: | @@ -100,7 +101,7 @@ stages: TargetFolder: "$(Build.ArtifactStagingDirectory)" - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 - displayName: 'Generation Task ๐Ÿงพ' + displayName: 'Generate Manifest ๐Ÿงพ' inputs: BuildDropPath: '$(Build.ArtifactStagingDirectory)' From ccf4fe2aec8cd71924e9e1b8dffa9a553a4c6284 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 16:46:18 -0800 Subject: [PATCH 09/12] chore: Publish artifacts after build --- azure-pipelines.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2f70e91a..8a5d4ce6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -93,18 +93,23 @@ stages: displayName: 'Build Toolkit ๐Ÿ—' - task: CopyFiles@2 - displayName: "Copy to Staging ๐Ÿ“‚" + displayName: 'Copy to Staging ๐Ÿ“‚' inputs: - SourceFolder: "$(System.DefaultWorkingDirectory)/dist" - Contents: | - **/* - TargetFolder: "$(Build.ArtifactStagingDirectory)" + SourceFolder: '$(System.DefaultWorkingDirectory)/dist' + Contents: | + **/* + TargetFolder: '$(Build.ArtifactStagingDirectory)' - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 displayName: 'Generate Manifest ๐Ÿงพ' inputs: BuildDropPath: '$(Build.ArtifactStagingDirectory)' + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifacts ๐Ÿ“ฆ' + inputs: + ArtifactName: 'drop' + - job: docs timeoutInMinutes: 10 From cf1327d09db7441f9d5dcba48dd9dbd83811aa34 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 17:00:21 -0800 Subject: [PATCH 10/12] chore: Add verbose package name to manifest task --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8a5d4ce6..66131859 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -104,6 +104,7 @@ stages: displayName: 'Generate Manifest ๐Ÿงพ' inputs: BuildDropPath: '$(Build.ArtifactStagingDirectory)' + PackageName: 'Webview UI Toolkit for Visual Studio Code' - task: PublishBuildArtifacts@1 displayName: 'Publish Artifacts ๐Ÿ“ฆ' From c7776a98bf2dcf46563a8b3e786ee5600902ae37 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 17:08:12 -0800 Subject: [PATCH 11/12] Set PackageVersion dynamically from package.json --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 66131859..ab08d242 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -105,6 +105,7 @@ stages: inputs: BuildDropPath: '$(Build.ArtifactStagingDirectory)' PackageName: 'Webview UI Toolkit for Visual Studio Code' + PackageVersion: '$(node -p "require(\"./package.json\").version")' - task: PublishBuildArtifacts@1 displayName: 'Publish Artifacts ๐Ÿ“ฆ' From bda40f64e64ffe4e2e6f4b68cb91511192fc9676 Mon Sep 17 00:00:00 2001 From: Mark McLaughlin Date: Thu, 9 Dec 2021 17:22:01 -0800 Subject: [PATCH 12/12] chore: Rollback failed dynamic build number --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ab08d242..66131859 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -105,7 +105,6 @@ stages: inputs: BuildDropPath: '$(Build.ArtifactStagingDirectory)' PackageName: 'Webview UI Toolkit for Visual Studio Code' - PackageVersion: '$(node -p "require(\"./package.json\").version")' - task: PublishBuildArtifacts@1 displayName: 'Publish Artifacts ๐Ÿ“ฆ'