Please sign in to comment.
[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.
- Loading branch information...
Showing with 63 additions and 33 deletions.
- +18 −14 src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java
- +22 −18 src/main/java/hudson/plugins/android_emulator/EmulatorConfig.java
- +1 −1 src/main/java/hudson/plugins/android_emulator/util/Utils.java
- +3 −0 src/main/resources/hudson/plugins/android_emulator/AndroidEmulator/config.jelly
- +19 −0 src/main/webapp/help-avdNameSuffix.html
|@@ -0,0 +1,19 @@|
|Should be empty or a custom suffix for the AVD name.<br/>|
|e.g. "<code>mySuffix</code>" or "<code>withPdf</code>"|
|If this field is left blank, no custom suffix will be added to the AVD name that|
|this plugin generates when automatically creating an emulator.<br/>|
|If a value is set, a suffix will be added to the AVD name, with any invalid characters|
|replaced by a hyphen (as AVD names may only contain [a-z A-Z 0-9 . _ -]).|
|This allows you to run multiple emulators with the same configuration in parallel on the|
|same build machine.<br/>|
|Normally, if you create two jobs with the same emulator configuration, only one of those|
|jobs will run at a time — as the other job is using the emulator. But by setting a|
|custom suffix one on or both jobs, the emulator names will differ for the two jobs, and|
|Jenkins will consider them as two completely different emulators, allowing them to run in|
|Note that this will cause more disk space to be used, as a new emulator will be created|
|on disk for each unique suffix used.|