Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
dist: xenial
language: python

services:
- docker

env:
- DOCKER_REGISTRY=docker.io DOCKER_REPOSITORY=huashengdun/webssh

python:
- "2.7"
- "3.4"
Expand All @@ -17,6 +23,26 @@ install:
script:
- pytest --cov=webssh
- flake8

after_success:
- codecov

jobs:
include:
- stage: deploy
script: docker build -t webssh:build .
deploy:
- provider: script
script: >-
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin &&
docker tag webssh:build "${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}:latest" &&
docker push "${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}:latest"
on:
branch: master
- provider: script
script: >-
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" &&
docker tag webssh:build "${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}:$TRAVIS_TAG" &&
docker push "${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}:$TRAVIS_TAG"
on:
tags: true