Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit b04c99f

Browse files
committed
add travis-ci
1 parent 46de0f5 commit b04c99f

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
language: python
2+
3+
env:
4+
- SELECT_BUILDS=idp2_core
5+
- SELECT_BUILDS=idp3_core
6+
- SELECT_BUILDS=idp2_full
7+
- SELECT_BUILDS=idp3_full
8+
9+
install: "pip install -r requirements.txt"
10+
11+
sudo: required
12+
13+
services:
14+
- docker
15+
16+
script:
17+
- python -m pytest tests
18+
19+
branches:
20+
only:
21+
- master

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Will build every image.
1313

1414
* copy one of the the existing directories
1515
* edit the dockerfile
16-
* add the directory name in test/test_build.py
16+
* add the directory name in test/test_build.py and .travis.yml
1717
* create a new automated build on docker hub, copying build setting of existing image
1818

1919
## Publishing a new release
@@ -23,7 +23,8 @@ Will build every image.
2323
* Tag with the release name
2424
git tag -a 2017.0.0 -m 'new release'
2525
* On dockerhub, edit build settings for all repos to change build rule that generates the image with the latest tag
26-
* Push changes and tag
26+
* Push changes, this will trigger testing on travis-ci
2727
git push
28+
* When travis-ci testing completes, push the tag
2829
git push origin 2017.0.0
2930
* Check later that all builds have completed on docker hub

tests/test_build.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@ def do_build(dir):
1515
subprocess.check_call('docker run -t %s python -c 1' % tag ,shell=True)
1616

1717
def test_builds():
18-
for dir in ['idp2_core','idp3_core','idp2_full','idp3_full']:
18+
dirs = ['idp2_core','idp3_core','idp2_full','idp3_full']
19+
if 'SELECT_BUILDS' in os.environ:
20+
dirs = os.environ['SELECT_BUILDS'].split(' ')
21+
for dir in dirs:
22+
print('building:',dir)
1923
do_build(dir)

0 commit comments

Comments
 (0)