Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync eng/common directory with azure-sdk-tools for PR 7892 #28944

Merged
merged 2 commits into from
Mar 15, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ steps:
condition: |
and(
succeededOrFailed(),
contains(variables['OSVmImage'], 'ubuntu'),
or(contains(variables['OSVmImage'], 'ubuntu'),contains(variables['OSVmImage'], 'linux')),
eq(variables['Container'], '')
)
23 changes: 6 additions & 17 deletions eng/common/pipelines/templates/steps/git-push-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions eng/common/scripts/check-for-git-changes.ps1
Original file line number Diff line number Diff line change
@@ -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"
}
7 changes: 4 additions & 3 deletions eng/common/testproxy/publish-proxy-logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()