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

[integration] - android-plugin + custom-tools installation fails due to NPE in ProcStarter::envs()

    XMLWordPrintable

Details

    Description

      I run customtools-plugin together with android-emulator-plugin, and when jenkins launches tasks for android-emulator, they are launched without the default PATH varable.
      This means that the shell scripts that start the emulator can't find common tools as dirname, file and so on.

      Workaround is to add a custom tool that defines default paths too, but thats site-wide and when some nodes have other PATH's than other, i can only add the directories that exists on all nodes.

      Attachments

        Issue Links

          Activity

            glance Anton Lundin added a comment -

            pull/11 solves all blocking bugs.

            The part with the default path being emptied is still there, so it fails as shown in error-custom-tools-0.5-snap-with-platform-tools.txt, but i currently workaround that by adding a custom-tool, DEFAULT_PATH which exports the default path.

            It would be neat to get that one fixed to.

            glance Anton Lundin added a comment - pull/11 solves all blocking bugs. The part with the default path being emptied is still there, so it fails as shown in error-custom-tools-0.5-snap-with-platform-tools.txt, but i currently workaround that by adding a custom-tool, DEFAULT_PATH which exports the default path. It would be neat to get that one fixed to.
            oleg_nenashev Oleg Nenashev added a comment -

            Moved the initial issue to JENKINS-20560

            oleg_nenashev Oleg Nenashev added a comment - Moved the initial issue to JENKINS-20560

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallWrapper.java
            src/main/java/com/cloudbees/jenkins/plugins/customtools/DecoratedLauncher.java
            src/test/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallWrapperTest.java
            src/test/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallerTest.java
            src/test/java/com/synopsys/arc/jenkins/plugins/customtools/util/CommandCallerInstaller.java
            src/test/java/com/synopsys/arc/jenkins/plugins/customtools/util/StubWrapper.java
            http://jenkins-ci.org/commit/customtools-plugin/784a0c091b306d27df4aeb13e54b2ced43fd2db1
            Log:
            [FIXED JENKINS-19506] - Prevent errors on nested wrappers usage
            The provides workarounds for NPEs in Launcher::envs() and also properly calls inner launcher wrappers.
            Resolves https://issues.jenkins-ci.org/browse/JENKINS-19506

            Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallWrapper.java src/main/java/com/cloudbees/jenkins/plugins/customtools/DecoratedLauncher.java src/test/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallWrapperTest.java src/test/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallerTest.java src/test/java/com/synopsys/arc/jenkins/plugins/customtools/util/CommandCallerInstaller.java src/test/java/com/synopsys/arc/jenkins/plugins/customtools/util/StubWrapper.java http://jenkins-ci.org/commit/customtools-plugin/784a0c091b306d27df4aeb13e54b2ced43fd2db1 Log: [FIXED JENKINS-19506] - Prevent errors on nested wrappers usage The provides workarounds for NPEs in Launcher::envs() and also properly calls inner launcher wrappers. Resolves https://issues.jenkins-ci.org/browse/JENKINS-19506 Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallWrapper.java
            src/main/java/com/cloudbees/jenkins/plugins/customtools/DecoratedLauncher.java
            src/test/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallWrapperTest.java
            src/test/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallerTest.java
            src/test/java/com/synopsys/arc/jenkins/plugins/customtools/util/CommandCallerInstaller.java
            src/test/java/com/synopsys/arc/jenkins/plugins/customtools/util/StubWrapper.java
            http://jenkins-ci.org/commit/customtools-plugin/5d9a150ffd107c1a247c0b54e57e16ed38671a3f
            Log:
            Merge pull request #11 from synopsys-arc-oss/nested_wrappers_fix

            [FIXED JENKINS-19506] - Prevent errors on nested wrappers usage

            Compare: https://github.com/jenkinsci/customtools-plugin/compare/dcf9ac719bd1...5d9a150ffd10

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallWrapper.java src/main/java/com/cloudbees/jenkins/plugins/customtools/DecoratedLauncher.java src/test/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallWrapperTest.java src/test/java/com/cloudbees/jenkins/plugins/customtools/CustomToolInstallerTest.java src/test/java/com/synopsys/arc/jenkins/plugins/customtools/util/CommandCallerInstaller.java src/test/java/com/synopsys/arc/jenkins/plugins/customtools/util/StubWrapper.java http://jenkins-ci.org/commit/customtools-plugin/5d9a150ffd107c1a247c0b54e57e16ed38671a3f Log: Merge pull request #11 from synopsys-arc-oss/nested_wrappers_fix [FIXED JENKINS-19506] - Prevent errors on nested wrappers usage Compare: https://github.com/jenkinsci/customtools-plugin/compare/dcf9ac719bd1...5d9a150ffd10
            oleg_nenashev Oleg Nenashev added a comment -

            @Anton
            https://github.com/jenkinsci/customtools-plugin/pull/13 provides a fix for your initial issue

            oleg_nenashev Oleg Nenashev added a comment - @Anton https://github.com/jenkinsci/customtools-plugin/pull/13 provides a fix for your initial issue

            People

              oleg_nenashev Oleg Nenashev
              glance Anton Lundin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: