Skip to content
Open
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
6 changes: 4 additions & 2 deletions .github/actions/validate-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ runs:
- name: ${{ inputs.name }}
shell: pwsh
run: |
$Env:PSModulePath = $Env:PSModulePath, '$(modulesFolder)' -join [IO.Path]::PathSeparator
$CustomSortOrder = $Env:AZOPS_CUSTOM_SORT_ORDER -eq 'true'
Import-PSFConfig -Path settings.json -Schema MetaJson -EnableException
$RunWhatIf = -not ('${{inputs.deploy}}' -eq 'true')
$diff = Get-Content -Path /tmp/diff.txt
if(Test-Path -Path "/tmp/diffdeletedfiles.txt") {
$diffdeletedfiles = Get-Content -Path /tmp/diffdeletedfiles.txt
Invoke-AzOpsPush -ChangeSet $diff -DeleteSetContents $diffdeletedfiles -WhatIf:$RunWhatIf
Invoke-AzOpsPush -ChangeSet $diff -DeleteSetContents $diffdeletedfiles -WhatIf:$RunWhatIf -CustomSortOrder:$CustomSortOrder
}
else {
Invoke-AzOpsPush -ChangeSet $diff -WhatIf:$RunWhatIf
Invoke-AzOpsPush -ChangeSet $diff -WhatIf:$RunWhatIf -CustomSortOrder:$CustomSortOrder
}
Get-Job | Remove-Job -Force
11 changes: 11 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ env:
AZOPS_MODULE_VERSION: ${{ secrets.AZOPS_MODULE_VERSION }}
APPLICATIONINSIGHTS_CONNECTIONSTRING: ${{ secrets.APPLICATIONINSIGHTS_CONNECTIONSTRING }}

#
# customSortOrder
# Set to true to support custom sort order.
# When enabled, add a file named .order containing a list of
# file names and the files in that folder will be deployed in the
# order specified in the file. All files not listed in the file
# will be deployed after the files listed in the file.
#

AZOPS_CUSTOM_SORT_ORDER: ${{ secrets.AZOPS_CUSTOM_SORT_ORDER }}

#
# modulesFolder
# To enable caching of PowerShell modules between
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ env:
AZOPS_MODULE_VERSION: ${{ secrets.AZOPS_MODULE_VERSION }}
APPLICATIONINSIGHTS_CONNECTIONSTRING: ${{ secrets.APPLICATIONINSIGHTS_CONNECTIONSTRING }}

#
# customSortOrder
# Set to true to support custom sort order.
# When enabled, add a file named .order containing a list of
# file names and the files in that folder will be deployed in the
# order specified in the file. All files not listed in the file
# will be deployed after the files listed in the file.
#

AZOPS_CUSTOM_SORT_ORDER: ${{ secrets.AZOPS_CUSTOM_SORT_ORDER }}

#
# modulesFolder
# To enable caching of PowerShell modules between
Expand Down