Skip to content

Commit

Permalink
feat(ci): record dump uploads (#1101)
Browse files Browse the repository at this point in the history
* feat(ci): record dump uploads
  • Loading branch information
Arqu authored Jun 13, 2023
1 parent 9b981c4 commit e289465
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,13 @@ jobs:
cd chuck/netsim
aws_fname=intg_${{ env.LAST_COMMIT_SHA }}.tar.gz
tar cvzf report.tar.gz report_prom.txt report_metro.txt report_metro_integration.txt logs/ report/ viz/
aws s3 cp ./report.tar.gz s3://${{secrets.S3_REPORT_BUCKET}}/intg_${{ env.LAST_COMMIT_SHA }}.tar.gz --no-progress
aws s3 cp ./report.tar.gz s3://${{secrets.S3_REPORT_BUCKET}}/$aws_fname --no-progress
link_data='dump{fname="'$aws_fname'",commit="'${{ env.LAST_COMMIT_SHA }}'",branch="'${{ env.HEAD_REF }}'"} 1.0'
link_data=$(printf "%s\n " "$link_data")
curl -X POST -H "Content-Type: text/plain" --data "$link_data" ${{secrets.PROM_ENDPOINT}}/metrics/job/netsim/instance/${instance}
- name: Echo metrics
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/netsim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,18 @@ jobs:
cd chuck/netsim
aws_fname=${{ env.LAST_COMMIT_SHA }}.tar.gz
tar cvzf report.tar.gz report_prom.txt report.txt report_metro.txt report_metro_integration.txt logs/ report/ viz/
aws s3 cp ./report.tar.gz s3://${{secrets.S3_REPORT_BUCKET}}/${{ env.LAST_COMMIT_SHA }}.tar.gz --no-progress
aws s3 cp ./report.tar.gz s3://${{secrets.S3_REPORT_BUCKET}}/$aws_fname --no-progress
instance=$(echo "${{ env.HEAD_REF }}" | tr -c '[:alnum:]' '_')
d=$(cat report_prom.txt)
prom_data=$(printf "%s\n " "$d")
curl -X POST -H "Content-Type: text/plain" --data "$prom_data" ${{secrets.PROM_ENDPOINT}}/metrics/job/netsim/instance/${instance}
link_data='dump{fname="'$aws_fname'",commit="'${{ env.LAST_COMMIT_SHA }}'",branch="'${{ env.HEAD_REF }}'"} 1.0'
link_data=$(printf "%s\n " "$link_data")
curl -X POST -H "Content-Type: text/plain" --data "$link_data" ${{secrets.PROM_ENDPOINT}}/metrics/job/netsim/instance/${instance}
- name: Post metrics
if: github.ref_name=='main' && github.event_name != 'issue_comment'
Expand Down

0 comments on commit e289465

Please sign in to comment.