1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-24 07:18:09 +00:00

ci: fix emulators deploy

This commit is contained in:
vdovhanych 2022-05-26 15:06:09 +02:00 committed by Martin Milata
parent 810b34f579
commit 056d4c7c77
2 changed files with 8 additions and 7 deletions

View File

@ -186,7 +186,7 @@ release core unix debug deploy:
script: script:
- export VERSION=$(./tools/version.sh core/embed/firmware/version.h) - export VERSION=$(./tools/version.sh core/embed/firmware/version.h)
- DEST="$DEPLOY_PATH/trezor-emu-core-v$VERSION" - DEST="$DEPLOY_PATH/trezor-emu-core-v$VERSION"
- DEST_ARM="$DEPLOY_PATH/trezor-emu-core-arm-v$VERSION" - DEST_ARM="$DEPLOY_PATH/arm/trezor-emu-core-v$VERSION-arm"
- echo "Deploying to $DEST and $DEST_ARM" - echo "Deploying to $DEST and $DEST_ARM"
- nix-shell -p patchelf --run "patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 core/build/unix/trezor-emu-core" - nix-shell -p patchelf --run "patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 core/build/unix/trezor-emu-core"
- nix-shell -p patchelf --run "patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 core/build/unix/trezor-emu-core-arm" - nix-shell -p patchelf --run "patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 core/build/unix/trezor-emu-core-arm"
@ -211,7 +211,7 @@ release legacy unix debug deploy:
script: script:
- export VERSION=$(./tools/version.sh legacy/firmware/version.h) - export VERSION=$(./tools/version.sh legacy/firmware/version.h)
- DEST="$DEPLOY_PATH/trezor-emu-legacy-v$VERSION" - DEST="$DEPLOY_PATH/trezor-emu-legacy-v$VERSION"
- DEST_ARM="$DEPLOY_PATH/trezor-emu-legacy-arm-v$VERSION" - DEST_ARM="$DEPLOY_PATH/arm/trezor-emu-legacy-v$VERSION-arm"
- echo "Deploying to $DEST and $DEST_ARM" - echo "Deploying to $DEST and $DEST_ARM"
- nix-shell -p patchelf --run "patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 legacy/firmware/trezor.elf" - nix-shell -p patchelf --run "patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 legacy/firmware/trezor.elf"
- nix-shell -p patchelf --run "patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 legacy/firmware/trezor-arm.elf" - nix-shell -p patchelf --run "patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 legacy/firmware/trezor-arm.elf"
@ -251,7 +251,7 @@ ui tests fixtures deploy:
sync emulators to aws: sync emulators to aws:
stage: deploy stage: deploy
variables: variables:
DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators" DEPLOY_PATH: "${DEPLOY_BASE_DIR}/releases/emulators/"
BUCKET: "data.trezor.io" BUCKET: "data.trezor.io"
GIT_SUBMODULE_STRATEGY: "none" GIT_SUBMODULE_STRATEGY: "none"
before_script: [] # no poetry before_script: [] # no poetry
@ -260,11 +260,12 @@ sync emulators to aws:
- release core unix debug deploy - release core unix debug deploy
script: script:
- source ${AWS_DEPLOY_DATA} - source ${AWS_DEPLOY_DATA}
- aws s3 --sync $DEPLOY_PATH s3://$BUCKET/dev/firmware/releases/emulators - aws s3 sync $DEPLOY_PATH s3://$BUCKET/dev/firmware/releases/emulators/
# This "hack" is needed because aws does not have an easy option to generate autoindex. We fetch the one autogenerated by nginx on local server. # This "hack" is needed because aws does not have an easy option to generate autoindex. We fetch the one autogenerated by nginx on local server.
- wget https://firmware.corp.sldev.cz/releases/emulators/ -O index.html && aws s3 cp index.html s3://$BUCKET/dev/firmware/releases/emulators/ - wget https://firmware.corp.sldev.cz/releases/emulators/ -O index.html && aws s3 cp index.html s3://$BUCKET/dev/firmware/releases/emulators/
only: - wget https://firmware.corp.sldev.cz/releases/emulators/arm/ -O index.html && aws s3 cp index.html s3://$BUCKET/dev/firmware/releases/emulators/arm/
- /^core\// # invalidate cloudfront cache for dev/ directory.
- aws cloudfront create-invalidation --distribution-id E1ERY5K2OTKKI1 --paths '/dev/*'
except: except:
- branches # run for tags only - branches # run for tags only
tags: tags:

View File

@ -296,6 +296,6 @@ Consists of **13 jobs** below:
### [sync emulators to aws](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L251) ### [sync emulators to aws](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L251)
### [common sync](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L275) ### [common sync](https://github.com/trezor/trezor-firmware/blob/master/ci/deploy.yml#L276)
--- ---