pipeline {
  agent none

  options {
    disableResume()
    disableConcurrentBuilds()
    buildDiscarder logRotator(
      artifactDaysToKeepStr: '',
      artifactNumToKeepStr: '',
      daysToKeepStr: '',
      numToKeepStr: '5'
    )
    ansiColor('xterm')
  }

  triggers {
    cron 'H 2 * * 1-5'
  }

  stages {
    stage('Start pipeline') {
      steps {
        build(
          wait: false,
          job: 'ApolloGo/Build Wrapper',
          parameters: [
            listGitBranches(name: 'APOLLO_GO_BRANCH', value: 'refs/heads/develop'),
            string(name: 'RELEASE_CHANNEL', value: 'qa'),
            string(name: 'FORCE', value: 'IOS_AD_HOC'),
            string(name: 'TARGET_API_URL', value: 'https://dev-proxy.apollo.stream'),
            listGitBranches(name: 'APOLLO_GO_MOBILE_AUTO_BRANCH', value: 'refs/heads/master'),
            string(name: 'FORCE_BUILD', value: 'UI SMOKE'),
            string(name: 'IOS_DEVICE_VERSION', value: 'iPhone 12 Pro Max,iOS 14'),
            string(name: 'NUMBER_OF_PARALLEL_TESTS', value: '5')
          ]
        )
      } /** end: steps */
    } /** end: stage */
  } /** end: stages */
} /** end: pipeline */
