crhntr / hello-tile

An example pivotal tile using Kiln.
MIT License
1 stars 3 forks source link

`kiln test` fails #4

Open mamachanko opened 2 months ago

mamachanko commented 2 months ago

Fwiw I don't quite know what I am doing, but I was hoping hello-tile would allow me to produce an example .pivotal file.

After a pristine checkout, kiln test fails as follows:

❯ kiln test
kiln test: 2024/08/26 10:27:38 connecting to ssh socket "*****"
kiln test: 2024/08/26 10:27:38 ensuring ssh agent keys are configured
kiln test: 2024/08/26 10:27:38 pinging docker daemon
kiln test: 2024/08/26 10:27:38 completed session setup
kiln test: 2024/08/26 10:27:38 creating test image
kiln test: 2024/08/26 10:27:42 creating test container
kiln test: 2024/08/26 10:27:42 created test container with id 77edcdf441c9ef7eb1b333ca45f6e6fa4833a743845ab3b9d13c7ab7f9a57a32
/bin/bash: line 1: cd: /tas/hello-tile/migrations: No such file or directory
2024/08/26 10:27:42 could not execute "test": Error response from daemon: No such container: 77edcdf441c9ef7eb1b333ca45f6e6fa4833a743845ab3b9d13c7ab7f9a57a32
failed to stop container: Error response from daemon: No such container: 77edcdf441c9ef7eb1b333ca45f6e6fa4833a743845ab3b9d13c7ab7f9a57a32

After bootstrapping ./migrations with a plain package.json:

{
  "name": "migrations",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"hello, kiln test\""
  },
  "author": "",
  "license": "ISC"
}

it still fails:

❯ kiln test
kiln test: 2024/08/26 10:29:37 connecting to ssh socket "*****"
kiln test: 2024/08/26 10:29:37 ensuring ssh agent keys are configured
kiln test: 2024/08/26 10:29:37 pinging docker daemon
kiln test: 2024/08/26 10:29:37 completed session setup
kiln test: 2024/08/26 10:29:37 creating test image
kiln test: 2024/08/26 10:29:40 creating test container
kiln test: 2024/08/26 10:29:40 created test container with id 216225e30b47968d1bebf3fa7f595fc0c8d5cc078ee68d3090fb2cae0456e075

up to date, audited 1 package in 105ms

found 0 vulnerabilities

> migrations@1.0.0 test
> echo "hello, kiln test"

hello, kiln test
=== RUN   TestManifest
Reading release manifests...
Reading stemcell criteria from Kilnfile.lock
Encoding icon...
2024/08/26 08:29:43 could not execute "bake": failed when rendering a template: base.yml:3:10: executing "base.yml" at <variable "label">: error calling variable: could not find variable with key 'label'
    manifest_test.go:18:
                Error Trace:    /tas/hello-tile/test/manifest/manifest_test.go:115
                                                        /tas/hello-tile/test/manifest/manifest_test.go:68
                                                        /tas/hello-tile/test/manifest/manifest_test.go:18
                Error:          Received unexpected error:
                                exit status 1
                Test:           TestManifest
                Messages:       failed to run kiln bake
--- FAIL: TestManifest (0.02s)
FAIL

Ginkgo ran 1 suite in 2.149602006s
Test Suite Failed
2024/08/26 10:29:43 could not execute "test": test failed with exit code 1

At this point I gave up.

crhntr commented 2 months ago

Thank you for looking into this.

I need to add a bake_configuration to the Kilnfile would fix this but I am not getting the tests to pass either. Kiln is failing to connect to Docker in the first place on my machine.