Browse Source

Push successful builds in travis to dockerhub

tempestpy_adaptions
Matthias Volk 7 years ago
parent
commit
91a9f5622f
  1. 8
      .travis.yml
  2. 12
      travis/generate_travis.py

8
.travis.yml

@ -291,6 +291,10 @@ jobs:
- docker cp storm:/storm/. .
after_failure:
- find build -iname '*err*.log' -type f -print -exec cat {} \;
after_success:
- docker login -u '$DOCKER_USERNAME' -p '$DOCKER_PASSWORD';
- docker tag storm mvolk/storm-debug:travis;
- docker push mvolk/storm-debug:travis;
- stage: Test all
os: linux
compiler: gcc
@ -303,4 +307,8 @@ jobs:
- docker cp storm:/storm/. .
after_failure:
- find build -iname '*err*.log' -type f -print -exec cat {} \;
after_success:
- docker login -u '$DOCKER_USERNAME' -p '$DOCKER_PASSWORD';
- docker tag storm mvolk/storm:travis;
- docker push mvolk/storm:travis;

12
travis/generate_travis.py

@ -119,6 +119,18 @@ if __name__ == "__main__":
buildConfig += " - docker cp storm:/storm/. .\n"
buildConfig += " after_failure:\n"
buildConfig += " - find build -iname '*err*.log' -type f -print -exec cat {} \;\n"
# Upload to dockerhub
if stage[1] == "TestAll":
buildConfig += " after_success:\n"
buildConfig += " - docker login -u '$DOCKER_USERNAME' -p '$DOCKER_PASSWORD';\n"
if "Debug" in build:
buildConfig += " - docker tag storm mvolk/storm-debug:travis;\n"
buildConfig += " - docker push mvolk/storm-debug:travis;\n"
elif "Release" in build:
buildConfig += " - docker tag storm mvolk/storm:travis;\n"
buildConfig += " - docker push mvolk/storm:travis;\n"
else:
assert False
s += buildConfig
print(s)
Loading…
Cancel
Save