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

AppCenter Plugin is unable to read parameters set to `Path To App`

    Details

    • Similar Issues:

      Description

      If I use relative file path the plugin works but if I pass the same path as a parameter such as $MY_PACKAGE the plugin gives me an error:

      ```
      io.jenkins.plugins.appcenter.AppCenterException: File not found: $MY_PACKAGE
      ```

      I have a dynamic file name and unable to use a predefined value and thus my relative file path value is stored in a variable.

      In the hockey app plugin the same path is recognized and used correctly, so when I migrated from hockey to appcenter, the build is broken and blocked.

        Attachments

          Issue Links

            Activity

            Hide
            mezpahlan Mez Pahlan added a comment -

            Hi Alexey Strakh, thanks for reporting. I'm going to tag this as a duplicate of JENKINS-58329 as some work has already started regarding environment variables. Can you confirm that $MY_PACKAGE is an environment variable and not some other type of variable (which I think will be fine too).

            Show
            mezpahlan Mez Pahlan added a comment - Hi Alexey Strakh , thanks for reporting. I'm going to tag this as a duplicate of JENKINS-58329 as some work has already started regarding environment variables. Can you confirm that $MY_PACKAGE is an environment variable and not some other type of variable (which I think will be fine too).
            Hide
            arunkchow Arun Ghanta added a comment - - edited

            Hi Mez! Thank you very much for the AppCenter Jenkins plugin.

            Just like Alexey the project that I'm working on generates dynamic file names.
            I tried below methods to publish to AppCenter and I'm getting error.

            Method 1: [Declare a variable and and call it in the path]

            stage('Publish to App Center')
             sh '''
             filename=$(ls -lt somepath/*.apk |cut -d'/' -f 7)
             echo $filename > filename
             '''
             apkname = readFile 'filename'
             appCenter apiToken: 'sometoken', appName: 'some-appname', distributionGroups: 'some-group', notifyTesters: true, ownerName: 'some-owner-name', pathToApp: 'somepath/${apkname}', releaseNotes: 'notes'
            

            Method 2: [Using shell type wild card in the path]

            stage('Publish to App Center')
             appCenter apiToken: 'sometoken', appName: 'some-appname', distributionGroups: 'some-group', notifyTesters: true, ownerName: 'some-owner-name', pathToApp: 'some/*/path/*.apk', releaseNotes: 'notes'
            

            I get below error for both:

            Caused by: java.util.concurrent.ExecutionException: io.jenkins.plugins.appcenter.AppCenterException: File not found:

             

            Please suggest any way to come around this one.

            Regards,

            Arun

             

            Show
            arunkchow Arun Ghanta added a comment - - edited Hi Mez! Thank you very much for the AppCenter Jenkins plugin. Just like Alexey the project that I'm working on generates dynamic file names. I tried below methods to publish to AppCenter and I'm getting error. Method 1: [Declare a variable and and call it in the path] stage( 'Publish to App Center' ) sh ''' filename=$(ls -lt somepath/*.apk |cut -d '/' -f 7) echo $filename > filename ''' apkname = readFile 'filename' appCenter apiToken: 'sometoken' , appName: 'some-appname' , distributionGroups: 'some-group' , notifyTesters: true , ownerName: 'some-owner-name' , pathToApp: 'somepath/${apkname}' , releaseNotes: 'notes' Method 2: [Using shell type wild card in the path] stage( 'Publish to App Center' ) appCenter apiToken: 'sometoken' , appName: 'some-appname' , distributionGroups: 'some-group' , notifyTesters: true , ownerName: 'some-owner-name' , pathToApp: 'some/*/path/*.apk' , releaseNotes: 'notes' I get below error for both: Caused by: java.util.concurrent.ExecutionException: io.jenkins.plugins.appcenter.AppCenterException: File not found:   Please suggest any way to come around this one. Regards, Arun  
            Hide
            mezpahlan Mez Pahlan added a comment -

            Hi Arun Ghanta what you're looking for is not environment variable substitution which was what  was resolved in the issue that this duplicates but rather supporting ANT style glob paths. There's a fix in JENKINS-59528 that you can look out for. It isn't released yet but will be shortly. 

            Show
            mezpahlan Mez Pahlan added a comment - Hi Arun Ghanta what you're looking for is not environment variable substitution which was what  was resolved in the issue that this duplicates but rather supporting ANT style glob paths. There's a fix in  JENKINS-59528 that you can look out for. It isn't released yet but will be shortly. 

              People

              • Assignee:
                astrakh Alexey Strakh
                Reporter:
                astrakh Alexey Strakh
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: