diff --git a/eng/common/pipelines/templates/steps/bypass-local-dns.yml b/eng/common/pipelines/templates/steps/bypass-local-dns.yml index 922f58a8286c..6e30c91fd258 100644 --- a/eng/common/pipelines/templates/steps/bypass-local-dns.yml +++ b/eng/common/pipelines/templates/steps/bypass-local-dns.yml @@ -6,6 +6,6 @@ steps: condition: | and( succeededOrFailed(), - contains(variables['OSVmImage'], 'ubuntu'), + or(contains(variables['OSVmImage'], 'ubuntu'),contains(variables['OSVmImage'], 'linux')), eq(variables['Container'], '') ) diff --git a/eng/common/pipelines/templates/steps/git-push-changes.yml b/eng/common/pipelines/templates/steps/git-push-changes.yml index a922b203a9b1..c8fbeaa9769c 100644 --- a/eng/common/pipelines/templates/steps/git-push-changes.yml +++ b/eng/common/pipelines/templates/steps/git-push-changes.yml @@ -10,25 +10,14 @@ parameters: SkipCheckingForChanges: false steps: -- pwsh: | - echo "git add -A" - git add -A - - echo "git diff --name-status --cached --exit-code" - git diff --name-status --cached --exit-code - - if ($LastExitCode -ne 0) { - echo "##vso[task.setvariable variable=HasChanges]$true" - echo "Changes detected so setting HasChanges=true" - } - else { - echo "##vso[task.setvariable variable=HasChanges]$false" - echo "No changes so skipping code push" - } +- task: PowerShell@2 displayName: Check for changes condition: and(succeeded(), eq(${{ parameters.SkipCheckingForChanges }}, false)) - workingDirectory: ${{ parameters.WorkingDirectory }} - ignoreLASTEXITCODE: true + inputs: + pwsh: true + workingDirectory: ${{ parameters.WorkingDirectory }} + filePath: ${{ parameters.ScriptDirectory }}/check-for-git-changes.ps1 + ignoreLASTEXITCODE: true - pwsh: | # Remove the repo owner from the front of the repo name if it exists there diff --git a/eng/common/scripts/check-for-git-changes.ps1 b/eng/common/scripts/check-for-git-changes.ps1 new file mode 100644 index 000000000000..2c1186ab0b3f --- /dev/null +++ b/eng/common/scripts/check-for-git-changes.ps1 @@ -0,0 +1,14 @@ +echo "git add -A" +git add -A + +echo "git diff --name-status --cached --exit-code" +git diff --name-status --cached --exit-code + +if ($LastExitCode -ne 0) { + echo "##vso[task.setvariable variable=HasChanges]$true" + echo "Changes detected so setting HasChanges=true" +} +else { + echo "##vso[task.setvariable variable=HasChanges]$false" + echo "No changes so skipping code push" +} diff --git a/eng/common/testproxy/publish-proxy-logs.yml b/eng/common/testproxy/publish-proxy-logs.yml index 543186edd353..4f4d3d7f548f 100644 --- a/eng/common/testproxy/publish-proxy-logs.yml +++ b/eng/common/testproxy/publish-proxy-logs.yml @@ -3,16 +3,17 @@ parameters: steps: - pwsh: | - Copy-Item -Path "${{ parameters.rootFolder }}/test-proxy.log" -Destination "${{ parameters.rootFolder }}/proxy.log" + New-Item -ItemType Directory -Force "${{ parameters.rootFolder }}/proxy-logs" + Copy-Item -Path "${{ parameters.rootFolder }}/test-proxy.log" -Destination "${{ parameters.rootFolder }}/proxy-logs/proxy.log" displayName: Copy Log File condition: succeededOrFailed() - template: ../pipelines/templates/steps/publish-artifact.yml parameters: ArtifactName: "$(System.StageName)-$(System.JobName)-$(System.JobAttempt)-proxy-logs" - ArtifactPath: "${{ parameters.rootFolder }}/proxy.log" + ArtifactPath: "${{ parameters.rootFolder }}/proxy-logs" - pwsh: | - Remove-Item -Force ${{ parameters.rootFolder }}/proxy.log + Remove-Item -Force ${{ parameters.rootFolder }}/proxy-logs/proxy.log displayName: Cleanup Copied Log File condition: succeededOrFailed()