Skip to content

Commit 90df878

Browse files
authored
Merge branch 'dev' into dependabot/nuget/src/Authentication/Authentication.Core/Azure.Identity-1.11.0
2 parents 297a97c + ff30bd0 commit 90df878

17 files changed

+438
-364
lines changed

.azure-pipelines/config/credscan/credscan-suppressions.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
55
"placeholder": "pa$$w0rd",
66
"_justification": "[Applications] hard code password in application password HTTP example"
77
},
8+
{
9+
"placeholder": "P@55w0rd",
10+
"_justification": "[AuthenticationTests] hard code password in AuthenticationTest for self signed certificate"
11+
},
12+
{
13+
"file": [
14+
"src\\Authentication\\Authentication\\test\\Get-MgContext.Tests.ps1",
15+
"src\\Authentication\\Authentication.Test\\Helpers\\AuthenticationHelpersTests.cs",
16+
"src\\Authentication\\Authentication.Test\\Helpers\\AuthenticationHelpersTests.cs"
17+
],
18+
"_justification": "[Authentication] Examples contain random values recognized as secret"
19+
},
20+
{
21+
"file": [
22+
"autorest.powershell\\docs\\samples\\timeswire\\readme.md"
23+
],
24+
"_justification": "[AutoRest] Examples contain random values recognized as secret"
25+
},
826
{
927
"file": [
1028
"src\\Applications\\beta\\examples\\New-MgBetaServicePrincipalPasswordSingleSignOnCredentials.md",
@@ -29,6 +47,12 @@
2947
"src\\DeviceManagement.Actions\\beta\\examples\\Update-MgBetaDeviceManagementVirtualEndpointOnPremisConnectionAdDomainPassword.md"
3048
],
3149
"_justification": "[DeviceManagement.Actions] Examples contain random values recognized as secret"
50+
},
51+
{
52+
"file": [
53+
"tools\\Tests\\loadEnv.md"
54+
],
55+
"_justification": "[ToolsTest] Examples contain random values recognized as secret"
3256
}
3357
]
3458
}

.azure-pipelines/config/policheck/policheck-exclusions.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<!--Each of these exclusions is a folder name -if \[name]\exists in the file path, it will be skipped -->
44
<!--<Exclusion Type="FolderPathFull">ABC|XYZ</Exclusion>-->
55
<!--Each of these exclusions is a folder name -if any folder or file starts with "\[name]", it will be skipped -->
6-
<Exclusion Type="FolderPathStart">openApiDocs|docs\exports|src\.*\examples</Exclusion>
6+
<Exclusion Type="FolderPathStart">openApiDocs|docs\exports|src\.*\examples|src\.*\bin|src\.*\generated</Exclusion>
77
<!--Each of these file types will be completely skipped for the entire scan -->
88
<!--<Exclusion Type="FileType">.ABC|.XYZ</Exclusion>-->
99
<!--The specified file names will be skipped during the scan regardless which folder they are in -->
10-
<!--<Exclusion Type="FileName">ABC.TXT|XYZ.CS</Exclusion>-->
10+
<Exclusion Type="FileName">AuthenticationHelpersTests.cs</Exclusion>
1111
</PoliCheckExclusions>
Lines changed: 94 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
2-
3-
trigger: none # disable triggers based on commits.
4-
pr: none # disable as a PR gate.
1+
# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool.
2+
# 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.
3+
# This pipeline will be extended to the OneESPT template
4+
# 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 Examples to be reviewed as artifact' in the templateContext section.
6+
trigger: none
7+
pr: none
58
name: 'PowerShellExamplesUpdateV2 Check'
69
schedules:
7-
- cron: "0 3 * * FRI" # every Friday at 3AM UTC (off hours for Redmond, Nairobi and Montréal)
8-
displayName: 'PowerShellExamplesUpdateV2'
9-
branches:
10-
include:
11-
- dev
12-
always: true
10+
- cron: "0 3 * * FRI"
11+
displayName: 'PowerShellExamplesUpdateV2'
12+
branches:
13+
include:
14+
- dev
15+
always: true
1316
parameters:
1417
- name: PipelineTimeout
1518
displayName: PipelineTimeout
@@ -18,77 +21,85 @@ parameters:
1821
- name: BuildAgent
1922
displayName: Build Agent
2023
default: 1es-windows-ps-compute
21-
2224
resources:
23-
repositories:
24-
- repository: msgraph-sdk-powershell
25-
type: github
26-
endpoint: MicrosoftDocs
27-
name: microsoftgraph/msgraph-sdk-powershell
28-
ref: dev
29-
30-
jobs:
31-
- job: PowerShellExamplesUpdateV2
32-
pool:
33-
name: ${{ parameters.BuildAgent }}
34-
timeoutInMinutes: ${{ parameters.PipelineTimeout }}
35-
steps:
36-
- template: ./common-templates/install-sdk.yml
37-
- task: PowerShell@2
38-
name: "ComputeBranch"
39-
displayName: "Compute weekly examples update branch name"
40-
inputs:
41-
targetType: inline
42-
script: |
43-
$branch = "{0}/{1}" -f "WeeklyExamplesUpdate", (Get-Date -Format yyyyMMddHHmm)
44-
Write-Host "Compute branch: $branch"
45-
Write-Host "##vso[task.setvariable variable=WeeklyExamplesBranch;isOutput=true]$branch"
46-
47-
- task: Bash@3
48-
displayName: "Create weekly examples branch"
49-
inputs:
50-
targetType: inline
51-
script: |
52-
git status
53-
git branch $(ComputeBranch.WeeklyExamplesBranch)
54-
git checkout $(ComputeBranch.WeeklyExamplesBranch)
55-
git status
56-
57-
- task: PowerShell@2
58-
displayName: 'Import Examples From API reference - V2'
59-
continueOnError: false
60-
inputs:
61-
targetType: 'filePath'
62-
pwsh: true
63-
filePath: tools\ImportExamples.ps1
64-
65-
- task: PublishBuildArtifacts@1
66-
displayName: 'Publish Examples to be reviewed as artifact'
67-
inputs:
68-
PathtoPublish: 'examplesreport'
69-
ArtifactName: 'ExamplesToBeReviewed'
70-
publishLocation: 'Container'
71-
# StoreAsTar: true
72-
73-
- task: PowerShell@2
74-
displayName: Pushing to github
75-
env:
76-
GITHUB_TOKEN: $(GITHUB_TOKEN)
77-
inputs:
78-
targetType: inline
79-
pwsh: true
80-
script: |
81-
git config --global user.email "[email protected]"
82-
git config --global user.name "Microsoft Graph DevX Tooling"
83-
git status
84-
git add .
85-
git commit -m "Updating examples"
86-
git push --set-upstream https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git $(ComputeBranch.WeeklyExamplesBranch)
87-
git status
88-
89-
- template: ./common-templates/create-pr.yml
90-
parameters:
91-
BaseBranch: "dev"
92-
TargetBranch: $(ComputeBranch.WeeklyExamplesBranch)
93-
Title: "[v2] Examples Update"
94-
Body: "This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
25+
repositories:
26+
- repository: msgraph-sdk-powershell
27+
type: github
28+
endpoint: MicrosoftDocs
29+
name: microsoftgraph/msgraph-sdk-powershell
30+
ref: dev
31+
- repository: 1ESPipelineTemplates
32+
type: git
33+
name: 1ESPipelineTemplates/1ESPipelineTemplates
34+
ref: refs/tags/release
35+
extends:
36+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
37+
parameters:
38+
pool: $(BuildAgent)
39+
sdl:
40+
credscan:
41+
suppressionsFile: $(Build.SourcesDirectory)/.azure-pipelines/config/credscan/credscan-suppressions.json
42+
policheck:
43+
exclusionFile: $(Build.SourcesDirectory)/.azure-pipelines/config/policheck/policheck-exclusions.xml
44+
customBuildTags:
45+
- ES365AIMigrationTooling
46+
stages:
47+
- stage: stage
48+
jobs:
49+
- job: PowerShellExamplesUpdateV2
50+
timeoutInMinutes: ${{ parameters.PipelineTimeout }}
51+
templateContext:
52+
outputs:
53+
- output: pipelineArtifact
54+
displayName: 'Publish Examples to be reviewed as artifact'
55+
targetPath: 'examplesreport'
56+
artifactName: 'ExamplesToBeReviewed'
57+
publishLocation: 'Container'
58+
steps:
59+
- template: .azure-pipelines/common-templates/install-sdk.yml@self
60+
- task: PowerShell@2
61+
name: "ComputeBranch"
62+
displayName: "Compute weekly examples update branch name"
63+
inputs:
64+
targetType: inline
65+
script: |
66+
$branch = "{0}/{1}" -f "WeeklyExamplesUpdate", (Get-Date -Format yyyyMMddHHmm)
67+
Write-Host "Compute branch: $branch"
68+
Write-Host "##vso[task.setvariable variable=WeeklyExamplesBranch;isOutput=true]$branch"
69+
- task: Bash@3
70+
displayName: "Create weekly examples branch"
71+
inputs:
72+
targetType: inline
73+
script: |
74+
git status
75+
git branch $(ComputeBranch.WeeklyExamplesBranch)
76+
git checkout $(ComputeBranch.WeeklyExamplesBranch)
77+
git status
78+
- task: PowerShell@2
79+
displayName: 'Import Examples From API reference - V2'
80+
continueOnError: false
81+
inputs:
82+
targetType: 'filePath'
83+
pwsh: true
84+
filePath: tools\ImportExamples.ps1
85+
- task: PowerShell@2
86+
displayName: Pushing to github
87+
env:
88+
GITHUB_TOKEN: $(GITHUB_TOKEN)
89+
inputs:
90+
targetType: inline
91+
pwsh: true
92+
script: |
93+
git config --global user.email "[email protected]"
94+
git config --global user.name "Microsoft Graph DevX Tooling"
95+
git status
96+
git add .
97+
git commit -m "Updating examples"
98+
git push --set-upstream https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git $(ComputeBranch.WeeklyExamplesBranch)
99+
git status
100+
- template: .azure-pipelines/common-templates/create-pr.yml@self
101+
parameters:
102+
BaseBranch: "dev"
103+
TargetBranch: $(ComputeBranch.WeeklyExamplesBranch)
104+
Title: "[v2] Examples Update"
105+
Body: "This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."

0 commit comments

Comments
 (0)