Revert "devops: zip blob report artifact before uploading (#23667)" (#23687)

This reverts commit a1cdae6bffcea5fd16c5bc56633e0949bfcc6315.

The problem with this approach is that each job overwrites the zip
artifact whereas previously it was merging all reports in the same
directory. We are going to zip .jsonl files instead.
This commit is contained in:
Yury Semikhatsky 2023-06-13 12:36:04 -07:00 committed by GitHub
parent c80a23842b
commit 51b8f609fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 26 deletions

View File

@ -1,5 +1,5 @@
name: 'Download artifact' name: 'Download blob report'
description: 'Download artifact from GitHub' description: 'Download blob report from GitHub artifacts'
inputs: inputs:
name: name:
description: 'Name of the artifact to download' description: 'Name of the artifact to download'
@ -10,11 +10,11 @@ inputs:
description: 'Directory with downloaded artifacts' description: 'Directory with downloaded artifacts'
required: true required: true
type: string type: string
default: '.' default: 'blob-report'
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Download artifact - name: Download blob report
uses: actions/github-script@v6 uses: actions/github-script@v6
with: with:
script: | script: |
@ -35,6 +35,6 @@ runs:
console.log('download result', result); console.log('download result', result);
const fs = require('fs'); const fs = require('fs');
fs.writeFileSync(`${name}.zip`, Buffer.from(result.data)); fs.writeFileSync(`${name}.zip`, Buffer.from(result.data));
- name: Unzip artifact - name: Unzip blob report
shell: bash shell: bash
run: unzip ${{ inputs.name }}.zip -d ${{ inputs.path }} run: unzip ${{ inputs.name }}.zip -d ${{ inputs.path }}

View File

@ -64,18 +64,12 @@ jobs:
- name: Upload blob report to Azure - name: Upload blob report to Azure
if: always() && github.event_name == 'push' if: always() && github.event_name == 'push'
run: az storage blob upload-batch -s test-results/blob-report -d '$web/run-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}" run: az storage blob upload-batch -s test-results/blob-report -d '$web/run-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
- name: Zip blob report
if: always() && github.event_name == 'pull_request'
shell: bash
run: |
cd test-results
zip -r ${{ github.workspace }}/blob-report.zip blob-report
- name: Upload blob report to GitHub - name: Upload blob report to GitHub
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: always() && github.event_name == 'pull_request' if: always() && github.event_name == 'pull_request'
with: with:
name: blob-report-${{ github.run_attempt }} name: blob-report-${{ github.run_attempt }}
path: blob-report.zip path: test-results/blob-report
retention-days: 30 retention-days: 30
- name: Write the pull request number in an file - name: Write the pull request number in an file
if: always() && github.event_name == 'pull_request' if: always() && github.event_name == 'pull_request'
@ -160,18 +154,12 @@ jobs:
- name: Upload blob report to Azure - name: Upload blob report to Azure
if: always() && github.event_name == 'push' if: always() && github.event_name == 'push'
run: az storage blob upload-batch -s test-results/blob-report -d '$web/run-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}" run: az storage blob upload-batch -s test-results/blob-report -d '$web/run-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
- name: Zip blob report
if: always() && github.event_name == 'pull_request'
shell: bash
run: |
cd test-results
zip -r ${{ github.workspace }}/blob-report.zip blob-report
- name: Upload blob report to GitHub - name: Upload blob report to GitHub
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: always() && github.event_name == 'pull_request' if: always() && github.event_name == 'pull_request'
with: with:
name: blob-report-${{ github.run_attempt }} name: blob-report-${{ github.run_attempt }}
path: blob-report.zip path: test-results/blob-report
retention-days: 30 retention-days: 30
- name: Write the pull request number in an file - name: Write the pull request number in an file
if: always() && github.event_name == 'pull_request' if: always() && github.event_name == 'pull_request'

View File

@ -211,18 +211,12 @@ jobs:
- name: Upload blob report to Azure - name: Upload blob report to Azure
if: always() && github.event_name == 'push' if: always() && github.event_name == 'push'
run: az storage blob upload-batch -s test-results/blob-report -d '$web/run-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}" run: az storage blob upload-batch -s test-results/blob-report -d '$web/run-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}' --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
- name: Zip blob report
if: always() && github.event_name == 'pull_request'
shell: bash
run: |
cd test-results
zip -r ${{ github.workspace }}/blob-report.zip blob-report
- name: Upload blob report to GitHub - name: Upload blob report to GitHub
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
if: always() && github.event_name == 'pull_request' if: always() && github.event_name == 'pull_request'
with: with:
name: blob-report-${{ github.run_attempt }} name: blob-report-${{ github.run_attempt }}
path: blob-report.zip path: test-results/blob-report
retention-days: 30 retention-days: 30
- name: Write the pull request number in an file - name: Write the pull request number in an file
if: always() && github.event_name == 'pull_request' if: always() && github.event_name == 'pull_request'