Skip to content

Commit 6608cfd

Browse files
Fix and Condense Metadata-Refresh Pipeline (#3545)
* condense pipeline into a single job * mark as production job * remove jobtype * simplify refresh pipeline * set networkIsolationPolicy to permissive
1 parent 9220d3d commit 6608cfd

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

.azure-pipelines/command-metadata-refresh.yml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected.
33
# This pipeline will be extended to the OneESPT template
44
# If you are not using the E+D shared hosted pool with windows-2022, replace the pool section with your hosted pool, os, and image name. If you are using a Linux image, you must specify an additional windows image for SDL: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/overview#how-to-specify-a-windows-pool-for-the-sdl-source-analysis-stage
5-
# The Task 'PublishBuildArtifacts@1' has been converted to an output named 'Publish Module Artifacts' in the templateContext section.
6-
# The Task 'NuGetCommand@2' has been converted to an output named 'Publish NuGet to feed' in the templateContext section.
75

86
name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
97
parameters:
@@ -49,6 +47,8 @@ extends:
4947
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
5048
parameters:
5149
pool: $(BuildAgent)
50+
settings:
51+
networkIsolationPolicy: Permissive
5252
sdl:
5353
binskim:
5454
enabled: false
@@ -62,42 +62,40 @@ extends:
6262
stages:
6363
- stage: stage
6464
jobs:
65-
- job: CreateMetadataRefreshBranch
66-
displayName: Create Metadata Refresh Branch
65+
- job: MsGraphPsSdkModuleCommandMetadataGeneration
66+
templateContext:
67+
isProduction: true
68+
displayName: Microsoft Graph PowerShell SDK Generation
6769
timeoutInMinutes: 1200
6870
steps:
69-
- template: .azure-pipelines/common-templates/checkout.yml@self
70-
parameters:
71-
TargetBranch: ${{ parameters.BaseBranch }}
71+
- script: |
72+
git submodule update --init --recursive
73+
displayName: "Initialize submodules"
74+
- task: PowerShell@2
75+
displayName: "Configure user"
76+
inputs:
77+
targetType: inline
78+
pwsh: true
79+
script: |
80+
git config --global user.email "GraphTooling@service.microsoft.com"
81+
git config --global user.name "Microsoft Graph DevX Tooling"
7282
- task: PowerShell@2
7383
name: "ComputeBranch"
7484
displayName: "Compute Module Command Metadata Refresh Branch Name"
7585
inputs:
7686
targetType: inline
7787
script: |
7888
$branch = "{0}/{1}" -f "$(Branch)", (Get-Date -Format yyyyMMddHHmm)
79-
Write-Host "##vso[task.setvariable variable=RefreshBranch;isOutput=true]$branch"
89+
Write-Host "##vso[task.setvariable variable=RefreshBranch]$branch"
8090
- task: Bash@3
8191
displayName: "Create Module Command Metadata Refresh Branch"
8292
inputs:
8393
targetType: inline
8494
script: |
8595
git status
86-
git branch $(ComputeBranch.RefreshBranch)
87-
git checkout $(ComputeBranch.RefreshBranch)
88-
git status
89-
90-
- job: MsGraphPsSdkModuleCommandMetadataGeneration
91-
dependsOn: CreateMetadataRefreshBranch
92-
displayName: Microsoft Graph PowerShell SDK Generation
93-
condition: succeeded()
94-
timeoutInMinutes: 840
95-
variables:
96-
RefreshBranch: $[ dependencies.CreateMetadataRefreshBranch.outputs['ComputeBranch.RefreshBranch'] ]
97-
steps:
98-
- template: .azure-pipelines/common-templates/checkout.yml@self
99-
parameters:
100-
TargetBranch: $(RefreshBranch)
96+
git branch $(RefreshBranch)
97+
git checkout $(RefreshBranch)
98+
git status
10199
- template: .azure-pipelines/common-templates/install-tools.yml@self
102100
- template: .azure-pipelines/common-templates/security-pre-checks.yml@self
103101
- template: .azure-pipelines/generation-templates/authentication-module.yml@self

0 commit comments

Comments
 (0)