61 changed files with 64 additions and 190 deletions
@ -1,10 +0,0 @@
@@ -1,10 +0,0 @@
|
||||
= Spring Boot Test Builder |
||||
|
||||
This directory contains a Cloud Native Buildpacks https://buildpacks.io/docs/concepts/components/builder/[builder] and https://buildpacks.io/docs/concepts/components/buildpack/[buildpack] that is used by integration tests to verify the behavior of the Spring Boot build plugins. |
||||
|
||||
== Creating the builder |
||||
|
||||
* Install the https://buildpacks.io/docs/install-pack/[pack CLI] |
||||
* Authenticate to projects.registry.vmware.com through `docker login` |
||||
* Use the `build.sh` create the necessary images and push them to the registry |
||||
|
||||
@ -1,15 +0,0 @@
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash |
||||
set -x -eo pipefail |
||||
|
||||
docker pull paketobuildpacks/build:tiny-cnb |
||||
docker tag paketobuildpacks/build:tiny-cnb projects.registry.vmware.com/springboot/build:tiny-cnb |
||||
docker push projects.registry.vmware.com/springboot/build:tiny-cnb |
||||
|
||||
docker pull paketobuildpacks/run:tiny-cnb |
||||
docker tag paketobuildpacks/run:tiny-cnb projects.registry.vmware.com/springboot/run:tiny-cnb |
||||
docker push projects.registry.vmware.com/springboot/run:tiny-cnb |
||||
|
||||
cd builder |
||||
pack builder create projects.registry.vmware.com/springboot/spring-boot-cnb-builder:0.0.2 --config builder.toml |
||||
docker push projects.registry.vmware.com/springboot/spring-boot-cnb-builder:0.0.2 |
||||
cd - |
||||
@ -1,21 +0,0 @@
@@ -1,21 +0,0 @@
|
||||
# Buildpacks to include in builder |
||||
[[buildpacks]] |
||||
id = "spring-boot/test-info" |
||||
version = "0.0.2" |
||||
uri = "../buildpacks/test-info" |
||||
|
||||
# Order used for detection |
||||
[[order]] |
||||
[[order.group]] |
||||
id = "spring-boot/test-info" |
||||
version = "0.0.2" |
||||
|
||||
# Stack that will be used by the builder |
||||
[stack] |
||||
id = "io.paketo.stacks.tiny" |
||||
build-image = "projects.registry.vmware.com/springboot/build:tiny-cnb" |
||||
run-image = "projects.registry.vmware.com/springboot/run:tiny-cnb" |
||||
|
||||
# Lifecycle executable version that will be used by the builder |
||||
[lifecycle] |
||||
version = "0.15.3" |
||||
@ -1,37 +0,0 @@
@@ -1,37 +0,0 @@
|
||||
#!/usr/bin/env bash |
||||
set -eo pipefail |
||||
|
||||
echo "---> Test Info buildpack building" |
||||
|
||||
# INPUT ARGUMENTS |
||||
platform_dir=$2 |
||||
env_dir=${platform_dir}/env |
||||
bindings_dir=${platform_dir}/bindings |
||||
|
||||
if [[ -f ${env_dir}/FORCE_FAILURE ]]; then |
||||
echo "Forced builder failure" |
||||
exit 1 |
||||
fi |
||||
|
||||
if compgen -G "${env_dir}/*" > /dev/null; then |
||||
for var in ${env_dir}/*; do |
||||
echo "env: $(basename ${var})=$(<${var})" |
||||
done |
||||
fi |
||||
|
||||
if compgen -G "${bindings_dir}/*" > /dev/null; then |
||||
for binding in ${bindings_dir}/*; do |
||||
for f in ${binding}/*; do |
||||
echo "binding: $(basename ${binding})/$(basename ${f})=$(<${f})" |
||||
done |
||||
done |
||||
fi |
||||
|
||||
echo "META-INF/MANIFEST.MF: " |
||||
if [[ -f META-INF/MANIFEST.MF ]]; then |
||||
cat META-INF/MANIFEST.MF |
||||
fi |
||||
|
||||
echo "Network status: $(curl --silent --head https://spring.io | grep -E '^HTTP' || echo "curl failed")" |
||||
|
||||
echo "---> Test Info buildpack done" |
||||
@ -1,28 +0,0 @@
@@ -1,28 +0,0 @@
|
||||
#!/usr/bin/env bash |
||||
set -eo pipefail |
||||
|
||||
# 1. CHECK IF APPLICABLE |
||||
if [[ ! -f META-INF/MANIFEST.MF ]]; then |
||||
exit 100 |
||||
fi |
||||
|
||||
# 2. GET ARGS |
||||
plan_path=$2 |
||||
|
||||
# 3. DECLARE DEPENDENCIES (OPTIONAL) |
||||
cat >> "${plan_path}" <<EOL |
||||
# Buildpack provides this dependency |
||||
# |
||||
# NOTE: The dependency is provided during the 'build' process. |
||||
# |
||||
[[provides]] |
||||
name = "test-info" |
||||
|
||||
# Buildpack requires this dependency |
||||
# |
||||
# NOTE: Everything aside from 'name' is simply additional information that the providing buildpack can use to resolve |
||||
# the dependency. |
||||
# |
||||
[[requires]] |
||||
name = "test-info" |
||||
EOL |
||||
@ -1,13 +0,0 @@
@@ -1,13 +0,0 @@
|
||||
# Buildpack API version |
||||
api = "0.8" |
||||
|
||||
# Buildpack ID and metadata |
||||
[buildpack] |
||||
id = "spring-boot/test-info" |
||||
version = "0.0.2" |
||||
name = "Spring Boot Test Info Buildpack" |
||||
homepage = "https://github.com/spring-projects/spring-boot" |
||||
|
||||
# Stacks that the buildpack will work with |
||||
[[stacks]] |
||||
id = "io.paketo.stacks.tiny" |
||||
Loading…
Reference in new issue