Eclectic Media Git klaus / 5f63c04
Travis: Build and push Docker image to Docker Hub Jonas Haag authored 7 months ago Jonas Haag committed 7 months ago
5 changed file(s) with 55 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
0 sudo: false
0 stages:
1 - test
2 - deploy
3
4
5 # For tests
6 os: linux
7 addons:
8 apt:
9 packages:
10 - exuberant-ctags
111 language: python
212 python:
313 - "2.7"
414 - "3.4"
515 - "3.5"
616 - "3.6"
7 addons:
8 apt:
9 packages:
10 - exuberant-ctags
11 matrix:
12 include:
13 - python: 3.7
14 dist: xenial
17 - "3.7"
18 - "3.8"
19 - "nightly"
1520 install:
1621 - "pip install ."
1722 - "pip install -r test_requirements.txt"
1924 - git config --global user.email "you@example.com"
2025 - git config --global user.name "Your Name"
2126 - ./runtests.sh
27
28
29 # For deploy
30 services:
31 - docker
32 jobs:
33 include:
34 - stage: deploy
35 script: skip
36 deploy:
37 on:
38 tags: true
39 provider: script
40 script: ./build-and-push-docker.sh
00 Changelog
11 =========
2
3 1.5.0 (Nov 26, 2019)
4 -------------------
5 - Test release to check Docker pipeline. No changes.
26
37 1.5.0 (Nov 3, 2019)
48 -------------------
0 #!/bin/sh -eu
1
2 log() {
3 echo "$@" >&2
4 }
5
6 R=jonashaag/klaus
7
8 log "Building klaus==$TRAVIS_TAG"
9 docker build -t $R:$TRAVIS_TAG --build-arg KLAUS_VERSION=$TRAVIS_TAG .
10
11 log "Logging in to Docker Hub"
12 echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
13
14 log "Pushing to :$TRAVIS_TAG"
15 docker push $R:$TRAVIS_TAG
16 if test "$(git tag | grep '^[0-9]' | sort -V | tail -n1)" = "$TRAVIS_TAG"; then
17 log "Pushing to :latest"
18 docker tag $R:$TRAVIS_TAG $R:latest
19 docker push $R:latest
20 fi
66 from klaus.repo import FancyRepo, InvalidRepo
77
88
9 KLAUS_VERSION = utils.guess_git_revision() or '1.5.0'
9 KLAUS_VERSION = utils.guess_git_revision() or '1.5.1'
1010
1111
1212 class Klaus(flask.Flask):
1717
1818 setup(
1919 name='klaus',
20 version='1.5.0',
20 version='1.5.1',
2121 author='Jonas Haag',
2222 author_email='jonas@lophus.org',
2323 packages=['klaus', 'klaus.contrib'],