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/pipelines/apollo-go-mobile-automation/master',
          parameters: [
            string(name: 'FORCE_BUILD', value: 'API'),
            string(name: 'TARGET_API_URL', value: 'https://dev-proxy.apollo.stream'),
            booleanParam(name: 'USE_CACHE', value: true)
          ]
        )
      } /** end: steps */
    } /** end: stage */
  } /** end: stages */
} /** end: pipeline */
