Issue Fixes - Accelerator Pipeline (#93)

This commit is contained in:
Somil Ganguly 2021-11-07 01:05:59 +05:30 коммит произвёл GitHub
Родитель 079223a2f7
Коммит 7ed86d4e28
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 46 добавлений и 26 удалений

2
.github/workflows/pull.yml поставляемый
Просмотреть файл

@ -180,7 +180,7 @@ jobs:
- name: "Initialize"
shell: pwsh
run: |
Import-PSFConfig -Path settings.json -Schema MetaJson
Import-PSFConfig -Path settings.json -Schema MetaJson -EnableException
if ($env:ACTION -eq "Enterprise-Scale Deployment") {
Set-PSFConfig -FullName AzOps.Core.SkipResource -Value $false
}

17
.github/workflows/push.yml поставляемый
Просмотреть файл

@ -78,11 +78,16 @@ jobs:
- name: "Diff"
shell: bash
run: |
echo $(git diff --name-status HEAD^ HEAD)
git diff --name-status HEAD^ HEAD > /tmp/diff.txt
if [ ! -z "$(git diff --diff-filter=D HEAD^ HEAD)" ]; then
echo $(git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r)
git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r > /tmp/diffdeletedfiles.txt
if [ ! -z "$(git diff --name-status HEAD^ HEAD)" ]; then
echo $(git diff --name-status HEAD^ HEAD)
git diff --name-status HEAD^ HEAD > /tmp/diff.txt
if [ ! -z "$(git diff --diff-filter=D HEAD^ HEAD)" ]; then
echo $(git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r)
git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r > /tmp/diffdeletedfiles.txt
fi
else
echo "The validation pipeline failed because there is currently no change to be processed"
exit 1
fi
#
@ -94,7 +99,7 @@ jobs:
shell: pwsh
run: |
Initialize-AzOpsEnvironment
Import-PSFConfig -Path settings.json -Schema MetaJson
Import-PSFConfig -Path settings.json -Schema MetaJson -EnableException
$diff = Get-Content -Path /tmp/diff.txt
$module = Get-Module -Name AzOps
if(Test-Path -Path "/tmp/diffdeletedfiles.txt") {

17
.github/workflows/validate.yml поставляемый
Просмотреть файл

@ -72,11 +72,16 @@ jobs:
id: diff
shell: bash
run: |
echo $(git diff --name-status HEAD^ HEAD)
git diff --name-status HEAD^ HEAD > /tmp/diff.txt
if [ ! -z "$(git diff --diff-filter=D HEAD^ HEAD)" ]; then
echo $(git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r)
git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r > /tmp/diffdeletedfiles.txt
if [ ! -z "$(git diff --name-status HEAD^ HEAD)" ]; then
echo $(git diff --name-status HEAD^ HEAD)
git diff --name-status HEAD^ HEAD > /tmp/diff.txt
if [ ! -z "$(git diff --diff-filter=D HEAD^ HEAD)" ]; then
echo $(git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r)
git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r > /tmp/diffdeletedfiles.txt
fi
else
echo "The validation pipeline failed because there is currently no change to be processed"
exit 1
fi
#
@ -87,7 +92,7 @@ jobs:
shell: pwsh
run: |
Initialize-AzOpsEnvironment
Import-PSFConfig -Path settings.json -Schema MetaJson
Import-PSFConfig -Path settings.json -Schema MetaJson -EnableException
$diff = Get-Content -Path /tmp/diff.txt
$module = Get-Module -Name AzOps
if(Test-Path -Path "/tmp/diffdeletedfiles.txt")

Просмотреть файл

@ -190,7 +190,7 @@ jobs:
inputs:
targetType: "inline"
script: |
Import-PSFConfig -Path settings.json -Schema MetaJson
Import-PSFConfig -Path settings.json -Schema MetaJson -EnableException
Invoke-AzOpsPull -Rebuild
Get-Job | Remove-Job -Force

Просмотреть файл

@ -92,11 +92,16 @@ jobs:
inputs:
targetType: "inline"
script: |
echo $(git diff --name-status HEAD^ HEAD)
git diff --name-status HEAD^ HEAD > /tmp/diff.txt
if [ ! -z "$(git diff --diff-filter=D HEAD^ HEAD)" ]; then
echo $(git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r)
git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r > /tmp/diffdeletedfiles.txt
if [ ! -z "$(git diff --name-status HEAD^ HEAD)" ]; then
echo $(git diff --name-status HEAD^ HEAD)
git diff --name-status HEAD^ HEAD > /tmp/diff.txt
if [ ! -z "$(git diff --diff-filter=D HEAD^ HEAD)" ]; then
echo $(git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r)
git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r > /tmp/diffdeletedfiles.txt
fi
else
echo "The validation pipeline failed because there is currently no change to be processed"
exit 1
fi
#
@ -109,7 +114,7 @@ jobs:
inputs:
targetType: "inline"
script: |
Import-PSFConfig -Path settings.json -Schema MetaJson
Import-PSFConfig -Path settings.json -Schema MetaJson -EnableException
Initialize-AzOpsEnvironment
$diff = Get-Content -Path /tmp/diff.txt
$module = Get-Module -Name AzOps

Просмотреть файл

@ -83,11 +83,16 @@ jobs:
inputs:
targetType: "inline"
script: |
echo $(git diff --name-status HEAD^ HEAD)
git diff --name-status HEAD^ HEAD > /tmp/diff.txt
if [ ! -z "$(git diff --diff-filter=D HEAD^ HEAD)" ]; then
echo $(git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r)
git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r > /tmp/diffdeletedfiles.txt
if [ ! -z "$(git diff --name-status HEAD^ HEAD)" ]; then
echo $(git diff --name-status HEAD^ HEAD)
git diff --name-status HEAD^ HEAD > /tmp/diff.txt
if [ ! -z "$(git diff --diff-filter=D HEAD^ HEAD)" ]; then
echo $(git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r)
git diff --diff-filter=D HEAD^ HEAD --no-prefix | grep ^- | sed -r "s/^([^-+ ]*)[-+ ]/\\1/" | less -r > /tmp/diffdeletedfiles.txt
fi
else
echo "The validation pipeline failed because there is currently no change to be processed"
exit 1
fi
#
@ -99,7 +104,7 @@ jobs:
inputs:
targetType: "inline"
script: |
Import-PSFConfig -Path settings.json -Schema MetaJson
Import-PSFConfig -Path settings.json -Schema MetaJson -EnableException
Initialize-AzOpsEnvironment
$diff = Get-Content -Path /tmp/diff.txt
$module = Get-Module -Name AzOps