Loading .gitlab-ci.yml +93 −0 Original line number Diff line number Diff line image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:master" variables: PROJECT_ID: "83" # under Settings -> General APK_PATH: "app/build/outputs/apk/ose/release" UNSIGNED_APK: "davx5-ose-release-unsigned.apk" DEV_APK: "Account-manager-dev.apk" STABLE_APK: "Account-manager-stable.apk" stages: - update-from-upstream - build - release before_script: - echo email.key=$PEPPER >> local.properties Loading @@ -27,10 +35,95 @@ build: stage: build script: - ./gradlew build -x test - cd app/build/outputs/apk/ose/ - | 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/ose/ init_submodules: stage: release 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 artifacts: paths: - systemAppsUpdateInfo/ generate-apks: stage: release rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: on_success needs: - init_submodules - build dependencies: - init_submodules - 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: stage: release dependencies: - init_submodules - generate-apks needs: - init_submodules - 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 create-release: stage: release dependencies: - init_submodules needs: - init_submodules - create-json-files - generate-apks rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: on_success before_script: - apt update && apt install jq -y script: - | ./systemAppsUpdateInfo/scripts/create-release.sh \ "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK" .update-from-upstream: stage: update-from-upstream rules: Loading build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ buildscript { commonsText: '1.10.0', // own libraries cert4android: '2bb3898', dav4jvm: '1ed89c1', dav4jvm: '1ed89c165d', ical4android: '1.1.2', vcard4android: '1.1.2' ] Loading Loading
.gitlab-ci.yml +93 −0 Original line number Diff line number Diff line image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:master" variables: PROJECT_ID: "83" # under Settings -> General APK_PATH: "app/build/outputs/apk/ose/release" UNSIGNED_APK: "davx5-ose-release-unsigned.apk" DEV_APK: "Account-manager-dev.apk" STABLE_APK: "Account-manager-stable.apk" stages: - update-from-upstream - build - release before_script: - echo email.key=$PEPPER >> local.properties Loading @@ -27,10 +35,95 @@ build: stage: build script: - ./gradlew build -x test - cd app/build/outputs/apk/ose/ - | 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/ose/ init_submodules: stage: release 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 artifacts: paths: - systemAppsUpdateInfo/ generate-apks: stage: release rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: on_success needs: - init_submodules - build dependencies: - init_submodules - 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: stage: release dependencies: - init_submodules - generate-apks needs: - init_submodules - 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 create-release: stage: release dependencies: - init_submodules needs: - init_submodules - create-json-files - generate-apks rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' when: on_success before_script: - apt update && apt install jq -y script: - | ./systemAppsUpdateInfo/scripts/create-release.sh \ "$APK_PATH" "$UNSIGNED_APK" "$DEV_APK" "$STABLE_APK" .update-from-upstream: stage: update-from-upstream rules: Loading
build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ buildscript { commonsText: '1.10.0', // own libraries cert4android: '2bb3898', dav4jvm: '1ed89c1', dav4jvm: '1ed89c165d', ical4android: '1.1.2', vcard4android: '1.1.2' ] Loading