mirror of
				https://github.com/Telecominfraproject/wlan-testing.git
				synced 2025-10-31 02:48:11 +00:00 
			
		
		
		
	upload allure reports to S3 (#280)
This commit is contained in:
		
							
								
								
									
										56
									
								
								.github/actions/allure-report-to-s3/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								.github/actions/allure-report-to-s3/action.yml
									
									
									
									
										vendored
									
									
										Normal 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 | ||||||
							
								
								
									
										10
									
								
								.github/workflows/interop.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/interop.yml
									
									
									
									
										vendored
									
									
								
							| @@ -297,6 +297,16 @@ jobs: | |||||||
|         branch: gh-pages |         branch: gh-pages | ||||||
|         directory: reports |         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: |   cleanup: | ||||||
|     needs: [ test ] |     needs: [ test ] | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|   | |||||||
							
								
								
									
										11
									
								
								.github/workflows/performance.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/performance.yml
									
									
									
									
										vendored
									
									
								
							| @@ -291,6 +291,7 @@ jobs: | |||||||
|         git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" |         git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||||||
|         git add . |         git add . | ||||||
|         git commit -m "Automated deployment: $(date -u)" |         git commit -m "Automated deployment: $(date -u)" | ||||||
|  |  | ||||||
|     - name: push |     - name: push | ||||||
|       if: github.ref == 'refs/heads/master' |       if: github.ref == 'refs/heads/master' | ||||||
|       uses: ad-m/github-push-action@v0.6.0 |       uses: ad-m/github-push-action@v0.6.0 | ||||||
| @@ -299,6 +300,16 @@ jobs: | |||||||
|         branch: gh-pages |         branch: gh-pages | ||||||
|         directory: reports |         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: |   cleanup: | ||||||
|     needs: [ test ] |     needs: [ test ] | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|   | |||||||
							
								
								
									
										11
									
								
								.github/workflows/quali.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/quali.yml
									
									
									
									
										vendored
									
									
								
							| @@ -645,6 +645,7 @@ jobs: | |||||||
|         git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" |         git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||||||
|         git add . |         git add . | ||||||
|         git commit -m "Automated deployment: $(date -u)" |         git commit -m "Automated deployment: $(date -u)" | ||||||
|  |  | ||||||
|     - name: push |     - name: push | ||||||
|       if: github.ref == 'refs/heads/master' |       if: github.ref == 'refs/heads/master' | ||||||
|       uses: ad-m/github-push-action@v0.6.0 |       uses: ad-m/github-push-action@v0.6.0 | ||||||
| @@ -653,6 +654,16 @@ jobs: | |||||||
|         branch: gh-pages |         branch: gh-pages | ||||||
|         directory: reports |         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: |   cleanup: | ||||||
|     needs: [ test ] |     needs: [ test ] | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max
					Max