Loading .gitlab-ci.yml +35 −17 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 COMMUNITY_APK: "eDrive-community.apk" OFFICIAL_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 @@ -71,13 +80,11 @@ test: init_submodules: stage: release # rules: # - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' # when: on_success rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: on_success script: - | git submodule add --force \ https://gitlab.e.foundation/e/os/system-apps-update-info.git systemAppsUpdateInfo - git clone https://gitlab.e.foundation/e/os/system-apps-update-info.git systemAppsUpdateInfo artifacts: paths: - systemAppsUpdateInfo/ Loading @@ -85,8 +92,9 @@ init_submodules: generate-apks: stage: release # - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' # when: on_success rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: on_success needs: - init_submodules - build Loading @@ -96,14 +104,24 @@ generate-apks: before_script: - apt update && apt install apksigner -y script: - | if [[ -z $KEYSTORE ]]; then echo "KEYSTORE not set" exit 1 fi - | if [[ -z $KEYSTORE_PASSWORD ]]; then echo "KEYSTORE_PASSWORD not set" exit 1 fi - | ./systemAppsUpdateInfo/scripts/generate-apks.sh \ "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK" "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" artifacts: paths: - $APK_PATH/$UNSIGNED_APK - $APK_PATH/$DEV_APK - $APK_PATH/$STABLE_APK - $APK_PATH/$COMMUNITY_APK - $APK_PATH/$OFFICIAL_APK create-json-files: stage: release Loading @@ -119,8 +137,8 @@ create-json-files: script: - | ./systemAppsUpdateInfo/scripts/create-json-files.sh \ "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK" "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" artifacts: paths: - dev.json - stable.json No newline at end of file - community.json - official.json No newline at end of file Loading
.gitlab-ci.yml +35 −17 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 COMMUNITY_APK: "eDrive-community.apk" OFFICIAL_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 @@ -71,13 +80,11 @@ test: init_submodules: stage: release # rules: # - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' # when: on_success rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: on_success script: - | git submodule add --force \ https://gitlab.e.foundation/e/os/system-apps-update-info.git systemAppsUpdateInfo - git clone https://gitlab.e.foundation/e/os/system-apps-update-info.git systemAppsUpdateInfo artifacts: paths: - systemAppsUpdateInfo/ Loading @@ -85,8 +92,9 @@ init_submodules: generate-apks: stage: release # - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' # when: on_success rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: on_success needs: - init_submodules - build Loading @@ -96,14 +104,24 @@ generate-apks: before_script: - apt update && apt install apksigner -y script: - | if [[ -z $KEYSTORE ]]; then echo "KEYSTORE not set" exit 1 fi - | if [[ -z $KEYSTORE_PASSWORD ]]; then echo "KEYSTORE_PASSWORD not set" exit 1 fi - | ./systemAppsUpdateInfo/scripts/generate-apks.sh \ "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK" "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" artifacts: paths: - $APK_PATH/$UNSIGNED_APK - $APK_PATH/$DEV_APK - $APK_PATH/$STABLE_APK - $APK_PATH/$COMMUNITY_APK - $APK_PATH/$OFFICIAL_APK create-json-files: stage: release Loading @@ -119,8 +137,8 @@ create-json-files: script: - | ./systemAppsUpdateInfo/scripts/create-json-files.sh \ "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK" "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" artifacts: paths: - dev.json - stable.json No newline at end of file - community.json - official.json No newline at end of file