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

Batch Task plugin - Task name exposed as environment variable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • batch-task-plugin
    • None
    • All

      Would love to have the Task name exposed as an environment name during task execution. We use mostly free-style projects. All projects call the same script, Execute.sh. This script determines what needs to be done by inspecting Hudson environment variable values. Currently there is no way to determine which task is being called. If the task name were exposed (ie: TASK_NAME), I would be able to call specific code based on that value.

          [JENKINS-6518] Batch Task plugin - Task name exposed as environment variable

          Alan Harder added a comment -

          You can always set TASK_NAME or any other var in your task, or pass a parameter to your script to identify the usage.

          Alan Harder added a comment - You can always set TASK_NAME or any other var in your task, or pass a parameter to your script to identify the usage.

          ndierauf added a comment -

          Thanks for the suggestion. I have implemented this in my task code and it works well.

          ndierauf added a comment - Thanks for the suggestion. I have implemented this in my task code and it works well.

            Unassigned Unassigned
            ndierauf ndierauf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: