awslabs / aws-device-farm-jenkins-plugin

Jenkins plugin for AWS Device Farm.
Apache License 2.0
89 stars 66 forks source link

Pass the value for 'application' dynamically [Feature Request ?] #105

Open ckzgraphics opened 4 years ago

ckzgraphics commented 4 years ago

:floppy_disk: Use Case:

I have an APK file that is generated dynamically and stored on S3. Check this document- developerguide/continuous-integration-jenkins-plugin

jenkins_1

I know a part name of the APK file, the remaining name of the file I can get from the environment variable at runtime. I need to pass the dynamic name to this 'application' using '%ENVIRONMENT%', however, there is no such provision in the plug-in.

jenkins_2

:eight_spoked_asterisk: Feature Request:

I guess this would be a feature request then if it's not possible through UI as of now

:crystal_ball: If there is some way to handle this scenario do share the same

bad-hambo commented 4 years ago

Hi:

Thank you for reaching out. Unfortunately, we currently do not support dynamically passing Environment variables to our Jenkins plugin via the UI. We will add this feature request as one of our backlog items.

However, please note that this is possible via a pipeline script without the GUI; below find a short example:

# Sample Pipeline 
  stages {
    stage('Generate App') {
      steps {
        # Build the app, store in S3
        APP_NAME = AppNameEnvironment.apk
    stage('Run Device Farm Test') {
      steps {
        devicefarm (
          appArtifact: APP_NAME,
          .
          .
          .
          )

Please feel free to reach out if you have additional questions.

Andy

ckzgraphics commented 4 years ago

Thank you for the update, @bad-hambo 👍

WIll check it out!