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

Batch Tasks Plugin should receive the current user in the URL

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We have automated Hudson, so that when a commit in SVN is called, the hook triggers a build in Hudson. However, if a specific token is inserted in the SVN comments, our hook should trigger a build task (like, deploy when using "@deploy" in the SVN commit message).

      But, our deploy script needs the user that triggered that build, and as an automated process, I can get that info from my SVN but I don´t see how to pass to the URL executed:

      Eg:

      http://myhudson/batchTasks/task/Test/execute

      Passing HUDSON_USER as a parameter would be nice

        Attachments

          Issue Links

            Activity

            Hide
            mindless Alan Harder added a comment -

            I don't think a parameter for execute is the right approach here. If you actually want to trigger the task AS that user, then pass username/password credentials via wget/curl and then your task will get that user in the HUDSON_USER env var. Otherwise, can't your task run an svn command to get the user for that commit/revision?

            Show
            mindless Alan Harder added a comment - I don't think a parameter for execute is the right approach here. If you actually want to trigger the task AS that user, then pass username/password credentials via wget/curl and then your task will get that user in the HUDSON_USER env var. Otherwise, can't your task run an svn command to get the user for that commit/revision?
            Hide
            mindless Alan Harder added a comment -

            Does the above suggestion help at all? What about using a parameterized job instead of a task.. then you can pass any parameters you need with job/jobname/buildWithParameters

            Show
            mindless Alan Harder added a comment - Does the above suggestion help at all? What about using a parameterized job instead of a task.. then you can pass any parameters you need with job/jobname/buildWithParameters
            Hide
            gastaldi gastaldi added a comment -

            No, that doesn´t solve my problem, because I don´t have the user password.
            I am running a Maven build, so I would need to create a maven plugin for that.

            Maybe a parameterized job would do the job, but I am not so sure about it. Can I use Maven to build ?

            Show
            gastaldi gastaldi added a comment - No, that doesn´t solve my problem, because I don´t have the user password. I am running a Maven build, so I would need to create a maven plugin for that. Maybe a parameterized job would do the job, but I am not so sure about it. Can I use Maven to build ?

              People

              • Assignee:
                Unassigned
                Reporter:
                gastaldi gastaldi
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: