This topic tells you how to set application-specific default build configuration on Tanzu Platform for Kubernetes.
Before you define application build defaults, you must have a ContainerApp for your application. Create a ContainerApp by running:
tanzu app init
To set or modify a reference to the root of your application’s source code, run:
tanzu app config build path set --app=<APP-NAME> <FILE-PATH>
Where:
<FILE-PATH>
references the root of your application’s source code.<APP-NAME>
references the ContainerApp name defined in tanzu app init
. This argument is optional and defaults to the ContainerApp at the root of your current working directory if no app name is passed.To create non-secret build environment variables, run:
tanzu app config build env-non-secret set --app=<APP-NAME> BP_JAVA_VERSION=10
To remove non-secret build environment variables, run:
tanzu app config build env-non-secret delete --app=<APP-NAME> BP_JAVA_VERSION
To set your application’s default container image build solution, Docker or Buildpacks, run:
tanzu app config build type set --app=<APP-NAME>
? Select container build type to use for this app: [Use arrows to move, type to filter]
> buildpacks
docker