title: how to configure 2 jenkins pipeline trigger with environment variable
body: <p>I have to pass parameter to a timeTrigger function in jenkins pipelineTrigger, but it's not taking that parameter. I have to schedule 2 builds, one for Dev every 8 hours, other for staging every 12 hours.</p>
  
  <ul>
  <li>Question1: Can I trigger 2 builds this way?</li>
  <li>Question2: How to pass parameter to specify environment?</li>
  </ul>
  
  <p>See Code below</p>
  
  <pre><code>environmentParam = ['dev', 'qa', 'stg']
  
  originParam = ['Automatic', 'Manual']
  
  if (env.BRANCH_NAME == "master") {
      properties([
              [$class              : 'ParametersDefinitionProperty',
               parameterDefinitions:
                       [
                               [$class     : 'ChoiceParameterDefinition',
                                choices    : environmentParam.join('\n'),
                                description: 'Environment to run the Integration tests',
                                name       : 'environment'
                               ],
                               [$class     : 'ChoiceParameterDefinition',
                                choices    : originParam.join('\n'),
                                description: 'The execution of this job was Automatic or Manual',
                                name       : 'origin'
                               ]
                       ]
              ],
              pipelineTriggers(
                      [
                              [
                                      $class: 'TimerTrigger', spec: 'H */12 * * *', environment: 'stg'
                              ],
                               [
                                      $class: 'TimerTrigger', spec: 'H */8 * * *', environment: 'dev'
                              ]
                      ]
              ),
              disableConcurrentBuilds()
      ])
  }
  </code></pre>
  
  <p>above code is not taking up environment, it is only triggering second entry in pipelineTriggers, not both. :-(</p>