Skip to content

Commit 6cbdc5a

Browse files
author
Martin Kjellstrand
authored
Test out the new cd-ci-glue library for updating the docker hub description. (#3)
* Parallellize builds using Travis "matrix" functionality. * Test out the new cd-ci-glue library for updating the docker hub description.
1 parent 4809da0 commit 6cbdc5a

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

.travis.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1-
sudo: required
1+
env:
2+
matrix:
3+
- DIST=lenny
4+
- DIST=etch
5+
- DIST=squeeze
26

7+
language: c
8+
sudo: required
39
services:
410
- docker
511

612
before_install:
7-
- if [[ "${TRAVIS_BRANCH}" == "master" ]] ; then
8-
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin ;
9-
fi
10-
13+
- source <(curl https://raw.githubusercontent.com/madworx/cd-ci-glue/master/src/cd-ci-glue.bash)
14+
1115
script:
12-
- for DIST in lenny etch squeeze ; do
13-
make DEBIAN_VERSION=${DIST} &&
14-
if [[ "${TRAVIS_BRANCH}" == "master" ]] ; then
15-
make DEBIAN_VERSION=${DIST} push ;
16-
fi
17-
done
16+
- (make DEBIAN_VERSION=${DIST} &&
17+
is_travis_master_push &&
18+
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin &&
19+
make DEBIAN_VERSION=${DIST} push) || true
20+
21+
jobs:
22+
include:
23+
- stage: Publish project description to Docker hub
24+
env: DIST
25+
script:
26+
- is_travis_master_push &&
27+
dockerhub_set_description madworx/debian-archive README.md || true

build-archived-debian-image.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ CURRENTLAST="$(docker inspect --format='{{ index .Config.Labels "last_modified_s
2020

2121
if [ "x${CURRENTLAST}" == "x${LASTMOD}" ] ; then
2222
echo "Rebuild not needed - upstream has last modification ${LASTMOD}."
23+
exit 1
2324
else
2425
#
2526
# We cannot build in one step, since the debootstrap process needs

0 commit comments

Comments
 (0)