Skip to content

Commit

Permalink
pipeline script updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bmoore-msft committed Jul 9, 2019
1 parent 9c9fc87 commit f7f9e58
Show file tree
Hide file tree
Showing 5 changed files with 745 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ test/template-validation-tests/mochawesome-report/*

test/ci-scripts/.config.json
test/AzTemplateToolKit.zip
test/pipeline/QuickStarts-Az-CI-Public-Export.json
test/pipeline/QuickStarts-Az-CI-Public-Import.json
2 changes: 1 addition & 1 deletion test/ci-gen-setup/Create-GEN-Artifacts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Creat a KeyVault and add:
# Create the Vault
$vault = Get-AzureRMKeyVault -VaultName $KeyVaultName -verbose -ErrorAction SilentlyContinue
if($vault -eq $null) {
$vault = New-AzureRMKeyVault -VaultName $KeyVaultName -ResourceGroupName $ResourceGroupName -Location $Location -EnabledForTemplateDeployment -EnabledForDiskEncryption
$vault = New-AzureRMKeyVault -VaultName $KeyVaultName -ResourceGroupName $ResourceGroupName -Location $Location -EnabledForTemplateDeployment -EnabledForDiskEncryption -Verbose
}

# 1) Create a sample password
Expand Down
6 changes: 2 additions & 4 deletions test/ci-scripts/Create-ResourceGroupAssignment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
param(
[string][Parameter(mandatory=$true)] $ResourceGroupName,
[string][Parameter(mandatory=$true)] $Location,
[string][Parameter(mandatory=$true)] $appId,
[string][Parameter(mandatory=$true)] $objectId #TODO this is a workaround until we can figure out why Get-AzADSP failes and role assignment partially fails
[string][Parameter(mandatory=$true)] $appId
)

#Create the group only if it doesn't already exist
Expand All @@ -15,5 +14,4 @@ if ((Get-AzResourceGroup -Name $ResourceGroupName -Location $Location -Verbose -
}

#Note that the service principal assigning the role must have AAD perms to query AD for the objectId
#New-AzRoleAssignment -ObjectId $(Get-AzADServicePrincipal -ApplicationId $appId).Id -RoleDefinitionName Contributor -ResourceGroupName $ResourceGroupName -Verbose
New-AzRoleAssignment -ObjectId $objectId -RoleDefinitionName Contributor -ResourceGroupName $ResourceGroupName -Verbose
New-AzRoleAssignment -ObjectId $(Get-AzADServicePrincipal -ApplicationId $appId).Id -RoleDefinitionName Contributor -ResourceGroupName $ResourceGroupName -Verbose
2 changes: 1 addition & 1 deletion test/ci-scripts/Get-SampleFolder.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ If the PR does not contain changes to a sample folder, it will currently fail bu
pass the build in order to trigger a manual review
#>

Get-ChildItem env: # debugging
# Get-ChildItem env: # debugging

$GitHubRepository = $ENV:BUILD_REPOSITORY_NAME
$GitHubPRNumber = $ENV:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER
Expand Down
Loading

0 comments on commit f7f9e58

Please sign in to comment.