-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Travis: Build and push Docker image to Docker Hub
- Loading branch information
Showing
5 changed files
with
55 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,41 @@ | ||
sudo: false | ||
stages: | ||
- test | ||
- deploy | ||
|
||
|
||
# For tests | ||
os: linux | ||
addons: | ||
apt: | ||
packages: | ||
- exuberant-ctags | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
addons: | ||
apt: | ||
packages: | ||
- exuberant-ctags | ||
matrix: | ||
include: | ||
- python: 3.7 | ||
dist: xenial | ||
- "3.7" | ||
- "3.8" | ||
- "nightly" | ||
install: | ||
- "pip install ." | ||
- "pip install -r test_requirements.txt" | ||
script: | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "Your Name" | ||
- ./runtests.sh | ||
|
||
|
||
# For deploy | ||
services: | ||
- docker | ||
jobs: | ||
include: | ||
- stage: deploy | ||
script: skip | ||
deploy: | ||
on: | ||
tags: true | ||
provider: script | ||
script: ./build-and-push-docker.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh -eu | ||
|
||
log() { | ||
echo "$@" >&2 | ||
} | ||
|
||
R=jonashaag/klaus | ||
|
||
log "Building klaus==$TRAVIS_TAG" | ||
docker build -t $R:$TRAVIS_TAG --build-arg KLAUS_VERSION=$TRAVIS_TAG . | ||
|
||
log "Logging in to Docker Hub" | ||
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | ||
|
||
log "Pushing to :$TRAVIS_TAG" | ||
docker push $R:$TRAVIS_TAG | ||
if test "$(git tag | grep '^[0-9]' | sort -V | tail -n1)" = "$TRAVIS_TAG"; then | ||
log "Pushing to :latest" | ||
docker tag $R:$TRAVIS_TAG $R:latest | ||
docker push $R:latest | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ def install_data_files_hack(): | |
|
||
setup( | ||
name='klaus', | ||
version='1.5.0', | ||
version='1.5.1', | ||
author='Jonas Haag', | ||
author_email='[email protected]', | ||
packages=['klaus', 'klaus.contrib'], | ||
|