# include the common jobs defined for android pipeline setup
include:
  - 'https://gitlab.com/Linaro/lkft/users/yongqin.liu/lkft-common/-/raw/development/gitlab-ci-common-for-android.yml'
  - 'https://gitlab.com/Linaro/lkft/users/yongqin.liu/lkft-common/-/raw/development/gitlab-ci-jobs/gitlab-ci-android-common-jobs-triggers.yml'

variables:
  BUILD_TYPE: "tuxsuite-bake"
  URL_LKFT_COMMON_RAW: "https://gitlab.com/Linaro/lkft/users/yongqin.liu/lkft-common/-/raw/development/"
  RUN_TEST: "1"

validate_inputs:
  rules:
    - when: never

new_changes_notification:
  rules:
    - when: never

create_squad_projects_and_builds_android14_5_15:
  rules:
    - when: never
build_android14_515_db845c:
  rules:
    - when: never
trigger-android14-515-pipeline:
  rules:
    - when: never
trigger-android14-515-pipeline-eap:
  rules:
    - when: never

create_squad_projects_and_builds_android14_5_15_lts:
  rules:
    - when: never
build_android14_515_lts_db845c:
  rules:
    - when: never
trigger-android14-515-lts-pipeline:
  rules:
    - when: never

download_android_prerequisites:
  rules:
    - when: never

test_download_android_prerequisites:
  extends:
    - .artifact-job
  image: curlimages/curl
  stage: download_prerequisites
  script:
    #- pwd && ls -l .
    - echo "mkdir -p artifacts/scripts"
      #- curl -fsSL ${URL_LKFT_COMMON_RAW}/lkft-android-send-new-changes-notification.sh -o ${DIR_SCRIPTS_PATH}/lkft-android-send-new-changes-notification.sh
      #- curl -fsSL ${URL_LKFT_COMMON_RAW}/lkft-android-submit-tests.sh -o ${DIR_SCRIPTS_PATH}/lkft-android-submit-tests.sh
      #- curl -fsSL ${URL_LKFT_COMMON_RAW}/lkft-android-register-callback.sh -o ${DIR_SCRIPTS_PATH}/lkft-android-register-callback.sh
      #- curl -fsSL ${URL_LKFT_COMMON_RAW}/lkft-common-bash-function.sh -o ${DIR_SCRIPTS_PATH}/lkft-common-bash-function.sh
      #- curl -fsSL ${URL_LKFT_COMMON_RAW}/lkft-android-trigger-pipeline.sh -o ${DIR_SCRIPTS_PATH}/lkft-android-trigger-pipeline.sh
      #- curl -fsSL ${URL_LKFT_COMMON_RAW}/lkft-android-create-squad-project-and-builds.sh -o ${DIR_SCRIPTS_PATH}/lkft-android-create-squad-project-and-builds.sh
      #- curl -fsSL ${URL_LKFT_COMMON_RAW}/lkft-android-build.sh -o ${DIR_SCRIPTS_PATH}/lkft-android-build.sh
      #- curl -fsSL https://android-git.linaro.org/android-build-configs.git/plain/lkft/linaro-lkft.sh?h=lkft -o ${DIR_SCRIPTS_PATH}/linaro-lkft.sh
      #- chmod +x ${DIR_SCRIPTS_PATH}/*
  needs: []
  rules:
    - when: manual

# This will only build and test branches specified here.
workflow:
  rules:
    - if: '$CI_COMMIT_BRANCH == "android14-5.15-lts"'
      when: always
    - if: '$CI_COMMIT_BRANCH == "android14-5.15"'
      when: always
    - if: '$CI_COMMIT_BRANCH == "android14-5.15-test-huge-size-commit"'
      when: always
    - when: never

### common jobs not have branch check set will run for all branches ######
