diff --git a/.github/actions/allure-report-to-s3/action.yml b/.github/actions/allure-report-to-s3/action.yml new file mode 100644 index 000000000..53cf9b78f --- /dev/null +++ b/.github/actions/allure-report-to-s3/action.yml @@ -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 < index.html + + + + + + EOF + + aws s3 cp --acl public-read index.html s3://${AWS_S3_BUCKET_NAME}/${{ inputs.test_type }}/${{ inputs.testbed }}/latest/index.html diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index d47a5d050..2f899defd 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -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 diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index d347391e5..dd00705f8 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -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 diff --git a/.github/workflows/quali.yml b/.github/workflows/quali.yml index 26b281b7a..8315ff510 100644 --- a/.github/workflows/quali.yml +++ b/.github/workflows/quali.yml @@ -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