Migrating CI/CD to Linode S3 (#2380)

* Test PVS linode S3
* Migrating to Linode S3
* Disable PVS action debug
* Fix pvs_studio.yml
This commit is contained in:
Max Andreev 2023-02-09 13:42:41 +03:00 committed by GitHub
parent 82c730b6be
commit 67c2d1cf61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 18 deletions

View File

@ -96,14 +96,14 @@ jobs:
- name: 'Upload map analyser files to storage' - name: 'Upload map analyser files to storage'
if: ${{ !github.event.pull_request.head.repo.fork }} if: ${{ !github.event.pull_request.head.repo.fork }}
uses: keithweaver/aws-s3-github-action@v1.0.0 uses: prewk/s3-cp-action@v2
with: with:
source: map_analyser_files/ aws_s3_endpoint: "${{ secrets.MAP_REPORT_AWS_ENDPOINT }}"
destination: "s3://${{ secrets.MAP_REPORT_AWS_BUCKET }}/${{steps.names.outputs.random_hash}}"
aws_access_key_id: "${{ secrets.MAP_REPORT_AWS_ACCESS_KEY }}" aws_access_key_id: "${{ secrets.MAP_REPORT_AWS_ACCESS_KEY }}"
aws_secret_access_key: "${{ secrets.MAP_REPORT_AWS_SECRET_KEY }}" aws_secret_access_key: "${{ secrets.MAP_REPORT_AWS_SECRET_KEY }}"
aws_region: "${{ secrets.MAP_REPORT_AWS_REGION }}" source: "./map_analyser_files/"
flags: --recursive dest: "s3://${{ secrets.MAP_REPORT_AWS_BUCKET }}/${{steps.names.outputs.random_hash}}"
flags: "--recursive --acl public-read"
- name: 'Trigger map file reporter' - name: 'Trigger map file reporter'
if: ${{ !github.event.pull_request.head.repo.fork }} if: ${{ !github.event.pull_request.head.repo.fork }}
@ -114,7 +114,6 @@ jobs:
event-type: map-file-analyse event-type: map-file-analyse
client-payload: '{"random_hash": "${{steps.names.outputs.random_hash}}", "event_type": "${{steps.names.outputs.event_type}}"}' client-payload: '{"random_hash": "${{steps.names.outputs.random_hash}}", "event_type": "${{steps.names.outputs.event_type}}"}'
- name: 'Upload artifacts to update server' - name: 'Upload artifacts to update server'
if: ${{ !github.event.pull_request.head.repo.fork }} if: ${{ !github.event.pull_request.head.repo.fork }}
run: | run: |

View File

@ -54,17 +54,16 @@ jobs:
./fbt COMPACT=1 PVSNOBROWSER=1 firmware_pvs || WARNINGS=1 ./fbt COMPACT=1 PVSNOBROWSER=1 firmware_pvs || WARNINGS=1
echo "warnings=${WARNINGS}" >> $GITHUB_OUTPUT echo "warnings=${WARNINGS}" >> $GITHUB_OUTPUT
- name: 'Upload artifacts to update server' - name: 'Upload report'
if: ${{ !github.event.pull_request.head.repo.fork && (steps.pvs-warn.outputs.warnings != 0) }} if: ${{ !github.event.pull_request.head.repo.fork && (steps.pvs-warn.outputs.warnings != 0) }}
run: | uses: prewk/s3-cp-action@v2
mkdir -p ~/.ssh with:
ssh-keyscan -p ${{ secrets.RSYNC_DEPLOY_PORT }} -H ${{ secrets.RSYNC_DEPLOY_HOST }} > ~/.ssh/known_hosts aws_s3_endpoint: "${{ secrets.PVS_AWS_ENDPOINT }}"
echo "${{ secrets.RSYNC_DEPLOY_KEY }}" > deploy_key; aws_access_key_id: "${{ secrets.PVS_AWS_ACCESS_KEY }}"
chmod 600 ./deploy_key; aws_secret_access_key: "${{ secrets.PVS_AWS_SECRET_KEY }}"
rsync -avrzP --mkpath \ source: "./build/f7-firmware-DC/pvsreport"
-e 'ssh -p ${{ secrets.RSYNC_DEPLOY_PORT }} -i ./deploy_key' \ dest: "s3://${{ secrets.PVS_AWS_BUCKET }}/${{steps.names.outputs.branch_name}}/${{steps.names.outputs.default_target}}-${{steps.names.outputs.suffix}}/"
build/f7-firmware-DC/pvsreport/ ${{ secrets.RSYNC_DEPLOY_USER }}@${{ secrets.RSYNC_DEPLOY_HOST }}:/home/data/firmware-pvs-studio-report/"${BRANCH_NAME}/${{steps.names.outputs.default_target}}-${{steps.names.outputs.suffix}}/"; flags: "--recursive --acl public-read"
rm ./deploy_key;
- name: 'Find Previous Comment' - name: 'Find Previous Comment'
if: ${{ !github.event.pull_request.head.repo.fork && github.event.pull_request && (steps.pvs-warn.outputs.warnings != 0) }} if: ${{ !github.event.pull_request.head.repo.fork && github.event.pull_request && (steps.pvs-warn.outputs.warnings != 0) }}
@ -83,7 +82,7 @@ jobs:
issue-number: ${{ github.event.pull_request.number }} issue-number: ${{ github.event.pull_request.number }}
body: | body: |
**PVS-Studio report for commit `${{steps.names.outputs.commit_sha}}`:** **PVS-Studio report for commit `${{steps.names.outputs.commit_sha}}`:**
- [Report](https://update.flipperzero.one/builds/firmware-pvs-studio-report/${{steps.names.outputs.branch_name}}/${{steps.names.outputs.default_target}}-${{steps.names.outputs.suffix}}/index.html) - [Report](https://pvs.flipp.dev/${{steps.names.outputs.branch_name}}/${{steps.names.outputs.default_target}}-${{steps.names.outputs.suffix}}/index.html)
edit-mode: replace edit-mode: replace
- name: 'Raise exception' - name: 'Raise exception'

View File

@ -17,7 +17,7 @@ def parse_args():
def checkCommitMessage(msg): def checkCommitMessage(msg):
regex = re.compile(r"^'?\[FL-\d+\]") regex = re.compile(r"^'?\[(FL-\d+,?\s?)+\]")
if regex.match(msg): if regex.match(msg):
return True return True
return False return False