From 047c524f43c011ff479d41411b137ae46395ab17 Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Wed, 9 Oct 2024 09:59:30 -0700 Subject: [PATCH 1/2] Switch from Netlock to KS3 so GitHub publish task works --- .pipelines/PSScriptAnalyzer-Official.yml | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pipelines/PSScriptAnalyzer-Official.yml b/.pipelines/PSScriptAnalyzer-Official.yml index 15bccd7f0..f9282aedc 100644 --- a/.pipelines/PSScriptAnalyzer-Official.yml +++ b/.pipelines/PSScriptAnalyzer-Official.yml @@ -51,7 +51,7 @@ extends: EnableCDPxPAT: false WindowsHostVersion: Version: 2022 - Network: Netlock + Network: KS3 stages: - stage: build jobs: diff --git a/global.json b/global.json index a12beb82e..6e6e5445c 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "6.0.425" + "version": "6.0.427" } } From 6189e3b949bdc2d6d75217a76ba9da9590a46d1d Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:59:04 -0700 Subject: [PATCH 2/2] Migrate to DeployBox for release stage --- .pipelines/PSScriptAnalyzer-Official.yml | 32 +++++++++++++----------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.pipelines/PSScriptAnalyzer-Official.yml b/.pipelines/PSScriptAnalyzer-Official.yml index f9282aedc..971cdc351 100644 --- a/.pipelines/PSScriptAnalyzer-Official.yml +++ b/.pipelines/PSScriptAnalyzer-Official.yml @@ -52,6 +52,8 @@ extends: WindowsHostVersion: Version: 2022 Network: KS3 + release: + category: NonAzure stages: - stage: build jobs: @@ -119,25 +121,25 @@ extends: dependsOn: build condition: eq(variables['Build.Reason'], 'Manual') variables: + ob_release_environment: Production version: $[ stageDependencies.build.main.outputs['package.version'] ] - drop: $(Pipeline.Workspace)/drop_build_main jobs: - job: github displayName: Publish draft to GitHub pool: - type: windows - variables: - ob_outputDirectory: $(Build.SourcesDirectory)/out + type: release + templateContext: + inputs: + - input: pipelineArtifact + artifactName: drop_build_main steps: - - download: current - displayName: Download artifacts - task: GitHubRelease@1 displayName: Create GitHub release inputs: gitHubConnection: GitHub repositoryName: PowerShell/PSScriptAnalyzer - assets: | - $(drop)/PSScriptAnalyzer.$(version).nupkg + target: main + assets: $(Pipeline.Workspace)/PSScriptAnalyzer.$(version).nupkg tagSource: userSpecifiedTag tag: v$(version) isDraft: true @@ -147,7 +149,7 @@ extends: - job: validation displayName: Manual validation pool: - type: agentless + type: server timeoutInMinutes: 1440 steps: - task: ManualValidation@0 @@ -160,16 +162,16 @@ extends: dependsOn: validation displayName: Publish to PowerShell Gallery pool: - type: windows - variables: - ob_outputDirectory: $(Build.SourcesDirectory)/out + type: release + templateContext: + inputs: + - input: pipelineArtifact + artifactName: drop_build_main steps: - - download: current - displayName: Download artifacts - task: NuGetCommand@2 displayName: Publish module to PowerShell Gallery inputs: command: push - packagesToPush: $(drop)/PSScriptAnalyzer.$(version).nupkg + packagesToPush: $(Pipeline.Workspace)/PSScriptAnalyzer.$(version).nupkg nuGetFeedType: external publishFeedCredentials: PowerShellGallery