• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • gradle-plugin
    • None
    • Ubuntu Linux 12.04; Jenkins 1.508; Gradle 1.4

      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)

          [JENKINS-17386] Gradle.properties ignored after 1.22 upgrade

          Pete Wagner created issue -

          Pete Wagner added a comment -

          Reverting to 1.21 was our choice; builds fixed.

          Pete Wagner added a comment - Reverting to 1.21 was our choice; builds fixed.

          Tomek Kaczanowski added a comment - - edited

          same issue here (Jenins 1.506, Gradle 1.5, Ubuntu Linux 12.04)

          any chances on fixing this bug?

          BTW. "fixed" it with the following snippet run before gradle tasks:

          cp /home/jenkins/.gradle/gradle.properties gradle.properties.global
          cat gradle.properties.global >> gradle.properties
          rm gradle.properties.global

          Tomek Kaczanowski added a comment - - edited same issue here (Jenins 1.506, Gradle 1.5, Ubuntu Linux 12.04) any chances on fixing this bug? BTW. "fixed" it with the following snippet run before gradle tasks: cp /home/jenkins/.gradle/gradle.properties gradle.properties.global cat gradle.properties.global >> gradle.properties rm gradle.properties.global

          Same problem here with Jenkins 1.480.3, Gradle 1.4 on Windows XP 32bit SP3.

          We want to use a global GRADLE_USER_HOME that is not project specific.

          As a workaround we reverted to 1.21.

          Could you make this feature (setting GRADLE_USER_HOME) optional, please?

          Also could you log the GRADLE_USER_HOME value?

          Thanks,

          Alain VALLETON added a comment - Same problem here with Jenkins 1.480.3, Gradle 1.4 on Windows XP 32bit SP3. We want to use a global GRADLE_USER_HOME that is not project specific. As a workaround we reverted to 1.21. Could you make this feature (setting GRADLE_USER_HOME) optional, please? Also could you log the GRADLE_USER_HOME value? Thanks,

          will soula added a comment -

          The above commit is certainly the one that broke this and here is the pull request:
          https://github.com/jenkinsci/gradle-plugin/pull/12

          It appears that the gradle plugin has changed the way gradle works and
          has taken a default that is different than gradle's default. I would
          not expect the plugin to have different defaults than the actual tool,
          it leads to confusion when things don't work like is documented online.

          I know I can override the GRADLE_USER_HOME variable with the -g switch
          and a few other methods, which is what the author of the pull request
          should have done, -g $WORKSPACE.

          Its like the git plugin suddenly changed and now if you leave branches blank
          it only checks master instead of all branches.

          Another workaround would be putting -g /home/[build user]/.gradle in the switches.

          will soula added a comment - The above commit is certainly the one that broke this and here is the pull request: https://github.com/jenkinsci/gradle-plugin/pull/12 It appears that the gradle plugin has changed the way gradle works and has taken a default that is different than gradle's default. I would not expect the plugin to have different defaults than the actual tool, it leads to confusion when things don't work like is documented online. I know I can override the GRADLE_USER_HOME variable with the -g switch and a few other methods, which is what the author of the pull request should have done, -g $WORKSPACE. Its like the git plugin suddenly changed and now if you leave branches blank it only checks master instead of all branches. Another workaround would be putting -g /home/ [build user] /.gradle in the switches.

          +1 also a problem for us, global properties & nexus creds were in $HOME/.gradle, had to revert to 1.21

          Jeffrey Damick added a comment - +1 also a problem for us, global properties & nexus creds were in $HOME/.gradle, had to revert to 1.21

          +1: same problem that $HOME/.gradle/gradle.properties is used for credentials. What's the reason for setting GRADLE_USER_HOME to job's workspace? We are making heavy use of gradle wrapper. Gradle distributions being installed per job instead of being shared nastily impacts the storage size.

          Jochen Hinrichsen added a comment - +1: same problem that $HOME/.gradle/gradle.properties is used for credentials. What's the reason for setting GRADLE_USER_HOME to job's workspace? We are making heavy use of gradle wrapper. Gradle distributions being installed per job instead of being shared nastily impacts the storage size.

          Christian Hepworth added a comment - - edited

          This is also a problem for us. However, I reverted back to version 1.21 but the file is still not being found. When in the HOME/.gradle directory.

          Also, why would the plugin have different defaults to the gradle tool itself?

          Christian Hepworth added a comment - - edited This is also a problem for us. However, I reverted back to version 1.21 but the file is still not being found. When in the HOME/.gradle directory. Also, why would the plugin have different defaults to the gradle tool itself?

          166_MMX added a comment -

          It breaks our builds too since we depend on $HOME/.gradle/gradle.properties too

          166_MMX added a comment - It breaks our builds too since we depend on $HOME/.gradle/gradle.properties too
          166_MMX made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]

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

              Created:
              Updated:
              Resolved: