I have a simple config.yml file with the this content:
version: 2.1
parameters:
project-url:
type: string
default: "none"
jobs:
build:
working_directory: ~/project
docker:
- image: cimg/node:14.19.1
steps:
- checkout
- run:
name: Download Project File
command: curl << pipeline.parameters.project-url >> --output build/tmp.zip
When I pass through a URL like this:
https://storage.googleapis.com/project.appspot.com/user_uploads/test/projects/test/project.zip?GoogleAccessId=project%40appspot.gserviceaccount.com&Expires=17017600&Signature=mNtazJLvfMXOw6rnzcxUCmgVU8prTGv%2dQcE5KCz4D08vHh3k%2B9ppsTmuW9WhpK8KA2UhDjohWjVq4ITGoOQ%2FRsw%2BFfdurVGGCD1am00FW%2FdEbRxgYiqEAcGW%2F9pAe%2FudeReWZNzZC8QGhVxBvlZ3Fm2HKTkGobRqOEVeayUV%2B8wiIJVCjnB9ewlE2WT8hYAJWXPd1Pm9Bcjd2RTiqmwhQ4%2Fe6xlWg7liexPJUEFCrft0YBJkbWWOjbzy8mp%2Fbsgjt%2B3iCMF2MF%2Fvh%2FuSUPCQ%3D%3D
I get an error: /bin/bash: --output: command not found
If I use an URL like this:
https://firebasestorage.googleapis.com/v0/b/project.appspot.com/o/user_uploads%2FnO1zNY9JO9boxQagw2%2Fprojects%2FCGzf6GM8g88YWC.zip\?alt\=media\&token\=e50cfa59-c723-488f-9d11-2c2ac7ac
Then I don't have any issues.
What could be the problem here? I have tried to encode/decode the URL, added parameters at the end so it doesn't end in "==", and many other things.
Thanks for the help.
Thanks to yaningo:
Parameters needed to be enclosed in double quotes.
curl "<< pipeline.parameters.project-url >>" --output build/tmp.zip
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.