cf-push-app
Required Inputs
arg name | JSON type | example | description |
app_name | string | ref-app | name of the app |
Optional inputs
arg name | JSON type | example | description |
git_url | string | "https://github.com/cloudfoundry-community/kibana-me-logs.git" | github url |
services | list of string | [ "logstash-space-wide" ] | services to bind |
envs | map (string->string) | { "KIBANA_USERNAME": "kibana_user", "KIBANA_PASSWORD": "REMOVED" } | environment variables to values. if provided, app will be restaged |
stack | string | "cflinuxfs2" | option |
buildpack | string | "https://github.com/heroku/heroku-buildpack-go.git" | buildpack |
memory | string | 500MB | memory flag, defaults to 500MB |
git_relpath_build | string | "app-1/" | relative path for cf push -p flag (app directory, jar, etc), defaults to git root |
git_relpath_deploy | string | "app-2/" | relative path for build directory, defaults to git root |
hostname | string | "app-hostname" | hostname option to cf push, defaults to space/org uniquified app name |
cf_home | string | "/tmp/cf-home-240964" | CF_HOME where login has been issued, defaults to $HOME |
git_branch | string | CORE-4283-sendgrid | git branch to check-out before deployment |
git_skip_pull | boolean | true | whether to skip attempting to pull latest changes, useful for local modification |
if_app_started | string | "push", "restage", "skip" | what to do if app exists and has status 'started'. envs, services are still updated |
Examples:
- push a basic-auth-protected kibana
{ "app_name": "kibana-space-wide", "buildpack": "https://github.com/heroku/heroku-buildpack-go.git", "envs": { "KIBANA_USERNAME": "kibana_user", "KIBANA_PASSWORD": "***REMOVED***" }, "git_url": "https://github.com/cloudfoundry-community/kibana-me-logs.git", "services": [ "logstash-space-wide" ], "stack": "cflinuxfs2" }
- create an app for binding services and extracting credentials only. no push required
{ "app_name": "ref-app", }
Output
output name | JSON type | example | description |
app_guid | string | "f9e82e7f-5f15-4ea9-b499-9ceab30d9660" | app guid |
app_url | string | "https://kibana-me-logs-poc.run.asv-pr.ice.predix.io" | app url (first mapped route) |
app_urls | string | "https://kibana-me-logs-poc.run.asv-pr.ice.predix.io" | app url |
Example:
{ "app_url": "https://kibana-me-logs-poc.run.asv-pr.ice.predix.io", "app_guid": "f9e82e7f-5f15-4ea9-b499-9ceab30d9660" }
Idempotence
The script may be called any number of times. The app will be pushed again if it exists
Notes
- Push hostname is an name, org-space uniquified app name
- The intent of this script is to deploy utility apps like kibana, phpadmin,
and throwaway apps for binding services and extracting credentials, not to compete with CI/CD.