blob: 9030d8169cade645b901adcf68a9a65691cb2ed1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/bash -e
#
# 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)
#
# 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
}
# packages.spack.io service
spack list --format version_json > packages.json
./share/spack/packages/build-image.sh
if [ "$TEST_SUITE" '=' "docker" -a \
"$TRAVIS_EVENT_TYPE" != "pull_request" ] && ensure_docker_login ; then
./share/spack/packages/push-image.sh
fi
|