Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9902c05 authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Add cache to debug job and also add allow failure on manual job so that mr can be merged

parent 3ecde3d5
Loading
Loading
Loading
Loading
+14 −16
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ before_script:

.build:
  stage: build
  allow_failure: false
  rules: *rules_merge_request_ref
  script:
    - ./gradlew testReleaseUnitTest jacocoReleaseReport -PtestAccountName="$testAccountName" -PtestAccountPwd="$testAccountPwd" -PtestServerUrl="$testServerUrl" lintRelease detekt assembleRelease --parallel --build-cache --configure-on-demand --no-daemon
@@ -72,6 +71,7 @@ before_script:

build-release:
  extends: .build
  allow_failure: false
  cache:
    key: ${CI_PROJECT_ID}
    paths:
@@ -80,6 +80,7 @@ build-release:

build-generate-cache:
  extends: .build
  allow_failure: true
  rules:
    - when: manual
  cache:
@@ -90,6 +91,12 @@ build-generate-cache:

build-debug:
  stage: build
  cache:
    key: ${CI_PROJECT_ID}
    paths:
      - .gradle/
    policy: pull
  allow_failure: true
  rules:
    - when: manual
  script:
@@ -100,28 +107,20 @@ build-debug:
      - app/build/reports/
      - build/reports/

init_submodules:
  stage: build
  rules: *rules_protected_ref
  script:
    - |
      git clone https://gitlab.e.foundation/e/os/system-apps-update-info.git systemAppsUpdateInfo
  artifacts:
    paths:
      - systemAppsUpdateInfo/scripts/

generate-apks:
  stage: build
  rules: *rules_merge_request_ref
  rules: *rules_protected_ref
  allow_failure: true
  needs:
    - job: build-release
    - job: init_submodules
  script:
    - |
      git clone https://gitlab.e.foundation/e/os/system-apps-update-info.git systemAppsUpdateInfo
      ./systemAppsUpdateInfo/scripts/generate-apks.sh \
      "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" "$TEST_APK"
  artifacts:
    paths:
      - systemAppsUpdateInfo/scripts/
      - $APK_PATH/$UNSIGNED_APK
      - $APK_PATH/$COMMUNITY_APK
      - $APK_PATH/$OFFICIAL_APK
@@ -131,7 +130,6 @@ create-json-files:
  stage: publish
  rules: *rules_protected_tag
  needs:
    - job: init_submodules
    - job: generate-apks
  script:
    - |
@@ -147,7 +145,7 @@ create-test-release:
  stage: publish
  rules: *rules_protected_tag_manual
  needs:
    - job: init_submodules
    - job: generate-apks
    - job: create-json-files
      artifacts: false
  script:
@@ -160,7 +158,7 @@ create-release:
  stage: publish
  rules: *rules_protected_tag_manual
  needs:
    - job: init_submodules
    - job: generate-apks
    - job: create-json-files
      artifacts: false
  script: