spack/share/spack/packages/build-image.sh
Axel Huebl d4008db75d
CD: Package Index (#11665)
Build the docker image for the new package index REST API on each
merge/push to develop and master.
2019-06-10 18:21:33 +02:00

18 lines
434 B
Bash
Executable File

#!/usr/bin/env bash
#
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
script="$( basename "$0" )"
cd "$( dirname "$0" )"
export IMAGE="spack/packages.spack.io:latest"
if [ "$script" '=' 'push-image.sh' ] ; then
docker push "${IMAGE}"
else
docker build -f -t "${IMAGE}" .
fi