-
Notifications
You must be signed in to change notification settings - Fork 55
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 support for cf curl
#79
Comments
I'm curious as to how you would use this in a pipeline. Do you have an example pipeline.yml that might show how you would use |
Sure @patrickcrocker Use case:Using I came up with 4 possible options ordered by ~complexity (minus most basic usage) and personally actually made me think that Sample usage:pipeline:
- put: apply-config-file
resource: cf-env
params:
cf_home: cf-deployer-development
space: ((cf-space-development))
commands:
- command: curl
requests: >
# Options:
# 1. One request per line
/v2/route_mappings -X POST -d '{"app_guid": "someUUID", "route_guid": "someOtherUUID", "app_port": 9000}'
/v2/route_mappings -X POST -d '{"app_guid": "someUUID", "route_guid": "someOtherUUID", "app_port": 9000}'
# 2. Using pipe operator to allow command chaining
/v2/route_mappings -X POST -d '{"app_guid": "someUUID", "route_guid": "someOtherUUID", "app_port": 9000}' &&
/v2/route_mappings -X POST -d '{"app_guid": "someUUID", "route_guid": "someOtherUUID", "app_port": 9000}'
# 3. Allow for shell execution with cf-cli in path to able to execute more complex commands
# Note: since this pattern allows for even more flexibility, the command name should be different eg shell
cf curl /v2/route_mappings -X POST -d '{"app_guid": "$(cf app service-discovery-dev --guid)", "route_guid": "someOtherUUID", "app_port": 9000}' |
cf curl /v2/route_mappings -X POST -d '{"app_guid": "someUUID", "route_guid": "someOtherUUID", "app_port": 9000}'
# 4. Allow for raw shell script execution with cf-cli in path to able to execute even more complex manipulations against CF
script_file: ((program-source-master))/ci/post-configure-deployment.sh Thoughts? |
Thanks for the use case! Rather than introduce something generic like the
I've opened #83 to track this feature request. |
Some of the CF functionalities are exposed only via CF REST endpoints.
To configure them one can use CF CLI's
cf curl ...
eg:This is to add support for
cf curl
tocf-cli-resource
.The text was updated successfully, but these errors were encountered: