Richard, that was the problem. There was an extra line feed stuffed into
the variable by accident.

Thanks!
Curtis


On Thu, Aug 10, 2017 at 5:16 AM, Richard Bywater <[email protected]> wrote:

> Taking a look at the error, it appears like you have a line feed or
> carriage return at the end of the env.filename variable (note the quote is
> on the next line and not next to apk like I'd expect).
>
> Richard.
>
> On Thu, 10 Aug 2017 at 09:40 Curtis Kline <[email protected]> wrote:
>
>> The file exists in the current working directory. This is a three-stage
>> project with the agent declared at the global level. It's not running in a
>> Docker container, simply on a Linux node. As a test, I included a step
>> right before the one I mentioned:
>>
>>             ls -l ${env.filename}
>>
>> The results seem conclusive:
>>
>> [Pipeline] sh[JenkinsAndroidTest] Running shell script
>> + ls -l Project-debug-v2.1.0-b999.apk
>> -rwxrwxrwx 1 jenkins jenkins 33014841 Aug  9 21:01 
>> Project-debug-v2.1.0-b999.apk
>>
>>
>>
>>
>> On Wed, Aug 9, 2017 at 4:26 PM, Slide <[email protected]> wrote:
>>
>>> Does the file exist in what would be considered the current working
>>> directory? Perhaps an ls before the curl to verify?
>>>
>>> On Wed, Aug 9, 2017 at 2:13 PM Curtis Kline <[email protected]>
>>> wrote:
>>>
>>>> In my declarative pipeline Jenkinsfile, I have the following shell
>>>> script line:
>>>>
>>>> sh """
>>>> curl -F "status=2" -F "notify=1" -F "notes=${params.ReleaseNotes}" -F
>>>> "ipa=@${env.filename}" -H "X-HockeyAppToken: 1234"
>>>> https://rink.hockeyapp.net/api/2/apps/upload
>>>> """
>>>>
>>>> This does not work, because curl is apparently unable to open the file.
>>>> The file clearly exists, and the env.filename variable contains the correct
>>>> filename (you can see this in the console log below, as the variable has
>>>> been expanded to a file name).
>>>>
>>>> A snippet of my console log is below. I’ve been working on this for a
>>>> number of hours, and I could use any help or advice you might have.
>>>>
>>>> [Pipeline] sh[JenkinsAndroidTest] Running shell script
>>>> + curl -F status=2 -F notify=1 -F notes= -F [email protected]
>>>> b999.apk
>>>> -H X-HockeyAppToken: 1234 https://rink.hockeyapp.net/api/2/apps/upload
>>>>   % Total    % Received % Xferd  Average Speed   Time    Time     Time
>>>> Current
>>>>                                  Dload  Upload   Total   Spent
>>>> Left  Speed
>>>>
>>>>   0     0    0     0    0     0      0      0 --:--:-- --:--:--
>>>> --:--:--     0
>>>>   0     0    0     0    0     0      0      0 --:--:-- --:--:--
>>>> --:--:--     0
>>>> curl: (26) couldn't open file “Project-debug-v2.1.0-b999.apk
>>>> "
>>>> [Pipeline] }
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Jenkins Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/jenkinsci-users/CAGkg-enyw40%3DHNoD85ai%2BFemMjafkJwH9jsswGhJX-
>>>> KmAr8Qig%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAGkg-enyw40%3DHNoD85ai%2BFemMjafkJwH9jsswGhJX-KmAr8Qig%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/jenkinsci-users/CAPiUgVfa%2BX14jd_4LvX1CYS_
>>> vuWRSYmvvHSh3dHjM9_ApMo5-g%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVfa%2BX14jd_4LvX1CYS_vuWRSYmvvHSh3dHjM9_ApMo5-g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/jenkinsci-users/CAGkg-enQf5Wd00PPtkNnatYKNcmFjPDxHAo
>> j94JakZe18U88Yg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAGkg-enQf5Wd00PPtkNnatYKNcmFjPDxHAoj94JakZe18U88Yg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/CAMui945v4%3DR_nEFBQ4PyZHN_
> 7vVXsRqFsqEDNgp1Gi2rCd0n-A%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAMui945v4%3DR_nEFBQ4PyZHN_7vVXsRqFsqEDNgp1Gi2rCd0n-A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAGkg-e%3DG0o%2BzqkYmiaKBe20qzv6wDgbAdiv0bozTPwDf0Jrf_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to