Skip to content

Commit 391b24a

Browse files
committed
Use stdin to pass data to curl as it solved long argument list issue
1 parent 7948da4 commit 391b24a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Jenkinsfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ node('docker && android-build') {
6969
7070
repo manifest -r -o manifest.xml
7171
72-
curl --fail -X PUT -H "Authorization: token $GITHUB_TOKEN" \
73-
-d "{\\"message\\":\\"Add $VERSION changes\\", \\"committer\\":{\\"name\\":\\"Jenkins\\",\\"email\\":\\"[email protected]\\"},\\"content\\":\\"$(echo "$CHANGES" | base64 -w 0)\\"}" \
72+
echo "{\\"message\\":\\"Add $VERSION changes\\", \\"committer\\":{\\"name\\":\\"Jenkins\\",\\"email\\":\\"[email protected]\\"},\\"content\\":\\"$(echo "$CHANGES" | base64 -w 0)\\"}" | \
73+
curl --fail -X PUT -H "Authorization: token $GITHUB_TOKEN" -d @- \
7474
"https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/contents/versions/$VERSION/CHANGES.md"
7575
76-
curl --fail -X PUT -H "Authorization: token $GITHUB_TOKEN" \
77-
-d "{\\"message\\":\\"Add $VERSION manifest\\", \\"committer\\":{\\"name\\":\\"Jenkins\\",\\"email\\":\\"[email protected]\\"},\\"content\\":\\"$(base64 -w 0 manifest.xml)\\"}" \
76+
echo "{\\"message\\":\\"Add $VERSION manifest\\", \\"committer\\":{\\"name\\":\\"Jenkins\\",\\"email\\":\\"[email protected]\\"},\\"content\\":\\"$(base64 -w 0 manifest.xml)\\"}" | \
77+
curl --fail -X PUT -H "Authorization: token $GITHUB_TOKEN" -d @- \
7878
"https://api.github.com/repos/$GITHUB_USER/$GITHUB_REPO/contents/versions/$VERSION/manifest.xml"
7979
'''
8080
}

0 commit comments

Comments
 (0)