chore(nimbus): Fix fenix integration tests to not use circleci cache. (#10934)

Because

- Using the circleci cache on forks in our fenix integration tests
doesn't work due to our security policy

This commit

- Fixes that by storing the APKs in a small docker image.

Fixes #10933
This commit is contained in:
Benjamin Forehand Jr 2024-07-03 13:26:43 -05:00 коммит произвёл GitHub
Родитель e9c6399374
Коммит 77b403096e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 17 добавлений и 12 удалений

Просмотреть файл

@ -403,9 +403,6 @@ jobs:
environment:
PYTEST_ARGS: --reruns 1
steps:
- restore_cache:
keys:
- experimenter-firefox-fenix-apks
- checkout
- android/accept-licenses
- android/create-avd:
@ -418,8 +415,10 @@ jobs:
- run:
name: Install APKs
command: |
adb install /home/circleci/experimenter/experimenter/tests/integration/nimbus/android/app-fenix-x86_64-debug.apk
adb install /home/circleci/experimenter/experimenter/tests/integration/nimbus/android/app-fenix-debug-androidTest.apk
docker run -d --name fenix-files ${DOCKERHUB_REPO}:fenix-apk-store
docker cp fenix-files:/usr/src/app/files /home/circleci/project
adb install /home/circleci/project/files/app-fenix-x86_64-debug.apk
adb install /home/circleci/project/files/app-fenix-debug-androidTest.apk
- run:
name: Download test files and run
command: |
@ -675,17 +674,14 @@ jobs:
command: |
cd experimenter/tests/integration/nimbus/android
docker run --name fenix-builder ${DOCKERHUB_REPO}:experimenter-moz-central bash build_android.sh
docker cp fenix-builder:mozilla-central/mobile/android/fenix/app-fenix-debug-androidTest.apk ./
docker cp fenix-builder:mozilla-central/mobile/android/fenix/app-fenix-x86_64-debug.apk ./
docker commit fenix-builder moz-central-builder
docker tag moz-central-builder ${DOCKERHUB_REPO}:experimenter-moz-central
docker push ${DOCKERHUB_REPO}:experimenter-moz-central
docker cp fenix-builder:mozilla-central/mobile/android/fenix/app-fenix-debug-androidTest.apk ./
docker cp fenix-builder:mozilla-central/mobile/android/fenix/app-fenix-x86_64-debug.apk ./
docker build -f fenix-apk-store.Dockerfile -t ${DOCKERHUB_REPO}:fenix-apk-store .
docker push ${DOCKERHUB_REPO}:fenix-apk-store
no_output_timeout: 1h
- save_cache:
key: experimenter-firefox-fenix-apks-{{ checksum "experimenter/tests/integration/nimbus/android/app-fenix-x86_64-debug.apk" }}
paths:
- experimenter/tests/integration/nimbus/android/app-fenix-debug-androidTest.apk
- experimenter/tests/integration/nimbus/android/app-fenix-x86_64-debug.apk
workflows:
build_firefox:

Просмотреть файл

@ -4,6 +4,7 @@ set -euo pipefail
hg pull && hg update
./mach clobber
./mach build
cd mobile/android/fenix
./gradlew clean app:assembleFenixDebug

Просмотреть файл

@ -0,0 +1,8 @@
FROM alpine:latest
WORKDIR /usr/src/app
RUN mkdir -p /usr/src/app/files
COPY app-fenix-debug-androidTest.apk /usr/src/app/files/
COPY app-fenix-x86_64-debug.apk /usr/src/app/files/