Push without resource matching (or routes, or really anything else) - cloudfoundry/cloud_controller_ng GitHub Wiki
Resource matching can timeout and block app pushing (for example pushing apps with lots of files with a degraded blobstore). The following script will let you push an app without resource matching.
# Usage
# =========
# 1) cd to your app directory
# 2) ./mini-push.sh <space_name> <app_name> <api_url>
# 3) Wait a hot minute
set -ex
space_name=$1
app_name=$2
api_url=$3
space_guid=`cf space ${space_name} --guid`
cf curl /v2/apps -X POST -d "{\"name\":\"${app_name}\",\"space_guid\":\"${space_guid}\"}"
app_guid=`cf app ${app_name} --guid`
zip -r my-app.zip *
curl -X PUT ${api_url}/v2/apps/${app_guid}/bits -F application=@"my-app.zip" -F resources=[] -H "Authorization: `cf oauth-token | grep bearer`"
cf curl -X PUT /v2/apps/$app_guid -d '{"state":"STARTED"}'