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

Gradle.properties ignored after 1.22 upgrade

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • gradle-plugin
    • None
    • Ubuntu Linux 12.04; Jenkins 1.508; Gradle 1.4

    Description

      Our builds use $HOME/.gradle/gradle.properties to store secrets (i.e. Artifactory username/password).
      After upgrading to 1.22, this file does not seem to be loaded.

      Likely related: https://github.com/jenkinsci/gradle-plugin/commit/e3c13fb8ad5929d33dc657de24a2ba6e715c8a02

      Possible workarounds:

      • Revert to 1.21
      • Copy the file into the workspace via shell (or some other pre-gradle step)

      Attachments

        Activity

          dougborg Doug Borg added a comment -

          As others have stated, changing the GRADLE_HOME to be inside the workspace is not expected behavior, breaks things for many people, and should be there as an option for those who want it and NOT be the default. Also, this change was very poorly communicated in the changelog. "Always set GRADLE_HOME" doesn't really describe what changed.

          dougborg Doug Borg added a comment - As others have stated, changing the GRADLE_HOME to be inside the workspace is not expected behavior, breaks things for many people, and should be there as an option for those who want it and NOT be the default. Also, this change was very poorly communicated in the changelog. "Always set GRADLE_HOME" doesn't really describe what changed.

          I see that Nicolas De loof has provided a pull request (https://github.com/jenkinsci/gradle-plugin/pull/16/) that looks like it should fix this issue. I'm not sure the process for getting it merged in but I suggest we do it soon and push a release since its been 3 months since it "broke".

          r2b2_nz Richard Bywater added a comment - I see that Nicolas De loof has provided a pull request ( https://github.com/jenkinsci/gradle-plugin/pull/16/ ) that looks like it should fix this issue. I'm not sure the process for getting it merged in but I suggest we do it soon and push a release since its been 3 months since it "broke".

          After no objections on the Jenkins mailing list, I have just deployed a 1.23 release with Nicolas' change. There is now an option to use the workspace as the GRADLE_USER_HOME with the default being the old setting which should fix the issue for a number of people.

          Not sure how long the release takes to show but hopefully won't be long.

          r2b2_nz Richard Bywater added a comment - After no objections on the Jenkins mailing list, I have just deployed a 1.23 release with Nicolas' change. There is now an option to use the workspace as the GRADLE_USER_HOME with the default being the old setting which should fix the issue for a number of people. Not sure how long the release takes to show but hopefully won't be long.

          Release 1.23 performed to make GRADLE_USER_HOME of workspace an option.

          r2b2_nz Richard Bywater added a comment - Release 1.23 performed to make GRADLE_USER_HOME of workspace an option.
          axelabs Bart Bialek added a comment - - edited

          Richard, I have version 1.24 installed... where is this option exposed? I can't find it.

          I see it now under each Job's Gradle options: "Force GRADLE_USER_HOME to use workspace". Is there a way to make this global for all Jobs?

          axelabs Bart Bialek added a comment - - edited Richard, I have version 1.24 installed... where is this option exposed? I can't find it. I see it now under each Job's Gradle options: "Force GRADLE_USER_HOME to use workspace". Is there a way to make this global for all Jobs?

          People

            gbois Gregory Boissinot
            pwagner Pete Wagner
            Votes:
            15 Vote for this issue
            Watchers:
            21 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: