Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI Environment] Removing Az login step from Pester static validation jobs #3095

Merged
merged 5 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .azuredevops/pipelineTemplates/jobs.validateModulePester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

parameters:
# Pipeline-related parameters
serviceConnection: '$(serviceConnection)'
poolName: '$(poolName)'
vmImage: '$(vmImage)'
defaultJobTimeoutInMinutes: 120
Expand All @@ -55,9 +54,6 @@ parameters:
subscriptionId: '$(ARM_SUBSCRIPTION_ID)'
managementGroupId: '$(ARM_MGMTGROUP_ID)'
modulesRepository: '$(modulesRepository)'
# Azure PowerShell Version parameter
azurePowerShellVersion: '$(azurePowerShellVersion)'
preferredAzurePowerShellVersion: '$(preferredAzurePowerShellVersion)'

##---------------------------------------------##
## TEMPLATE LOGIC ##
Expand Down Expand Up @@ -100,15 +96,12 @@ jobs:

# [Module Pester Test] task(s)
#-----------------------------
- task: AzurePowerShell@5
displayName: 'Run general tests via (Pester) via connection [${{ parameters.serviceConnection }}]'
- task: PowerShell@2
displayName: 'Run Pester tests'
inputs:
azureSubscription: ${{ parameters.serviceConnection }}
azurePowerShellVersion: ${{ parameters.azurePowerShellVersion }}
preferredAzurePowerShellVersion: ${{ parameters.preferredAzurePowerShellVersion }}
ScriptType: InlineScript
targetType: inline
pwsh: true
inline: |
script: |
# Set repo root path
$repoRootPath = '$(System.DefaultWorkingDirectory)'

Expand Down
6 changes: 0 additions & 6 deletions .github/actions/templates/validateModulePester/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ runs:

Write-Output '::endgroup::'

- name: Azure Login
uses: Azure/login@v1
with:
creds: ${{ env.AZURE_CREDENTIALS }}
enable-AzPSSession: true

# [Module Pester Test] task(s)
#-----------------------------
- name: 'Run Pester tests'
Expand Down