Skip to content

Commit a48bd9f

Browse files
committed
- attempt at fixing failed idempotency uploads
Signed-off-by: Vincent Biret <[email protected]>
1 parent 675f389 commit a48bd9f

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

.github/workflows/integration-tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,16 @@ jobs:
197197
shell: pwsh
198198
run: ./it/compare-generation.ps1 -descriptionUrl ${{ matrix.description }} -language ${{ matrix.language }}
199199
continue-on-error: ${{ steps.check-suppressed.outputs.IS_SUPPRESSED == 'true' }}
200+
- id: replace_url
201+
if: always()
202+
run: |
203+
ORIGINAL="${{ matrix.description }}"
204+
REPLACED="${ORIGINAL//[-:<>|\*\?\\\/\.]/_}"
205+
echo "ARTKEY=$REPLACED" >> $GITHUB_OUTPUT
200206
- uses: actions/upload-artifact@v3
201-
if: failure()
207+
if: always()
202208
with:
203-
name: idempotency-artifacts
209+
name: idempotency-${{ matrix.language }}-${{ steps.replace_url.outputs.ARTKEY }}
204210
path: idempotency-folder*.zip
205211

206212
cleanup:

it/compare-generation.ps1

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,19 @@ if ($HashString1 -eq $HashString2) {
9797
}
9898
else {
9999
Write-Error "The content of the folders is NOT identical"
100+
$archivePath1 = Join-Path $rootPath -ChildPath "idempotency-folder1.zip"
101+
$archivePath2 = Join-Path $rootPath -ChildPath "idempotency-folder2.zip"
100102

101-
if (Test-Path "idempotency-folder1.zip") {
102-
Remove-Item "idempotency-folder1.zip" -Force
103+
if (Test-Path $archivePath1) {
104+
Remove-Item $archivePath1 -Force
103105
}
104-
if (Test-Path "idempotency-folder2.zip") {
105-
Remove-Item "idempotency-folder2.zip" -Force
106+
if (Test-Path $archivePath2) {
107+
Remove-Item $archivePath2 -Force
106108
}
107109

108110
if ($dev -eq $false) {
109-
Compress-Archive -Path $tmpFolder1 -DestinationPath "idempotency-folder1.zip"
110-
Compress-Archive -Path $tmpFolder1 -DestinationPath "idempotency-folder2.zip"
111+
Compress-Archive -Path $tmpFolder1 -DestinationPath $archivePath1
112+
Compress-Archive -Path $tmpFolder1 -DestinationPath $archivePath2
111113
Exit 1
112114
}
113115
}

0 commit comments

Comments
 (0)