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

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

      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.

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

          Anton Lundin created issue -

          Oleg Nenashev added a comment -

          Hello,

          You can use label-specific tool installations to define PATH individually (since customtools-0.3).
          In addition, you can specify relative paths + node-specific home dirs.

          Do you need anything else? If yes, please recategorize the issue and describe your vision.

          BR, Oleg Nenashev

          Oleg Nenashev added a comment - Hello, You can use label-specific tool installations to define PATH individually (since customtools-0.3). In addition, you can specify relative paths + node-specific home dirs. Do you need anything else? If yes, please recategorize the issue and describe your vision. BR, Oleg Nenashev

          Anton Lundin added a comment -

          Ok for how you can make the workaround better, but the main issue is still that it overrides the default PATH, not adds things to it.

          Eg. the android-emulator plugin works just fine on jobs without customtools but as soon as you activate customtools, it overrides the PATH and breaks everything depending on it.

          Anton Lundin added a comment - Ok for how you can make the workaround better, but the main issue is still that it overrides the default PATH, not adds things to it. Eg. the android-emulator plugin works just fine on jobs without customtools but as soon as you activate customtools, it overrides the PATH and breaks everything depending on it.

          Oleg Nenashev added a comment - - edited

          custom-tools appends PATHs by default. BTW, there could be issues with EnvInject plugin. Do you use it for initial PATH setup? Anyway, please mention the custom-tools plugin version.

          Oleg Nenashev added a comment - - edited custom-tools appends PATHs by default. BTW, there could be issues with EnvInject plugin. Do you use it for initial PATH setup? Anyway, please mention the custom-tools plugin version.

          Anton Lundin added a comment -

          I read about problems with EnvInject so i have removed EnvInject. This issues was reproduced with 0.4-SNAPSHOT 468a968cb4197acccbb843612b963cb451af04d7 (git head as of 2013-09-08).

          There were fixes that looked promising in the commit log so i tested the latest git HEAD before reporting it.

          Anton Lundin added a comment - I read about problems with EnvInject so i have removed EnvInject. This issues was reproduced with 0.4-SNAPSHOT 468a968cb4197acccbb843612b963cb451af04d7 (git head as of 2013-09-08). There were fixes that looked promising in the commit log so i tested the latest git HEAD before reporting it.

          Oleg Nenashev added a comment - - edited

          It is quite strange.

          Unfortunately, I have not environment to reproduce the issue. Could you provide the custom tools confiigs, job's configuration and build outputs? I'm also interested in the initial build environment and steps internal build env.

          I have not used Android Plugin before, but probably I will be able to locate the issue. Custom-tools works well for many unix-based platforms, so I expect the integration issue with that plugin only.

          Oleg Nenashev added a comment - - edited It is quite strange. Unfortunately, I have not environment to reproduce the issue. Could you provide the custom tools confiigs, job's configuration and build outputs? I'm also interested in the initial build environment and steps internal build env. I have not used Android Plugin before, but probably I will be able to locate the issue. Custom-tools works well for many unix-based platforms, so I expect the integration issue with that plugin only.
          Oleg Nenashev made changes -
          Component/s New: android-emulator [ 15725 ]
          Environment New: custom-tools 0.4, android emulator plugin
          Labels New: custom-tools-0.4

          Anton Lundin added a comment -

          Errors produced with customtools and android-emulator.

          Anton Lundin added a comment - Errors produced with customtools and android-emulator.
          Anton Lundin made changes -
          Attachment New: error-custom-tools-0.3.txt [ 24322 ]
          Attachment New: error-custom-tools-0.5-snap-platform-tools.txt [ 24323 ]
          Attachment New: error-custom-tools-0.5-snap-with-platform-tools.txt [ 24324 ]
          Attachment New: config.xml [ 24325 ]

          Anton Lundin added a comment -

          How to reproduce:

          download a fresh jenkins from http://jenkins-ci.org/

          install android-emulator and customtools plugins.

          Create a job with customtools and a android-emulator (ex. custom.xml)

          click build, android-emulator installs the android sdk, and tries to install its tools but it can't.

          Install android build-tools and platform-tools by hand to show the later error message.

          When you try to build then, it tries to start a emulator, but the shell-script emulator (jenkins/tools/android-sdk/tools/emulator) can't find dirname and basename due to that custom-tools have removed PATH

          Disable customtools in the job and watch how jenkins can start a emulator.

          Anton Lundin added a comment - How to reproduce: download a fresh jenkins from http://jenkins-ci.org/ install android-emulator and customtools plugins. Create a job with customtools and a android-emulator (ex. custom.xml) click build, android-emulator installs the android sdk, and tries to install its tools but it can't. Install android build-tools and platform-tools by hand to show the later error message. When you try to build then, it tries to start a emulator, but the shell-script emulator (jenkins/tools/android-sdk/tools/emulator) can't find dirname and basename due to that custom-tools have removed PATH Disable customtools in the job and watch how jenkins can start a emulator.

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

              Created:
              Updated:
              Resolved: