diff --git a/buildpack.toml b/buildpack.toml index 9d7a3e32..efba8d08 100644 --- a/buildpack.toml +++ b/buildpack.toml @@ -19,6 +19,11 @@ api = "0.7" optional = true version = "3.6.3" + [[order.group]] + id = "paketo-buildpacks/watchexec" + optional = true + version = "2.8.3" + [[order.group]] id = "paketo-buildpacks/php-dist" version = "2.1.12" @@ -81,6 +86,11 @@ api = "0.7" optional = true version = "3.6.3" + [[order.group]] + id = "paketo-buildpacks/watchexec" + optional = true + version = "2.8.3" + [[order.group]] id = "paketo-buildpacks/php-dist" version = "2.1.12" diff --git a/integration/httpd_test.go b/integration/httpd_test.go index f028ab04..d18614eb 100644 --- a/integration/httpd_test.go +++ b/integration/httpd_test.go @@ -116,9 +116,10 @@ func testPhpHttpd(t *testing.T, context spec.G, it spec.S) { WithBuildpacks(phpBuildpack). WithPullPolicy("never"). WithEnv(map[string]string{ - "BP_PHP_SERVER": "httpd", - "BPE_SOME_VARIABLE": "stew-peas", - "BP_IMAGE_LABELS": "cool-label=cool-value", + "BP_PHP_SERVER": "httpd", + "BPE_SOME_VARIABLE": "stew-peas", + "BP_IMAGE_LABELS": "cool-label=cool-value", + "BP_LIVE_RELOAD_ENABLED": "true", }). Execute(name, source) Expect(err).NotTo(HaveOccurred(), logs.String()) @@ -133,6 +134,7 @@ func testPhpHttpd(t *testing.T, context spec.G, it spec.S) { Eventually(container).Should(Serve(ContainSubstring("SUCCESS: date loads.")).OnPort(8080).WithEndpoint("/index.php?date")) Expect(logs).To(ContainLines(ContainSubstring("web: php-fpm -y $PHP_FPM_PATH & httpd -f $PHP_HTTPD_PATH -k start -DFOREGROUND && echo hi"))) + Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Watchexec"))) Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for CA Certificates"))) Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for PHP Distribution"))) Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Composer"))) @@ -144,8 +146,8 @@ func testPhpHttpd(t *testing.T, context spec.G, it spec.S) { Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Environment Variables"))) Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Image Labels"))) - Expect(image.Buildpacks[9].Key).To(Equal("paketo-buildpacks/environment-variables")) - Expect(image.Buildpacks[9].Layers["environment-variables"].Metadata["variables"]).To(Equal(map[string]interface{}{"SOME_VARIABLE": "stew-peas"})) + Expect(image.Buildpacks[10].Key).To(Equal("paketo-buildpacks/environment-variables")) + Expect(image.Buildpacks[10].Layers["environment-variables"].Metadata["variables"]).To(Equal(map[string]interface{}{"SOME_VARIABLE": "stew-peas"})) Expect(image.Labels["cool-label"]).To(Equal("cool-value")) }) }) diff --git a/integration/nginx_test.go b/integration/nginx_test.go index b5eda587..2839bcf9 100644 --- a/integration/nginx_test.go +++ b/integration/nginx_test.go @@ -116,9 +116,10 @@ func testPhpNginx(t *testing.T, context spec.G, it spec.S) { WithBuildpacks(phpBuildpack). WithPullPolicy("never"). WithEnv(map[string]string{ - "BP_PHP_SERVER": "nginx", - "BPE_SOME_VARIABLE": "fish-n-chips", - "BP_IMAGE_LABELS": "cool-label=cool-value", + "BP_PHP_SERVER": "nginx", + "BPE_SOME_VARIABLE": "fish-n-chips", + "BP_IMAGE_LABELS": "cool-label=cool-value", + "BP_LIVE_RELOAD_ENABLED": "true", }). Execute(name, source) Expect(err).NotTo(HaveOccurred(), logs.String()) @@ -133,6 +134,7 @@ func testPhpNginx(t *testing.T, context spec.G, it spec.S) { Eventually(container).Should(Serve(ContainSubstring("SUCCESS: date loads.")).OnPort(8080).WithEndpoint("/index.php?date")) Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for CA Certificates"))) + Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Watchexec"))) Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for PHP Distribution"))) Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Composer"))) Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Composer Install"))) @@ -145,8 +147,8 @@ func testPhpNginx(t *testing.T, context spec.G, it spec.S) { Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Environment Variables"))) Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Image Labels"))) - Expect(image.Buildpacks[9].Key).To(Equal("paketo-buildpacks/environment-variables")) - Expect(image.Buildpacks[9].Layers["environment-variables"].Metadata["variables"]).To(Equal(map[string]interface{}{"SOME_VARIABLE": "fish-n-chips"})) + Expect(image.Buildpacks[10].Key).To(Equal("paketo-buildpacks/environment-variables")) + Expect(image.Buildpacks[10].Layers["environment-variables"].Metadata["variables"]).To(Equal(map[string]interface{}{"SOME_VARIABLE": "fish-n-chips"})) Expect(image.Labels["cool-label"]).To(Equal("cool-value")) }) }) diff --git a/package.toml b/package.toml index a592a797..29308626 100644 --- a/package.toml +++ b/package.toml @@ -49,3 +49,6 @@ [[dependencies]] uri = "urn:cnb:registry:paketo-buildpacks/ca-certificates@3.6.3" + +[[dependencies]] + uri = "urn:cnb:registry:paketo-buildpacks/watchexec@2.8.3"