Skip to content

Commit

Permalink
azure-pipelines: Simplify build and correct the shape to prepare for …
Browse files Browse the repository at this point in the history
…new NPM release pipeline (#1867)
  • Loading branch information
bwateratmsft authored Jan 9, 2025
1 parent f132185 commit 034cf42
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 48 deletions.
62 changes: 18 additions & 44 deletions .azure-pipelines/1esmain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@ resources:
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release

parameters:
- name: PackageToBuild
displayName: Package to Build
type: string
default: "all"
values:
- all
- microsoft-vscode-azext-azureappservice
- microsoft-vscode-azext-azureappsettings
- microsoft-vscode-azext-azureauth
- microsoft-vscode-azext-azureutils
- microsoft-vscode-azext-dev
- microsoft-eslint-config-azuretools
- microsoft-vscode-azext-github
- microsoft-vscode-azext-serviceconnector
- microsoft-vscode-azext-utils

# Use the templates
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
Expand All @@ -60,30 +43,21 @@ extends:
- template: ../azure-pipelines/1esstages.yml
parameters:
jobs:
- ${{ if or(eq(parameters.PackageToBuild, 'microsoft-vscode-azext-azureappservice'), eq(parameters.PackageToBuild, 'all')) }}:
- name: appservice
working_directory: appservice
- ${{ if or(eq(parameters.PackageToBuild, 'microsoft-vscode-azext-azureappsettings'), eq(parameters.PackageToBuild, 'all')) }}:
- name: appsettings
working_directory: appsettings
- ${{ if or(eq(parameters.PackageToBuild, 'microsoft-vscode-azext-azureauth'), eq(parameters.PackageToBuild, 'all')) }}:
- name: auth
working_directory: auth
- ${{ if or(eq(parameters.PackageToBuild, 'microsoft-vscode-azext-azureutils'), eq(parameters.PackageToBuild, 'all')) }}:
- name: azure
working_directory: azure
- ${{ if or(eq(parameters.PackageToBuild, 'microsoft-vscode-azext-dev'), eq(parameters.PackageToBuild, 'all')) }}:
- name: dev
working_directory: dev
- ${{ if or(eq(parameters.PackageToBuild, 'microsoft-eslint-config-azuretools'), eq(parameters.PackageToBuild, 'all')) }}:
- name: eslint_config_azuretools
working_directory: eslint-config-azuretools
- ${{ if or(eq(parameters.PackageToBuild, 'microsoft-vscode-azext-github'), eq(parameters.PackageToBuild, 'all')) }}:
- name: github
working_directory: github
- ${{ if or(eq(parameters.PackageToBuild, 'microsoft-vscode-azext-serviceconnector'), eq(parameters.PackageToBuild, 'all')) }}:
- name: serviceconnector
working_directory: serviceconnector
- ${{ if or(eq(parameters.PackageToBuild, 'microsoft-vscode-azext-utils'), eq(parameters.PackageToBuild, 'all')) }}:
- name: utils
working_directory: utils
- name: microsoft_vscode_azext_azureappservice
working_directory: appservice
- name: microsoft_vscode_azext_azureappsettings
working_directory: appsettings
- name: microsoft_vscode_azext_azureauth
working_directory: auth
- name: microsoft_vscode_azext_azureutils
working_directory: azure
- name: microsoft_vscode_azext_dev
working_directory: dev
- name: microsoft_eslint_config_azuretools
working_directory: eslint-config-azuretools
- name: microsoft_vscode_azext_github
working_directory: github
- name: microsoft_vscode_azext_serviceconnector
working_directory: serviceconnector
- name: microsoft_vscode_azext_utils
working_directory: utils
8 changes: 4 additions & 4 deletions azure-pipelines/1esstages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ parameters:
- name: "jobs"
type: object
default:
- name: Root # TODO: would like this to be repository name but can't use build variables here
- name: Root
working_directory: .
- name: "useAzureFederatedCredentials"
type: boolean
Expand Down Expand Up @@ -30,8 +30,8 @@ stages:
zipSources: false
outputs:
- output: pipelineArtifact
targetPath: $(build.artifactstagingdirectory)/build/${{ job.name }}
artifactName: Build ${{ job.name }}
targetPath: $(build.artifactstagingdirectory)/build/$(artifact_name)
artifactName: Build $(artifact_name)
steps:
- template: ./templates/setup.yml
parameters:
Expand All @@ -48,5 +48,5 @@ stages:
parameters:
useAzureFederatedCredentials: ${{ parameters.useAzureFederatedCredentials }}
variables:
artifact_name: ${{ job.name }}
artifact_name: ${{ replace(job.name, '_', '-') }}
working_directory: ${{ job.working_directory }}

0 comments on commit 034cf42

Please sign in to comment.