ci: Update build.yml
This commit is contained in:
parent
aa36fca280
commit
dce23818b6
56
.github/workflows/build.yml
vendored
56
.github/workflows/build.yml
vendored
|
@ -315,7 +315,7 @@ jobs:
|
|||
echo "=========================================================================="
|
||||
echo "Collecting statics..."
|
||||
echo "=========================================================================="
|
||||
docker run --rm --name collectstatics -v $(pwd):/workspace ghcr.io/ietf-tools/datatracker-app-base:latest sh dev/build/collectstatics.sh
|
||||
sudo docker run --rm --name collectstatics -v $(pwd):/workspace ghcr.io/ietf-tools/datatracker-app-base:latest sh dev/build/collectstatics.sh
|
||||
echo "Pushing statics..."
|
||||
cd static
|
||||
aws s3 sync . s3://static/dt/$PKG_VERSION --only-show-errors
|
||||
|
@ -341,37 +341,37 @@ jobs:
|
|||
echo "Error!" 1>&2
|
||||
exit 64
|
||||
|
||||
# - name: Destroy Build VM + resources
|
||||
# if: always()
|
||||
# shell: pwsh
|
||||
# run: |
|
||||
# echo "Destroying VM..."
|
||||
# az vm delete -g ghaDatatracker -n tmpGhaBuildVM --yes --force-deletion true
|
||||
- name: Destroy Build VM + resources
|
||||
if: always()
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "Destroying VM..."
|
||||
az vm delete -g ghaDatatracker -n tmpGhaBuildVM --yes --force-deletion true
|
||||
|
||||
# $resourceOrderRemovalOrder = [ordered]@{
|
||||
# "Microsoft.Compute/virtualMachines" = 0
|
||||
# "Microsoft.Compute/disks" = 1
|
||||
# "Microsoft.Network/networkInterfaces" = 2
|
||||
# "Microsoft.Network/publicIpAddresses" = 3
|
||||
# "Microsoft.Network/networkSecurityGroups" = 4
|
||||
# "Microsoft.Network/virtualNetworks" = 5
|
||||
# }
|
||||
# echo "Fetching remaining resources..."
|
||||
# $resources = az resource list --resource-group ghaDatatracker | ConvertFrom-Json
|
||||
$resourceOrderRemovalOrder = [ordered]@{
|
||||
"Microsoft.Compute/virtualMachines" = 0
|
||||
"Microsoft.Compute/disks" = 1
|
||||
"Microsoft.Network/networkInterfaces" = 2
|
||||
"Microsoft.Network/publicIpAddresses" = 3
|
||||
"Microsoft.Network/networkSecurityGroups" = 4
|
||||
"Microsoft.Network/virtualNetworks" = 5
|
||||
}
|
||||
echo "Fetching remaining resources..."
|
||||
$resources = az resource list --resource-group ghaDatatracker | ConvertFrom-Json
|
||||
|
||||
# $orderedResources = $resources
|
||||
# | Sort-Object @{
|
||||
# Expression = {$resourceOrderRemovalOrder[$_.type]}
|
||||
# Descending = $False
|
||||
# }
|
||||
$orderedResources = $resources
|
||||
| Sort-Object @{
|
||||
Expression = {$resourceOrderRemovalOrder[$_.type]}
|
||||
Descending = $False
|
||||
}
|
||||
|
||||
# echo "Deleting remaining resources..."
|
||||
# $orderedResources | ForEach-Object {
|
||||
# az resource delete --resource-group ghaDatatracker --ids $_.id --verbose
|
||||
# }
|
||||
echo "Deleting remaining resources..."
|
||||
$orderedResources | ForEach-Object {
|
||||
az resource delete --resource-group ghaDatatracker --ids $_.id --verbose
|
||||
}
|
||||
|
||||
# echo "Logout from Azure..."
|
||||
# az logout
|
||||
echo "Logout from Azure..."
|
||||
az logout
|
||||
|
||||
# - name: Build Release Docker Image
|
||||
# uses: docker/build-push-action@v6
|
||||
|
|
Loading…
Reference in a new issue