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

When using gradlew, root build script field is not used to locate gradlew

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • gradle-plugin
    • None
    • gradle plugin 1.20

      It seems "root build script" is not really well taken when using gradlew.

      For instance, I have a git repository having a foo/build.gradle script.
      I then set "root build script" to "${WORKSPACE}/foo/"

      I would like to execute :

      $\{WORKSPACE\}/foo/gradlew 
      

      But for now, it is some sort of :

      $\{WORKSPACE\}/gradlew -p $\{WORKSPACE\}/foo
      

      I think we should define gradlew location (relative to checked out root repository) because for the moment, the only way to workaround the problem is to put gradlew in the root scm hierarchy

          [JENKINS-15406] When using gradlew, root build script field is not used to locate gradlew

          Frédéric Camblor created issue -
          Frédéric Camblor made changes -
          Description Original: It seems "root build script" field is always omitted.

          For instance, I have a git repository having a foo/build.gradle script.
          I then set "root build script" to "${WORKSPACE}/foo/"
          I'm using gradlew.

          I would like to either execute
          {code}
          ${WORKSPACE}/foo/gradlew
          {code}

          _or_ execute
          {code}
          ${WORKSPACE}/gradlew -p ${WORKSPACE}/foo
          {code}

          But for now, it is :
          {code}
          ${WORKSPACE}/gradlew
          {code}
          which is executed, not using foo/build.gradle script.

          Not that it isn't related to gradlew since when using a gradle installation, it remains the same.

          I tried to put ${WORKSPACE}/foo/build.gradle in "Build file" field as a workaround, but it didn't worked either (build script is taken, but with -b, not -p which seems reasonable)
          New: It seems "root build script" is not really well taken when using gradlew.

          For instance, I have a git repository having a foo/build.gradle script.
          I then set "root build script" to "${WORKSPACE}/foo/"

          I would like to execute
          {code}
          ${WORKSPACE}/foo/gradlew
          {code}

          But for now, it is some sort of :
          {code}
          ${WORKSPACE}/gradlew -p ${WORKSPACE}/foo
          {code}

          I think we should define gradlew location (relative to checked out root repository) because for the moment, the only way to workaround the problem is to put gradlew in the root scm hierarchy
          Priority Original: Critical [ 2 ] New: Minor [ 4 ]
          Summary Original: Root build script field is never used New: When using gradlew, root build script field is not used to locate gradlew
          Frédéric Camblor made changes -
          Description Original: It seems "root build script" is not really well taken when using gradlew.

          For instance, I have a git repository having a foo/build.gradle script.
          I then set "root build script" to "${WORKSPACE}/foo/"

          I would like to execute
          {code}
          ${WORKSPACE}/foo/gradlew
          {code}

          But for now, it is some sort of :
          {code}
          ${WORKSPACE}/gradlew -p ${WORKSPACE}/foo
          {code}

          I think we should define gradlew location (relative to checked out root repository) because for the moment, the only way to workaround the problem is to put gradlew in the root scm hierarchy
          New: It seems "root build script" is not really well taken when using gradlew.

          For instance, I have a git repository having a foo/build.gradle script.
          I then set "root build script" to "${WORKSPACE}/foo/"

          I would like to execute :

          {code}
          ${WORKSPACE}/foo/gradlew
          {code}

          But for now, it is some sort of :

          {code}
          ${WORKSPACE}/gradlew -p ${WORKSPACE}/foo
          {code}

          I think we should define gradlew location (relative to checked out root repository) because for the moment, the only way to workaround the problem is to put gradlew in the root scm hierarchy
          Frédéric Camblor made changes -
          Description Original: It seems "root build script" is not really well taken when using gradlew.

          For instance, I have a git repository having a foo/build.gradle script.
          I then set "root build script" to "${WORKSPACE}/foo/"

          I would like to execute :

          {code}
          ${WORKSPACE}/foo/gradlew
          {code}

          But for now, it is some sort of :

          {code}
          ${WORKSPACE}/gradlew -p ${WORKSPACE}/foo
          {code}

          I think we should define gradlew location (relative to checked out root repository) because for the moment, the only way to workaround the problem is to put gradlew in the root scm hierarchy
          New: It seems "root build script" is not really well taken when using gradlew.

          For instance, I have a git repository having a foo/build.gradle script.
          I then set "root build script" to "${WORKSPACE}/foo/"

          I would like to execute :

          {code}
          $\{WORKSPACE\}/foo/gradlew
          {code}

          But for now, it is some sort of :

          {code}
          $\{WORKSPACE\}/gradlew -p $\{WORKSPACE\}/foo
          {code}

          I think we should define gradlew location (relative to checked out root repository) because for the moment, the only way to workaround the problem is to put gradlew in the root scm hierarchy
          Gregory Boissinot made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Nicolas Mongrain-Lacombe made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 146140 ] New: JNJira + In-Review [ 191792 ]
          Stefan Wolf made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            gbois Gregory Boissinot
            fcamblor Frédéric Camblor
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: