upload allure reports to S3 (#280)

This commit is contained in:
Max
2021-11-12 16:18:56 +01:00
committed by GitHub
parent a62714ad67
commit ce76cc817a
4 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
name: upload report to S3
description: upload an Allure report to AWS S3 and update the latest reference
inputs:
test_type:
description: test type of the report
required: true
testbed:
description: testbed the report is about
required: true
report_path:
description: path to the Allure report folder
required: true
s3_access_key_id:
description: AWS access key ID to access S3 bucket
required: true
s3_access_key_secret:
description: AWS access key secret to access S3 bucket
required: true
runs:
using: "composite"
steps:
- name: install AWS cli
uses: unfor19/install-aws-cli-action@v1
- name: upload report to AWS S3
env:
AWS_S3_BUCKET_NAME: openwifi-allure-reports
AWS_ACCOUNT_ID: "289708231103"
AWS_ACCESS_KEY_ID: ${{ inputs.s3_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ inputs.s3_access_key_secret }}
AWS_DEFAULT_REGION: us-east-1
AWS_DEFAULT_OUTPUT: json
shell: bash
run: aws s3 cp --acl public-read --recursive ${{ inputs.report_path }} s3://${AWS_S3_BUCKET_NAME}/${{ inputs.test_type }}/${{ inputs.testbed }}/${{ github.run_number }}
- name: update reference to latest report
env:
AWS_S3_BUCKET_NAME: openwifi-allure-reports
AWS_ACCOUNT_ID: "289708231103"
AWS_ACCESS_KEY_ID: ${{ inputs.s3_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ inputs.s3_access_key_secret }}
AWS_DEFAULT_REGION: us-east-1
AWS_DEFAULT_OUTPUT: json
shell: bash
run: |
cat <<EOF > index.html
<html>
<head>
<meta http-equiv="refresh" content="0; url=../${{ github.run_number }}/" />
</head>
</html>
EOF
aws s3 cp --acl public-read index.html s3://${AWS_S3_BUCKET_NAME}/${{ inputs.test_type }}/${{ inputs.testbed }}/latest/index.html

View File

@@ -297,6 +297,16 @@ jobs:
branch: gh-pages
directory: reports
- name: upload to S3
if: github.ref == 'refs/heads/master' && needs.test.outputs.additional_markers == ''
uses: ./wlan-testing/.github/actions/allure-report-to-s3
with:
test_type: interop
testbed: interop
report_path: allure-report
s3_access_key_id: ${{ secrets.ALLURE_S3_ACCESS_KEY_ID }}
s3_access_key_secret: ${{ secrets.ALLURE_S3_ACCESS_KEY_SECRET }}
cleanup:
needs: [ test ]
runs-on: ubuntu-latest

View File

@@ -291,6 +291,7 @@ jobs:
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Automated deployment: $(date -u)"
- name: push
if: github.ref == 'refs/heads/master'
uses: ad-m/github-push-action@v0.6.0
@@ -299,6 +300,16 @@ jobs:
branch: gh-pages
directory: reports
- name: upload to S3
if: github.ref == 'refs/heads/master'
uses: ./wlan-testing/.github/actions/allure-report-to-s3
with:
test_type: performance
testbed: ${{ needs.test.outputs.testbed }}
report_path: allure-report
s3_access_key_id: ${{ secrets.ALLURE_S3_ACCESS_KEY_ID }}
s3_access_key_secret: ${{ secrets.ALLURE_S3_ACCESS_KEY_SECRET }}
cleanup:
needs: [ test ]
runs-on: ubuntu-latest

View File

@@ -645,6 +645,7 @@ jobs:
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Automated deployment: $(date -u)"
- name: push
if: github.ref == 'refs/heads/master'
uses: ad-m/github-push-action@v0.6.0
@@ -653,6 +654,16 @@ jobs:
branch: gh-pages
directory: reports
- name: upload to S3
if: github.ref == 'refs/heads/master'
uses: ./wlan-testing/.github/actions/allure-report-to-s3
with:
test_type: sanity
testbed: ${{ matrix.ap_model }}
report_path: allure-report
s3_access_key_id: ${{ secrets.ALLURE_S3_ACCESS_KEY_ID }}
s3_access_key_secret: ${{ secrets.ALLURE_S3_ACCESS_KEY_SECRET }}
cleanup:
needs: [ test ]
runs-on: ubuntu-latest