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

Ability to customise name of generated AVDs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      [22:31:39] <jorgenpt> orrc: Any chance of getting the JOB_NAME in the AVD name? (Or allow them to be configurable?)
      [22:31:51] <jorgenpt> Because those two jobs can run in parallel :|
      [22:31:59] <jorgenpt> (on the same slave)

      Currently, using the same emulator config in multiple jobs means that only one job can run in parallel per slave.
      However, if we generated multiple AVDs, with the same config, but different names, these jobs could be parallelised.

      Instead of naming the AVD "hudson_en-US_android-4", we could call it "hudson_${JOB_NAME}_en-US_android-4".

      My concerns:

      • Do not enable this by default since snapshots use several hundred MB each – therefore creating a unique AVD per job could quickly consume a lot of disk space
      • Jobs can be renamed, which (although optional) would orphan a "hudson_${JOB_NAME}_..." AVD.
        • Perhaps there's a "rename" trigger that we can catch, and rename the AVD if it contains ${JOB_NAME}?

      I think it would be nice to add an optional "AVD Name" field, which the user can fill in with variables like $OS and $LOCALE.
      By default, if not customised, this would default to "hudson_${LOCALE}${DENSITY}${RESOLUTION}_${PLATFORM}".

      We would also accept $JOB_NAME and.. what else is useful?

        Attachments

          Issue Links

            Activity

            Hide
            orrc Christopher Orr added a comment -

            A patch was added which I believe optionally adds a custom suffix to the AVD name per-job:
            https://github.com/jenkinsci/android-emulator-plugin/pull/9

            Show
            orrc Christopher Orr added a comment - A patch was added which I believe optionally adds a custom suffix to the AVD name per-job: https://github.com/jenkinsci/android-emulator-plugin/pull/9
            Hide
            orrc Christopher Orr added a comment -

            Somebody updated that pull request here; I will (really) test and merge it soon:
            https://github.com/jenkinsci/android-emulator-plugin/pull/33

            Show
            orrc Christopher Orr added a comment - Somebody updated that pull request here; I will (really) test and merge it soon: https://github.com/jenkinsci/android-emulator-plugin/pull/33
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christopher Orr
            Path:
            src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java
            src/main/java/hudson/plugins/android_emulator/EmulatorConfig.java
            src/main/java/hudson/plugins/android_emulator/util/Utils.java
            src/main/resources/hudson/plugins/android_emulator/AndroidEmulator/config.jelly
            src/main/webapp/help-avdNameSuffix.html
            http://jenkins-ci.org/commit/android-emulator-plugin/24c23897e7e100b373f8f4aa0989a9584688ccbf
            Log:
            [FIXED JENKINS-11083] Allow adding a suffix to generated AVD names.

            This makes it possible to use the exact same emulator config in two jobs without
            one job having to block waiting for the other job to finish using the emulator.

            This patch comes from pull requests #9 and #33, with some additional changes to
            documentation and assuring that generated AVD names are valid, despite the
            suffix field being free text.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java src/main/java/hudson/plugins/android_emulator/EmulatorConfig.java src/main/java/hudson/plugins/android_emulator/util/Utils.java src/main/resources/hudson/plugins/android_emulator/AndroidEmulator/config.jelly src/main/webapp/help-avdNameSuffix.html http://jenkins-ci.org/commit/android-emulator-plugin/24c23897e7e100b373f8f4aa0989a9584688ccbf Log: [FIXED JENKINS-11083] Allow adding a suffix to generated AVD names. This makes it possible to use the exact same emulator config in two jobs without one job having to block waiting for the other job to finish using the emulator. This patch comes from pull requests #9 and #33, with some additional changes to documentation and assuring that generated AVD names are valid, despite the suffix field being free text.
            Hide
            orrc Christopher Orr added a comment -

            Version 2.11 of the plugin has been released, which fixes this issue.

            Show
            orrc Christopher Orr added a comment - Version 2.11 of the plugin has been released, which fixes this issue.

              People

              • Assignee:
                orrc Christopher Orr
                Reporter:
                orrc Christopher Orr
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: