Skip to content

Commit 663aaf2

Browse files
authored
Merge pull request #27 from brianhlin/fix-travis-ci-builds
Fix Travis CI builds
2 parents 8e88db1 + dac9b96 commit 663aaf2

File tree

4 files changed

+21
-12
lines changed

4 files changed

+21
-12
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
services:
22
- docker
33

4+
env:
5+
- DOCKER_ORG='opensciencegrid' DOCKER_REPOS='xcache stash-cache stash-origin atlas-xcache cms-xcache'
6+
47
script:
5-
- ./travis/build_docker.sh
6-
- ./travis/test_stashcache_origin.sh
7-
- ./travis/test_stashcache.sh
8-
- ./travis/push_docker.sh
8+
- ./travis/travis-wrapper.sh
99

1010
branches:
1111
only:

travis/build_docker.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
#!/bin/bash -xe
22
# Script for building and pushing XCache docker images
33

4-
org='opensciencegrid'
5-
timestamp=`date +%Y%m%d-%H%M`
6-
docker_repos='xcache stash-cache stash-origin atlas-xcache cms-xcache'
4+
timestamp="$1"
75

8-
for repo in $docker_repos; do
6+
for repo in $DOCKER_REPOS; do
97
docker build \
10-
-t $org/$repo:fresh \
11-
-t $org/$repo:$timestamp \
8+
-t $DOCKER_ORG/$repo:fresh \
9+
-t $DOCKER_ORG/$repo:$timestamp \
1210
$repo
1311
done
1412

travis/push_docker.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ if [[ "${TRAVIS_PULL_REQUEST}" != "false" ]]; then
66
exit 0
77
fi
88

9+
timestamp="$1"
10+
911
# Credentials for docker push
1012
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
1113

12-
for repo in $docker_repos; do
14+
for repo in $DOCKER_REPOS; do
1315
for tag in $timestamp fresh; do
14-
docker push $org/$repo:$tag
16+
docker push $DOCKER_ORG/$repo:$tag
1517
done
1618
done

travis/travis-wrapper.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash -xe
2+
# Wrapper script for building and testing XCache container images
3+
4+
timestamp=`date +%Y%m%d-%H%M`
5+
6+
./travis/build_docker.sh $timestamp
7+
./travis/test_stashcache_origin.sh
8+
./travis/test_stashcache.sh
9+
./travis/push_docker.sh $timestamp

0 commit comments

Comments
 (0)