Sha256: c15257fd8a5f419110e2c2f5c6570e7c07beb771c16950d7e3c0429bec1a8381

Contents?: true

Size: 543 Bytes

Versions: 17

Compression:

Stored size: 543 Bytes

Contents

#!/usr/bin/env bash
set -x
set -e

project="$(basename `pwd`)"
reports="${1:-tasks/test/reports}"
dockerfile="${2:-tasks/test/Dockerfile}"
task_name="${3:-$project-test-$(date +%s)}"
base_image="$(grep '^FROM' "$dockerfile" | awk '{ print $2 }')"

cleanup() {
  docker stop "$task_name"
  docker rm "$task_name"
  docker rmi "$task_name"
}

trap cleanup EXIT

rm -rf "$reports"
docker pull "$base_image"
docker build -t "$task_name" -f "$dockerfile" .
docker run --name "$task_name" -dt "$task_name"
docker cp "$task_name":/reports "$reports"

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
bjn_inventory-1.7.1 tasks/test/run.sh
bjn_inventory-1.7.0 tasks/test/run.sh
bjn_inventory-1.6.1 tasks/test/run.sh
bjn_inventory-1.5.1 tasks/test/run.sh
bjn_inventory-1.3.1 tasks/test/run.sh
bjn_inventory-1.3.0 tasks/test/run.sh
kitchen_hooks-2.1.1 tasks/test/run.sh
kitchen_hooks-2.1.0 tasks/test/run.sh
kitchen_hooks-2.0.2 tasks/test/run.sh
kitchen_hooks-2.0.1 tasks/test/run.sh
kitchen_hooks-2.0.0 tasks/test/run.sh
kitchen_hooks-1.8.11 tasks/test/run.sh
kitchen_hooks-1.8.10 tasks/test/run.sh
kitchen_hooks-1.8.9 tasks/test/run.sh
kitchen_hooks-1.8.8 tasks/test/run.sh
kitchen_hooks-1.8.7 tasks/test/run.sh
kitchen_hooks-1.8.6 tasks/test/run.sh