diff --git a/Makefile b/Makefile index 9c307d15..592f00fe 100644 --- a/Makefile +++ b/Makefile @@ -37,20 +37,26 @@ build-builder-jammy: build-linux-packages build-sample-root build-linux-buildpacks: build-buildpacks-alpine build-buildpacks-jammy build-buildpacks-alpine: build-sample-root + @echo "> Starting local registry to store alpine builder (when builder contains extensions it must exist in a registry so that builds can use --pull-policy=always and we don't want to override the locally built builder)" + docker run -d --rm -p 5000:5000 registry:2 + sleep 2 + docker tag cnbs/sample-builder:alpine localhost:5000/cnbs/sample-builder:alpine + docker push localhost:5000/cnbs/sample-builder:alpine + @echo "> Creating 'hello-moon' app using 'alpine' builder..." - $(PACK_CMD) build sample-hello-moon-app:alpine -v --builder cnbs/sample-builder:alpine --buildpack $(SAMPLES_ROOT)/buildpacks/hello-world --buildpack $(SAMPLES_ROOT)/buildpacks/hello-moon $(PACK_BUILD_FLAGS) + $(PACK_CMD) build sample-hello-moon-app:alpine -v --builder localhost:5000/cnbs/sample-builder:alpine --buildpack $(SAMPLES_ROOT)/buildpacks/hello-world --buildpack $(SAMPLES_ROOT)/buildpacks/hello-moon --network=host @echo "> Creating 'hello-processes' app using 'alpine' builder..." - $(PACK_CMD) build sample-hello-processes-app:alpine -v --builder cnbs/sample-builder:alpine --buildpack $(SAMPLES_ROOT)/buildpacks/hello-processes $(PACK_BUILD_FLAGS) + $(PACK_CMD) build sample-hello-processes-app:alpine -v --builder localhost:5000/cnbs/sample-builder:alpine --buildpack $(SAMPLES_ROOT)/buildpacks/hello-processes --network=host @echo "> Creating 'hello-world' app using 'alpine' builder..." - $(PACK_CMD) build sample-hello-world-app:alpine -v --builder cnbs/sample-builder:alpine --buildpack $(SAMPLES_ROOT)/buildpacks/hello-world $(PACK_BUILD_FLAGS) + $(PACK_CMD) build sample-hello-world-app:alpine -v --builder localhost:5000/cnbs/sample-builder:alpine --buildpack $(SAMPLES_ROOT)/buildpacks/hello-world --network=host @echo "> Creating 'java-maven' app using 'alpine' builder..." - $(PACK_CMD) build sample-java-maven-app:alpine -v --builder cnbs/sample-builder:alpine --path apps/java-maven $(PACK_BUILD_FLAGS) + $(PACK_CMD) build sample-java-maven-app:alpine -v --builder localhost:5000/cnbs/sample-builder:alpine --path apps/java-maven --network=host @echo "> Creating 'kotlin-gradle' app using 'alpine' builder..." - $(PACK_CMD) build sample-kotlin-gradle-app:alpine -v --builder cnbs/sample-builder:alpine --path apps/kotlin-gradle $(PACK_BUILD_FLAGS) + $(PACK_CMD) build sample-kotlin-gradle-app:alpine -v --builder localhost:5000/cnbs/sample-builder:alpine --path apps/kotlin-gradle --network=host build-buildpacks-jammy: build-sample-root @echo "> Creating 'hello-moon' app using 'jammy' builder..." diff --git a/buildpacks/hello-extensions/bin/detect b/buildpacks/hello-extensions/bin/detect index bb79afb8..f6dbedf0 100755 --- a/buildpacks/hello-extensions/bin/detect +++ b/buildpacks/hello-extensions/bin/detect @@ -1,16 +1,25 @@ #!/usr/bin/env bash set -eo pipefail +if [[ -z "${BP_EXT_DEMO}" ]]; then + exit 100 +fi + # 1. GET ARGS plan_path=$2 # 2. DECLARE DEPENDENCIES (OPTIONAL) -cat >> "${plan_path}" <>"${plan_path}" <>"${plan_path}" <