Skip to content

Commit

Permalink
Merge pull request #199 from tSQLt-org/fix-tSQLt-CI-Nightly-Cleanup
Browse files Browse the repository at this point in the history
using new "    azureSubscription: 'tSQLt CI - Nightly Cleanup - Service Connection'" to authenticate
  • Loading branch information
lizbaron authored Apr 21, 2024
2 parents f724ad2 + 1d28ae3 commit 60a1cc8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
10 changes: 5 additions & 5 deletions CI/Azure-DevOps/AZ_MainPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ stages:

- task: AzureKeyVault@1
inputs:
azureSubscription: 'Azure DevOps Main Pipeline Service Principal'
azureSubscription: 'tSQLt CI - Main Pipeline - Service Connection'
KeyVaultName: 'tSQLtSigningKey'
SecretsFilter: '*'
RunAsPreJob: false
Expand Down Expand Up @@ -130,7 +130,7 @@ stages:
SQLPORTMINIMUM: $(SqlPortMinimum)
SQLPORTMAXIMUM: $(SqlPortMaximum)
inputs:
azureSubscription: 'Azure DevOps Main Pipeline Service Principal'
azureSubscription: 'tSQLt CI - Main Pipeline - Service Connection'
azurePowerShellVersion: 'LatestVersion'
scriptType: ps
scriptLocation: inlineScript
Expand Down Expand Up @@ -218,7 +218,7 @@ stages:

- task: AzureKeyVault@1
inputs:
azureSubscription: 'Azure DevOps Main Pipeline Service Principal'
azureSubscription: 'tSQLt CI - Main Pipeline - Service Connection'
KeyVaultName: 'tSQLtSigningKey'

- task: PowerShell@2
Expand Down Expand Up @@ -426,7 +426,7 @@ stages:

- task: AzureKeyVault@1
inputs:
azureSubscription: 'Azure DevOps Main Pipeline Service Principal'
azureSubscription: 'tSQLt CI - Main Pipeline - Service Connection'
KeyVaultName: 'tSQLtSigningKey'

- task: PowerShell@2
Expand Down Expand Up @@ -665,7 +665,7 @@ stages:
- task: AzureCLI@2
name: DeleteAzureVM
inputs:
azureSubscription: 'Azure DevOps Main Pipeline Service Principal'
azureSubscription: 'tSQLt CI - Main Pipeline - Service Connection'
azurePowerShellVersion: 'LatestVersion'
scriptType: ps
scriptLocation: inlineScript
Expand Down
11 changes: 5 additions & 6 deletions CI/Azure-DevOps/AZ_NightlyCleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# https://aka.ms/yaml

pool:
vmImage: 'vs2017-win2016'
vmImage: 'windows-latest' #requires windows for azure authentication

schedules:
- cron: 1 16 * * *
Expand Down Expand Up @@ -35,11 +35,10 @@ steps:
AZURE_DEVOPS_EXT_PAT: $(tSQLtCIAzureCLIPatToken)
## black magic: this token ^^^^ is required to make "az pipelines runs show" work below
inputs:
azureSubscription: 'tSQLt CI Subscription(58c04a99-5b92-410c-9e41-10262f68ca80)'
azureSubscription: 'tSQLt CI - Nightly Cleanup - Service Connection'
scriptType: 'ps'
scriptLocation: 'inlineScript'
inlineScript: |
##Functions
$GetAll_tSQLtCI_RGs = {
param();
Expand Down Expand Up @@ -141,7 +140,7 @@ steps:
- task: AzurePowerShell@4
name: print_stuff
inputs:
azureSubscription: 'tSQLt CI Subscription(58c04a99-5b92-410c-9e41-10262f68ca80)'
azureSubscription: 'tSQLt CI - Nightly Cleanup - Service Connection'
azurePowerShellVersion: 'LatestVersion'
failOnStandardError: True
ScriptType: 'InlineScript'
Expand All @@ -159,7 +158,7 @@ steps:
condition: succeeded()
name: Delete_RGs
inputs:
azureSubscription: 'tSQLt CI Subscription(58c04a99-5b92-410c-9e41-10262f68ca80)'
azureSubscription: 'tSQLt CI - Nightly Cleanup - Service Connection'
azurePowerShellVersion: 'LatestVersion'
FailOnStandardError: true
ScriptType: 'InlineScript'
Expand Down Expand Up @@ -225,7 +224,7 @@ steps:
name: AssertDeleteSuccessful
condition: always()
inputs:
azureSubscription: 'tSQLt CI Subscription(58c04a99-5b92-410c-9e41-10262f68ca80)'
azureSubscription: 'tSQLt CI - Nightly Cleanup - Service Connection'
azurePowerShellVersion: 'LatestVersion'
failOnStandardError: True
ScriptType: 'InlineScript'
Expand Down

0 comments on commit 60a1cc8

Please sign in to comment.