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

View File

@ -54,17 +54,16 @@ jobs:
./fbt COMPACT=1 PVSNOBROWSER=1 firmware_pvs || WARNINGS=1
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) }}
run: |
mkdir -p ~/.ssh
ssh-keyscan -p ${{ secrets.RSYNC_DEPLOY_PORT }} -H ${{ secrets.RSYNC_DEPLOY_HOST }} > ~/.ssh/known_hosts
echo "${{ secrets.RSYNC_DEPLOY_KEY }}" > deploy_key;
chmod 600 ./deploy_key;
rsync -avrzP --mkpath \
-e 'ssh -p ${{ secrets.RSYNC_DEPLOY_PORT }} -i ./deploy_key' \
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}}/";
rm ./deploy_key;
uses: prewk/s3-cp-action@v2
with:
aws_s3_endpoint: "${{ secrets.PVS_AWS_ENDPOINT }}"
aws_access_key_id: "${{ secrets.PVS_AWS_ACCESS_KEY }}"
aws_secret_access_key: "${{ secrets.PVS_AWS_SECRET_KEY }}"
source: "./build/f7-firmware-DC/pvsreport"
dest: "s3://${{ secrets.PVS_AWS_BUCKET }}/${{steps.names.outputs.branch_name}}/${{steps.names.outputs.default_target}}-${{steps.names.outputs.suffix}}/"
flags: "--recursive --acl public-read"
- name: 'Find Previous Comment'
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 }}
body: |
**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
- name: 'Raise exception'

View File

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