From d220d51a11f66dc39e6d2f66c2643ca35a6e3d0e Mon Sep 17 00:00:00 2001 From: Michael Peterson Date: Mon, 3 Jun 2024 12:30:49 -0700 Subject: [PATCH 1/4] Creating a starter release pipeline for Azure pipelines. --- .github/workflows/release-azure-pipelines.yml | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/workflows/release-azure-pipelines.yml diff --git a/.github/workflows/release-azure-pipelines.yml b/.github/workflows/release-azure-pipelines.yml new file mode 100644 index 00000000..3877670c --- /dev/null +++ b/.github/workflows/release-azure-pipelines.yml @@ -0,0 +1,103 @@ +# This pipeline will be triggered when either main branch is pushed or 2AM on workdays. +variables: +- name: tags + value: "nonproduction" + readonly: true + +trigger: +- main + +pr: none + +resources: + repositories: + - repository: CustomPipelineTemplates + type: git + name: 1ESPipelineTemplates/OfficePipelineTemplates + ref: refs/tags/release + +extends: + template: v1/Office.Official.PipelineTemplate.yml@CustomPipelineTemplates + parameters: + pool: + name: Azure-Pipelines-1ESPT-ExDShared + image: windows-latest + os: windows + stages: + - stage: validate + displayName: Validate + jobs: + - job: validate + pool: + name: Azure-Pipelines-1ESPT-ExDShared + image: ubuntu-latest + displayName: Validate + steps: + - checkout: self + - task: Bash@3 + inputs: + targetType: inline + script: | + echo $(version) | python ./bin/version.py + + - stage: build + displayName: Build + jobs: + - job: build + strategy: + matrix: + x64-windows: + poolName: Azure-Pipelines-1ESPT-ExDShared + image: 'windows-latest' + runtime: 'win10-x64' + x64-mac: + poolName: Azure Pipelines + image: 'macOS-latest' + runtime: 'osx-x64' + arm-mac: + poolName: Azure Pipelines + image: 'macOS-latest' + runtime: 'osx-arm64' + pool: + name: ${{ matrix.poolName }} + image: ${{ matrix.image }} + displayName: Build + steps: + - checkout: self + - task: UseDotNet@2 + displayName: Use .NET Core sdk 6.x + inputs: + version: 6.x + + - task: NuGetToolInstaller@0 + displayName: Use NuGet 6.x + inputs: + versionSpec: 6.x + + - task: DotNetCoreCLI@2 + displayName: Install dependencies + inputs: + command: restore + feedsToUse: select + vstsFeed: $(feedId) + includeNuGetOrg: false + arguments: '--runtime ${{ matrix.runtime }}' + + - task: DotNetCoreCLI@2 + displayName: Test + inputs: + command: test + arguments: --configuration release + + - task: DotNetCoreCLI@2 + displayName: Build artifacts + inputs: + command: publish + projects: 'src/AzureAuth/AzureAuth.csproj' + arguments: '-p:Version=$(version) --configuration release --self-contained true --runtime ${{ matrix.runtime }} --output dist/${{ matrix.runtime }}' + + templateContext: + outputs: + - output: pipelineArtifact + path: dist/${{ matrix.runtime }} + artifact: azureauth-$(version)-${{ matrix.runtime }} \ No newline at end of file From ec68216fd3ca29889e75d2de9c222101a7102b1d Mon Sep 17 00:00:00 2001 From: Michael Peterson Date: Wed, 5 Jun 2024 15:21:43 -0700 Subject: [PATCH 2/4] Changing the variable name for the vsts feed id to be more explicit. --- .github/workflows/release-azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-azure-pipelines.yml b/.github/workflows/release-azure-pipelines.yml index 3877670c..896a0c08 100644 --- a/.github/workflows/release-azure-pipelines.yml +++ b/.github/workflows/release-azure-pipelines.yml @@ -79,7 +79,7 @@ extends: inputs: command: restore feedsToUse: select - vstsFeed: $(feedId) + vstsFeed: $(vstsFeedId) includeNuGetOrg: false arguments: '--runtime ${{ matrix.runtime }}' From 9a80f4c60f09e3fa8f14b1cfe0bf2d389e05aab1 Mon Sep 17 00:00:00 2001 From: Michael Peterson Date: Wed, 5 Jun 2024 15:22:00 -0700 Subject: [PATCH 3/4] Changing to the unofficial PT. --- .github/workflows/release-azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-azure-pipelines.yml b/.github/workflows/release-azure-pipelines.yml index 896a0c08..65aff5cf 100644 --- a/.github/workflows/release-azure-pipelines.yml +++ b/.github/workflows/release-azure-pipelines.yml @@ -17,7 +17,7 @@ resources: ref: refs/tags/release extends: - template: v1/Office.Official.PipelineTemplate.yml@CustomPipelineTemplates + template: v1/Office.Unofficial.PipelineTemplate.yml@CustomPipelineTemplates parameters: pool: name: Azure-Pipelines-1ESPT-ExDShared From c4ea2701dc9c6593619154d4c870d7d35991fa41 Mon Sep 17 00:00:00 2001 From: Michael Peterson Date: Thu, 6 Jun 2024 10:40:41 -0700 Subject: [PATCH 4/4] Switching to manual trigger and updating comment. --- .github/workflows/release-azure-pipelines.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-azure-pipelines.yml b/.github/workflows/release-azure-pipelines.yml index 65aff5cf..502c5a60 100644 --- a/.github/workflows/release-azure-pipelines.yml +++ b/.github/workflows/release-azure-pipelines.yml @@ -1,11 +1,10 @@ -# This pipeline will be triggered when either main branch is pushed or 2AM on workdays. +# This pipeline will be triggered manually. variables: - name: tags value: "nonproduction" readonly: true -trigger: -- main +trigger: none pr: none