From bc6fe5fe03dcef31718d3db5989659b95a67f4e4 Mon Sep 17 00:00:00 2001 From: vincent Bourgmayer Date: Wed, 6 Nov 2024 11:03:15 +0100 Subject: [PATCH] feature: add test release support chore: remove openssh installation from update-from-upstream job as suggested by reviewer --- .gitlab-ci.yml | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 142a372f0..0e960206c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ variables: UNSIGNED_APK: "app-release-unsigned.apk" COMMUNITY_APK: "Notes_community.apk" OFFICIAL_APK: "Notes_official.apk" + TEST_APK: "Notes_test.apk" stages: - update-from-upstream @@ -39,7 +40,6 @@ build: CI_PROJECT_SSH_URL: git@gitlab.e.foundation:$CI_PROJECT_PATH GIT_STRATEGY: none before_script: - - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - echo "${SSH_E_ROBOT_PRIVATE_KEY}" | tr -d '\r' | ssh-add - - mkdir -p ~/.ssh @@ -108,17 +108,16 @@ generate-apks: dependencies: - init_submodules - build - before_script: - - apt update && apt install apksigner -y script: - | ./systemAppsUpdateInfo/scripts/generate-apks.sh \ - "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" + "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" "$TEST_APK" artifacts: paths: - $APK_PATH/$UNSIGNED_APK - $APK_PATH/$COMMUNITY_APK - $APK_PATH/$OFFICIAL_APK + - $APK_PATH/$TEST_APK create-json-files: stage: gitlab_release @@ -130,17 +129,33 @@ create-json-files: - generate-apks rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' - when: manual - before_script: - - apt update && apt install jq aapt -y + when: on_success script: - | ./systemAppsUpdateInfo/scripts/create-json-files.sh \ - "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" + "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" "$TEST_APK" artifacts: paths: - community.json - official.json + - test.json + +create-test-release: + stage: gitlab_release + dependencies: + - init_submodules + needs: + - init_submodules + - create-json-files + - generate-apks + rules: + - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' + when: manual + script: + - | + ./systemAppsUpdateInfo/scripts/create-test-release.sh \ + "$APK_PATH" "$TEST_APK" + allow_failure: true create-release: stage: gitlab_release @@ -152,10 +167,10 @@ create-release: - generate-apks rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' - when: on_success - before_script: - - apt update && apt install jq -y + when: manual script: - | ./systemAppsUpdateInfo/scripts/create-release.sh \ "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" + allow_failure: true + \ No newline at end of file -- GitLab