Sha256: dc53230d8acffcee09b06114caf94f660201f04f0abcb2c901a9adac48ada8b8
Contents?: true
Size: 1.04 KB
Versions: 6
Compression:
Stored size: 1.04 KB
Contents
#!/usr/bin/env bash set -x set -e name=bjn-inventory project="$(basename `pwd`)" distro=${BUILD_DISTRIBUTION:-xenial} artifacts="${1:-tasks/package/artifacts}" artifacts_vol_in_docker="${artifacts_vol_in_docker:-/artifacts}" package=$(cd $artifacts && ls -1 -t *.deb | head -1) task_name="${2:-$project-validate-package-$(date +%s)}" base_image="${3:-ubuntu:$distro}" dockerfile="${4:-tasks/package/ValidationDockerfile}" rm -f "${dockerfile}" cat << DOCKERFILE > "${dockerfile}" FROM ${base_image} MAINTAINER BJN Ops Tools <tools@bluejeans.com> ENV DEBIAN_FRONTEND=noninteractive ARG BUILD_NUMBER=${BUILD_NUMBER:-1} COPY . /build VOLUME ${artifacts_vol_in_docker} RUN cd /build && \ tasks/package/_validate.sh "${package}" "${name}" "${artifacts}" DOCKERFILE cleanup() { docker stop "$task_name" docker rm "$task_name" docker rmi "$task_name" rm "${dockerfile}" } trap cleanup EXIT docker pull "$base_image" docker build -t "$task_name" -f "$dockerfile" . docker run --name "$task_name" -dt "$task_name" || echo rm -f "${artifacts}/${package}"
Version data entries
6 entries across 6 versions & 1 rubygems