Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add curl cloud builder #242

Merged
merged 3 commits into from Apr 25, 2018

Conversation

Projects
None yet
3 participants
@palmerj3
Copy link
Contributor

palmerj3 commented Mar 26, 2018

Add curl cloud builder. Based off the wget cloud builder.

@rovolution

This comment has been minimized.

Copy link

rovolution commented Mar 26, 2018

👍


# GET data from a server, specifying an Authorization header.
- name: gcr.io/$PROJECT_ID/curl
args: ['-O=file.out', '--header="Authorization: Bearer foobar"', 'https://www.example.com']

This comment has been minimized.

@ImJasonH

ImJasonH Mar 26, 2018

Member

This invocation fails for me, which means the cloudbuild.yaml will not build successfully. Can you pass the flags curl expects, and make sure the file builds cleanly?

This comment has been minimized.

@palmerj3

palmerj3 Mar 26, 2018

Author Contributor

Sure!

This comment has been minimized.

@palmerj3

palmerj3 Mar 26, 2018

Author Contributor

@ImJasonH should be good now

@palmerj3 palmerj3 force-pushed the palmerj3:addCurl branch from f87cb85 to 3d72d6e Mar 26, 2018

@rovolution

This comment has been minimized.

Copy link

rovolution commented Mar 27, 2018

@palmerj3 reminder to update the main README and add it to the list - https://github.com/GoogleCloudPlatform/cloud-builders/blob/master/README.md

@palmerj3

This comment has been minimized.

Copy link
Contributor Author

palmerj3 commented Mar 27, 2018

ping @ImJasonH for one last review

@rovolution

This comment has been minimized.

Copy link

rovolution commented Mar 30, 2018

any progress on this getting merged? Thanks!

@ImJasonH

This comment has been minimized.

Copy link
Member

ImJasonH commented Mar 30, 2018

I checked this out locally to try to build it, and got:

Step #2: Already have image: gcr.io/test-argo/curl
Step #2: curl: option --header="Authorization: Bearer foobar": is unknown
Step #2: curl: try 'curl --help' or 'curl --manual' for more information

I got it to work by changing the last steps to:

# GET data from a server, specifying an Authorization header.
- name: gcr.io/$PROJECT_ID/curl
  args: ['-o', 'file.out', "--header", "Authorization: Bearer foobar'", 'https://www.example.com']

# POST information to a server, specifying a Content-type header.
- name: gcr.io/$PROJECT_ID/curl
  args: ['--header', 'Content-type: application/json"', '--data', '"{\"buildID\": \"$BUILD_ID\"}"', 'https://www.example.com']
@ImJasonH

This comment has been minimized.

Copy link
Member

ImJasonH commented Apr 25, 2018

@palmerj3 I've pushed a commit to fix your cloudbuild.yaml, let me know if you'd like to make any other changes, or if you don't need this image after all.

@palmerj3

This comment has been minimized.

Copy link
Contributor Author

palmerj3 commented Apr 25, 2018

@ImJasonH thank you! It's not mission critical but would definitely help engineers if it were available :)

I don't have any further changes to request.

Thanks again

@palmerj3

This comment has been minimized.

Copy link
Contributor Author

palmerj3 commented Apr 25, 2018

LGTM

@ImJasonH ImJasonH merged commit 55157c6 into GoogleCloudPlatform:master Apr 25, 2018

1 check passed

cla/google All necessary CLAs are signed

@palmerj3 palmerj3 deleted the palmerj3:addCurl branch Apr 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.