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

Use ToolInstallation as replacement to p4 path specified in Jobs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Got this issue :

      job is configured with p4 path on build slave /usr/bin/p4. When tagging a build, an error occurred because executing on master that don't have p4 installed on same path.

      perforce plugin should use the Jenkins concept of ToolInstallation + NodeSpecific, so that it gets simpler to manage differences between nodes.

        Attachments

          Issue Links

            Activity

            Hide
            miktap Mikko Tapaninen added a comment -

            I'm working on this one and I'll create a pull request once ready. I would remove p4 executable path setting from the job level and have it as a tool installation. As a migration path I was thinking to add a tool installation for each different p4 executable path that are being used (case insensitive for Windows). No matter whether the job is enabled or not and whether it's tied on master or slave. Correct tool installation would then be picked for each job. There could be some extra unneeded tool installations but I think it's fair enough. Comments?

            Show
            miktap Mikko Tapaninen added a comment - I'm working on this one and I'll create a pull request once ready. I would remove p4 executable path setting from the job level and have it as a tool installation. As a migration path I was thinking to add a tool installation for each different p4 executable path that are being used (case insensitive for Windows). No matter whether the job is enabled or not and whether it's tied on master or slave. Correct tool installation would then be picked for each job. There could be some extra unneeded tool installations but I think it's fair enough. Comments?
            Hide
            rpetti Rob Petti added a comment -

            Sounds good to me! You may want to look into a function called "readResolve" for performing the upgrade between versions. The perforce plugin currently doesn't implement it, but the GitSCM plugin has a good example of how this can be used.

            Show
            rpetti Rob Petti added a comment - Sounds good to me! You may want to look into a function called "readResolve" for performing the upgrade between versions. The perforce plugin currently doesn't implement it, but the GitSCM plugin has a good example of how this can be used.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Rob Petti
            Path:
            .gitignore
            src/main/java/hudson/plugins/perforce/PerforceSCM.java
            src/main/java/hudson/plugins/perforce/PerforceToolInstallation.java
            src/main/resources/hudson/plugins/perforce/Messages.properties
            src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly
            src/main/resources/hudson/plugins/perforce/PerforceToolInstallation/config.jelly
            src/main/webapp/help/globalConfig.html
            src/test/java/hudson/plugins/perforce/PerforceSCMTest.java
            src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/config.xml
            src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_1/config.xml
            src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_1/nextBuildNumber
            src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_2/config.xml
            src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_2/nextBuildNumber
            src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_3/config.xml
            src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_3/nextBuildNumber
            http://jenkins-ci.org/commit/perforce-plugin/762fc5cdfc06e54d9b8da91eabc8f94ee2718498
            Log:
            [FIXED JENKINS-11369] adding toolinstallation support for p4 exe

            Compare: https://github.com/jenkinsci/perforce-plugin/compare/69cf2bf...762fc5c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: .gitignore src/main/java/hudson/plugins/perforce/PerforceSCM.java src/main/java/hudson/plugins/perforce/PerforceToolInstallation.java src/main/resources/hudson/plugins/perforce/Messages.properties src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly src/main/resources/hudson/plugins/perforce/PerforceToolInstallation/config.jelly src/main/webapp/help/globalConfig.html src/test/java/hudson/plugins/perforce/PerforceSCMTest.java src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/config.xml src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_1/config.xml src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_1/nextBuildNumber src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_2/config.xml src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_2/nextBuildNumber src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_3/config.xml src/test/resources/hudson/plugins/perforce/PerforceSCMTest/testP4ExeMigration/jobs/test_p4exe_migration_3/nextBuildNumber http://jenkins-ci.org/commit/perforce-plugin/762fc5cdfc06e54d9b8da91eabc8f94ee2718498 Log: [FIXED JENKINS-11369] adding toolinstallation support for p4 exe Compare: https://github.com/jenkinsci/perforce-plugin/compare/69cf2bf...762fc5c

              People

              • Assignee:
                rpetti Rob Petti
                Reporter:
                ndeloof Nicolas De Loof
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: