diff options
author | Omar Padron <omar.padron@kitware.com> | 2018-12-20 14:17:46 -0500 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-12-20 11:17:46 -0800 |
commit | 60298787e48cb66da96d12a3845e225fd09e88bb (patch) | |
tree | 59ca9b97ad8ce9a28aad34b9609198d274693140 /share/spack/qa | |
parent | 56cb691fccb8d6ecdb583c1279f4ee57e9512884 (diff) | |
download | spack-60298787e48cb66da96d12a3845e225fd09e88bb.tar.gz spack-60298787e48cb66da96d12a3845e225fd09e88bb.tar.bz2 spack-60298787e48cb66da96d12a3845e225fd09e88bb.tar.xz spack-60298787e48cb66da96d12a3845e225fd09e88bb.zip |
Fix docker builds (#9805)
* move docker test logic to share/spack/qa
* update Dockerfile for archlinux
Diffstat (limited to 'share/spack/qa')
-rwxr-xr-x | share/spack/qa/run-docker-tests | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/share/spack/qa/run-docker-tests b/share/spack/qa/run-docker-tests new file mode 100755 index 0000000000..d7d328553d --- /dev/null +++ b/share/spack/qa/run-docker-tests @@ -0,0 +1,48 @@ +#!/bin/bash -e +# +# Copyright 2013-2018 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) + +# +# Description: +# Runs Spack docker tests. This builds a docker image for each of the +# configurations in share/spack/docker/config. +# +# Usage: +# run-docker-tests +# + +__login_attempted=0 +__login_success=1 +ensure_docker_login() { + if [ "$__login_attempted" '!=' '0' ] ; then + return $__login_success + fi + + echo "$DOCKER_PASSWORD" | \ + docker login -u "$DOCKER_USERNAME" --password-stdin + + if [ $? '=' '0' ] ; then + __login_success=0 + fi + + __login_attempted=1 + return $__login_success +} + +for config in share/spack/docker/config/* ; do + source "$config" ; + ./share/spack/docker/build-image.sh; +done + +if [ "$TEST_SUITE" '=' "docker build" -a \ + "$TRAVIS_EVENT_TYPE" != "pull_request" -a \ + ensure_docker_login ] ; then + + for config in share/spack/docker/config/* ; do + source "$config" + ./share/spack/docker/push-image.sh + done +fi |