Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2898

Ability to change ant target depending on build trigger

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • ant-plugin
    • None
    • Platform: All, OS: All

      I would like a job to build my projects, but build a different ant target
      depending on how it was triggered. For example I would like to have the normal
      build run off Polling the SCM. This does an svn update, builds the project and
      runs some unit tests. Every night at 2am I would like to do all the above, but
      delete my build folder first so I get a totally clean build and also run some
      integration tests.

      If I could somehow tell ant to run a different target for the different build
      triggers, or set an environment variable that I could look at inside the ant
      build, or...

      Is this currently possible?

          [JENKINS-2898] Ability to change ant target depending on build trigger

          Mike Schall created issue -

          mdonohue added a comment -

          This could be done as a plugin.

          mdonohue added a comment - This could be done as a plugin.
          mdonohue made changes -
          Link New: This issue depends on JENKINS-291 [ JENKINS-291 ]

          jhm added a comment -

          If Hudson could pass the trigger event (as text) to the builders they could
          react on them. E.g.
          ant -Dhudson.trigger=manual mytarget
          ant -Dhudson.trigger=downstream mytarget
          ...

          jhm added a comment - If Hudson could pass the trigger event (as text) to the builders they could react on them. E.g. ant -Dhudson.trigger=manual mytarget ant -Dhudson.trigger=downstream mytarget ...
          mdonohue made changes -
          Component/s New: ant [ 15488 ]
          Component/s Original: other [ 15490 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 132971 ] New: JNJira + In-Review [ 173970 ]

            Unassigned Unassigned
            schallm Mike Schall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: