Skip to content

Commit 31fa2cf

Browse files
authored
[Eng] Enable daily trigger for CI pipeline and extend branches in allowed CI trigger list (#27230)
* add more branches to ci trigger allow list * add cron job for archive pipeline * exclude network branch from allowed trigger list * switch to github pat from keyvault * fix displayname * fix cron job
1 parent d7962ae commit 31fa2cf

File tree

2 files changed

+36
-11
lines changed

2 files changed

+36
-11
lines changed

.azure-pipelines/azure-powershell-ci.yml

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,37 @@ variables:
3838
PowerShellPlatform: PowerShell Core
3939
AZURE_CLIENTS_SHOW_SECRETS_WARNING: true
4040

41+
schedules:
42+
- cron: 0 4 * * 0,1,2,3,4,5,6
43+
displayName: Daily Archive
44+
branches:
45+
include:
46+
- main
47+
4148
trigger:
4249
batch: true
4350
branches:
4451
include:
4552
- main
46-
53+
- release-*
54+
- Az.*
55+
- LTS
56+
- generation-LTS
57+
- stack-dev
58+
- preview
59+
- AzureRM
60+
- AzureRM6.13
61+
- AzureRM.*
62+
- DeploymentRollouts
63+
- Compute-*
64+
- test-filtering-branch
65+
- azvmremotingpreview
66+
- test-build-filter
67+
- generation
68+
- Azure
69+
exclude:
70+
- release-network-*
71+
4772
jobs:
4873
- job: Build
4974
displayName: Build
@@ -57,15 +82,15 @@ jobs:
5782
workspaceRepo: true
5883
- checkout: azure-powershell-devops
5984
path: "azure-powershell-devops"
60-
- task: PowerShell@2
61-
displayName: 'Get Github Access Token'
62-
inputs:
63-
targetType: inline
64-
pwsh: true
65-
script: |
66-
$ghToken = (& "$(Agent.BuildDirectory)/azure-powershell-devops/pipeline/scripts/Get-GithubToken.ps1")
67-
Write-Host "##vso[task.setvariable variable=GithubToken;issecret=true]$ghToken"
68-
# - template: util/get-github-pat-steps.yml
85+
# - task: PowerShell@2
86+
# displayName: 'Get Github Access Token'
87+
# inputs:
88+
# targetType: inline
89+
# pwsh: true
90+
# script: |
91+
# $ghToken = (& "$(Agent.BuildDirectory)/azure-powershell-devops/pipeline/scripts/Get-GithubToken.ps1")
92+
# Write-Host "##vso[task.setvariable variable=GithubToken;issecret=true]$ghToken"
93+
- template: util/get-github-pat-steps.yml
6994
- task: UseDotNet@2
7095
displayName: 'Use .NET Core sdk 6.0.x'
7196
inputs:

.azure-pipelines/util/get-github-pat-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ steps:
88
$GithubToken = Get-AzKeyVaultSecret -VaultName $(GithubPATKeyVaultName) -Name $(GithubPATKeyVaultAccount) -AsPlainText
99
Write-Host "##vso[task.setvariable variable=GithubToken;issecret=true]$GithubToken"
1010
azurePowerShellVersion: 'LatestVersion'
11-
displayName: Get Github PAT from Key Vault
11+
displayName: Get Github PAT from Key Vault

0 commit comments

Comments
 (0)