cf push failure with Unknown flags -d or --domain, --hostname impacting CI/CD pipelines
search cancel

cf push failure with Unknown flags -d or --domain, --hostname impacting CI/CD pipelines

book

Article ID: 431201

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

Automated deployment pipelines are failing and "cf push" command no longer recognizes the "--domain" (or -d) and "--hostname" flags resulting in an "Incorrect Usage" error.

e.g.,

cf push example-app --instances 1 -m 512mb --domain example.com --hostname example-app-test -b hwc_buildpack -s windows --no-manifest --no-start

Environment

VMware Tanzu Application Service

Cause

It appears that in cf v8, some of the parameters such as --domain, -d, --hostname and --route were no longer supported in the 'cf push' command.

Resolution

To accomplish setting the route on the app, you'll have to first run a "cf push" without those parameters, and then map the route afterwards.

e.g.,

# cf push
cf push example-app --instances 1 -m 512mb -b hwc_buildpack -s windows --no-manifest --no-start --no-route
 
# cf map-route
cf map-route example-app example.com --hostname example-app-test