Loading .gitlab-ci.yml +20 −41 Original line number Diff line number Diff line Loading @@ -3,9 +3,9 @@ image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest" variables: SENTRY_DSN: "${SENTRY_DSN}" APK_PATH: "app/build/outputs/apk/release" UNSIGNED_APK: "eDrive-*-release-unsigned.apk" # TODO: check if usage of * is working then update or remove this comment DEV_APK: "eDrive-dev.apk" STABLE_APK: "eDrive-stable.apk" UNSIGNED_APK: "eDrive-release-unsigned.apk" # TODO: check if usage of * is working then update or remove this comment DEV_APK: "eDrive-community.apk" STABLE_APK: "eDrive-official.apk" stages: - build Loading Loading @@ -39,6 +39,15 @@ build: stage: build script: - ./gradlew assemble - cd app/build/outputs/apk/ - | if [[ ! -d "release" ]]; then echo "$APK_PATH does not exist." exit 1 fi cd "release" unsigned_build=$(ls *.apk | grep "unsigned") cp $unsigned_build $UNSIGNED_APK artifacts: paths: - app/build/outputs/apk/ Loading Loading @@ -68,42 +77,12 @@ test: # | ---------------------------------------- | # | eDrive as a dependency on AccountManager | # |==========================================| generate-apks: stage: release # - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' # when: on_success needs: - build dependencies: - build before_script: - apt update && apt install apksigner -y script: - | ./systemAppsUpdateInfo/scripts/generate-apks.sh \ "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK" artifacts: paths: - $APK_PATH/$UNSIGNED_APK - $APK_PATH/$DEV_APK - $APK_PATH/$STABLE_APK create-json-files: include: - component: $CI_SERVER_FQDN/vincent/paperboy-ci/sign-apks@1.0.5-beta inputs: stage: release dependencies: - generate-apks needs: - generate-apks rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: manual before_script: - apt update && apt install jq aapt -y script: - | ./systemAppsUpdateInfo/scripts/create-json-files.sh \ "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK" artifacts: paths: - dev.json - stable.json No newline at end of file unsignedApk: "eDrive-*-release-unsigned.apk" apk_dir_path: "app/build/outputs/apk/release" official_apk: "eDrive-community.apk" community_apk: "eDrive-official.apk" No newline at end of file Loading
.gitlab-ci.yml +20 −41 Original line number Diff line number Diff line Loading @@ -3,9 +3,9 @@ image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest" variables: SENTRY_DSN: "${SENTRY_DSN}" APK_PATH: "app/build/outputs/apk/release" UNSIGNED_APK: "eDrive-*-release-unsigned.apk" # TODO: check if usage of * is working then update or remove this comment DEV_APK: "eDrive-dev.apk" STABLE_APK: "eDrive-stable.apk" UNSIGNED_APK: "eDrive-release-unsigned.apk" # TODO: check if usage of * is working then update or remove this comment DEV_APK: "eDrive-community.apk" STABLE_APK: "eDrive-official.apk" stages: - build Loading Loading @@ -39,6 +39,15 @@ build: stage: build script: - ./gradlew assemble - cd app/build/outputs/apk/ - | if [[ ! -d "release" ]]; then echo "$APK_PATH does not exist." exit 1 fi cd "release" unsigned_build=$(ls *.apk | grep "unsigned") cp $unsigned_build $UNSIGNED_APK artifacts: paths: - app/build/outputs/apk/ Loading Loading @@ -68,42 +77,12 @@ test: # | ---------------------------------------- | # | eDrive as a dependency on AccountManager | # |==========================================| generate-apks: stage: release # - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' # when: on_success needs: - build dependencies: - build before_script: - apt update && apt install apksigner -y script: - | ./systemAppsUpdateInfo/scripts/generate-apks.sh \ "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK" artifacts: paths: - $APK_PATH/$UNSIGNED_APK - $APK_PATH/$DEV_APK - $APK_PATH/$STABLE_APK create-json-files: include: - component: $CI_SERVER_FQDN/vincent/paperboy-ci/sign-apks@1.0.5-beta inputs: stage: release dependencies: - generate-apks needs: - generate-apks rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: manual before_script: - apt update && apt install jq aapt -y script: - | ./systemAppsUpdateInfo/scripts/create-json-files.sh \ "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK" artifacts: paths: - dev.json - stable.json No newline at end of file unsignedApk: "eDrive-*-release-unsigned.apk" apk_dir_path: "app/build/outputs/apk/release" official_apk: "eDrive-community.apk" community_apk: "eDrive-official.apk" No newline at end of file