@elench/testkit 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,8 @@ set -eo pipefail
6
6
  export PATH="$PATH:/snap/bin:$HOME/.fly/bin"
7
7
 
8
8
  STATE_DIR="${STATE_DIR:-.state}"
9
- API_DIR="$(cd "${API_DIR:?API_DIR required — set to the service directory containing the Dockerfile}" && pwd)"
9
+ API_DIR="$(cd "${API_DIR:?API_DIR required — set to the product directory}" && pwd)"
10
+ DOCKERFILE_DIR="$(cd "${DOCKERFILE_DIR:-$API_DIR}" && pwd)"
10
11
  FLY_APP="${FLY_APP:?FLY_APP required}"
11
12
 
12
13
  SHORT_SHA=$(git -C "$API_DIR" rev-parse --short HEAD)
@@ -44,7 +45,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44
45
  bash "$SCRIPT_DIR/fly-app-ensure.sh"
45
46
 
46
47
  echo "Building image: $IMAGE"
47
- docker build -t "$IMAGE" -f "$API_DIR/Dockerfile" "$API_DIR"
48
+ docker build -t "$IMAGE" -f "$DOCKERFILE_DIR/Dockerfile" "$API_DIR"
48
49
 
49
50
  echo "Pushing to Fly registry..."
50
51
  fly auth docker
package/lib/runner.mjs CHANGED
@@ -49,6 +49,7 @@ export async function build(config) {
49
49
  FLY_APP: tk.fly.app,
50
50
  FLY_ORG: tk.fly.org,
51
51
  API_DIR: productDir,
52
+ DOCKERFILE_DIR: tk.dockerfile ? path.join(productDir, tk.dockerfile) : productDir,
52
53
  STATE_DIR: stateDir,
53
54
  });
54
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elench/testkit",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "CLI for running k6 tests against real, ephemeral infrastructure",
5
5
  "type": "module",
6
6
  "bin": {