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

Batch Tasks Plugin should receive the current user in the URL

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • batch-task-plugin
    • None

      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

          [JENKINS-5770] Batch Tasks Plugin should receive the current user in the URL

          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?

          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?

          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

          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

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

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

              Created:
              Updated: