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

Batch Tasks Plugin should receive the current user in the URL

    XMLWordPrintable

Details

    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

            gastaldi gastaldi created issue -
            gastaldi gastaldi made changes -
            Field Original Value New Value
            Link This issue depends on JENKINS-1628 [ JENKINS-1628 ]
            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?

            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?
            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

            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
            mindless Alan Harder made changes -
            Assignee kohsuke [ kohsuke ]
            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 ?

            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 ?
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 135862 ] JNJira + In-Review [ 174401 ]

            People

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

              Dates

                Created:
                Updated: