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

Add ability to specify custom ivy settings file in global configuration for ivy job type

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • ivy-plugin
    • None

      Currently there is only one way to specify custom ivy settings for ivy job type - relative path in the job.
      In our case we have a custom ivy settings that are used by all jobs. There should be a way to specify global custom ivy settings the same way it is done for ivy build trigger.
      Side note: the field inside the ivy job for ivy settings should support both relative and absolute paths

          [JENKINS-15774] Add ability to specify custom ivy settings file in global configuration for ivy job type

          Code changed in jenkins
          User: johnou
          Path:
          src/main/java/hudson/ivy/IvyModuleSet.java
          src/main/java/hudson/ivy/IvyModuleSetBuild.java
          src/main/resources/hudson/ivy/IvyModuleSet/global.jelly
          src/main/resources/hudson/ivy/IvyModuleSet/help-globalIvySettingsFile.html
          src/main/resources/hudson/ivy/IvyModuleSet/help-globalIvySettingsPropertyFiles.html
          http://jenkins-ci.org/commit/ivy-plugin/4e03055f204801081c01a496b950f348a1279c89
          Log:
          JENKINS-15774 Global custom ivy settings.

          Compare: https://github.com/jenkinsci/ivy-plugin/compare/52ae19ba6a07^...4e03055f2048

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: johnou Path: src/main/java/hudson/ivy/IvyModuleSet.java src/main/java/hudson/ivy/IvyModuleSetBuild.java src/main/resources/hudson/ivy/IvyModuleSet/global.jelly src/main/resources/hudson/ivy/IvyModuleSet/help-globalIvySettingsFile.html src/main/resources/hudson/ivy/IvyModuleSet/help-globalIvySettingsPropertyFiles.html http://jenkins-ci.org/commit/ivy-plugin/4e03055f204801081c01a496b950f348a1279c89 Log: JENKINS-15774 Global custom ivy settings. Compare: https://github.com/jenkinsci/ivy-plugin/compare/52ae19ba6a07 ^...4e03055f2048

          One thing to note in the current implementation is that the path in the global ivy settings refers to the slave environment.

          Johno Crawford added a comment - One thing to note in the current implementation is that the path in the global ivy settings refers to the slave environment.

          eguess74 added a comment -

          Could you please clarify your last comment?
          Also I believe you understood the problem correctly, but just to double check:
          Ivy build trigger has a setting to set where the ivy settings file is. This is used by all free style jobs that are using ivy build trigger.
          I would like to be able to specify the same thing for all builds of "ivy job" type on the server using absolute path to the ivy settings file commonly used by all projects.

          eguess74 added a comment - Could you please clarify your last comment? Also I believe you understood the problem correctly, but just to double check: Ivy build trigger has a setting to set where the ivy settings file is. This is used by all free style jobs that are using ivy build trigger. I would like to be able to specify the same thing for all builds of "ivy job" type on the server using absolute path to the ivy settings file commonly used by all projects.

          Feel free to try the snapshot which contains the changes ( https://issues.jenkins-ci.org/secure/attachment/23049/ivy.hpi ). As for my last comment, the path which is set in system configuration is the path which will be loaded from the slave ie. the ivy settings file must be present on the slave. Is this the desired behaviour?

          Johno Crawford added a comment - Feel free to try the snapshot which contains the changes ( https://issues.jenkins-ci.org/secure/attachment/23049/ivy.hpi ). As for my last comment, the path which is set in system configuration is the path which will be loaded from the slave ie. the ivy settings file must be present on the slave. Is this the desired behaviour?

          eguess74 added a comment -

          We have the ivy settings file located on NFS, so from every host it is the same path /home/users/blahblah/path/to/ivysettings.xml So i believe this should work.

          eguess74 added a comment - We have the ivy settings file located on NFS, so from every host it is the same path /home/users/blahblah/path/to/ivysettings.xml So i believe this should work.

          I still think it is a bit strange to have slave specific configuration in system configuration so I will see about changing it to read the file from master.

          Johno Crawford added a comment - I still think it is a bit strange to have slave specific configuration in system configuration so I will see about changing it to read the file from master.

          eguess74 added a comment -

          I have locally rebased global-ivy-settings branch on top of the ivy-descriptor-env-fix as in includes master and assembled the plugin . Now the global settings seems to be working as i was able to compile a project with it, without the job based ivy settings. I couldn't verify it works for slave due to Jenkins-15779. Global Ant OPS are also very nice to have!

          eguess74 added a comment - I have locally rebased global-ivy-settings branch on top of the ivy-descriptor-env-fix as in includes master and assembled the plugin . Now the global settings seems to be working as i was able to compile a project with it, without the job based ivy settings. I couldn't verify it works for slave due to Jenkins-15779. Global Ant OPS are also very nice to have!

          eguess74 added a comment - - edited

          In our system all jobs are using the same set of ivy settings no matter where they are built (master or slave) So there is no need to specify this for every slave we have. I.e. there is no "slave specific" configuration in that regard, if i understood your comment properly.

          eguess74 added a comment - - edited In our system all jobs are using the same set of ivy settings no matter where they are built (master or slave) So there is no need to specify this for every slave we have. I.e. there is no "slave specific" configuration in that regard, if i understood your comment properly.

          This requires more thought and planning.. global ivy settings file must be an absolute path since it is not tied to the actual job and comes from the master, additionally since the ivy parser is created on the slave the current implementation will fail as the file is loaded from the slave. I will concentrate on JENKINS-15779 and then return to this.

          Johno Crawford added a comment - This requires more thought and planning.. global ivy settings file must be an absolute path since it is not tied to the actual job and comes from the master, additionally since the ivy parser is created on the slave the current implementation will fail as the file is loaded from the slave. I will concentrate on JENKINS-15779 and then return to this.

          Code changed in jenkins
          User: Johno Crawford
          Path:
          pom.xml
          src/main/java/hudson/ivy/IvyConfig.java
          src/main/java/hudson/ivy/IvyModuleSet.java
          src/main/java/hudson/ivy/IvyModuleSetBuild.java
          src/main/resources/hudson/ivy/IvyConfig/newInstanceDetail.jelly
          src/main/resources/hudson/ivy/IvyModuleSet/configure-entries.jelly
          http://jenkins-ci.org/commit/ivy-plugin/ce005a0da58cb1fab76f5c68b57c55e7ab2b3337
          Log:
          Merge pull request #8 from ndeloof/global

          JENKINS-15774 manage global ivy config file using config-file-provider plugin

          Compare: https://github.com/jenkinsci/ivy-plugin/compare/cfebc54a8012...ce005a0da58c

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Johno Crawford Path: pom.xml src/main/java/hudson/ivy/IvyConfig.java src/main/java/hudson/ivy/IvyModuleSet.java src/main/java/hudson/ivy/IvyModuleSetBuild.java src/main/resources/hudson/ivy/IvyConfig/newInstanceDetail.jelly src/main/resources/hudson/ivy/IvyModuleSet/configure-entries.jelly http://jenkins-ci.org/commit/ivy-plugin/ce005a0da58cb1fab76f5c68b57c55e7ab2b3337 Log: Merge pull request #8 from ndeloof/global JENKINS-15774 manage global ivy config file using config-file-provider plugin Compare: https://github.com/jenkinsci/ivy-plugin/compare/cfebc54a8012...ce005a0da58c

            tbingaman Timothy Bingaman
            eguess74 eguess74
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: