Added docker to travis build

This commit is contained in:
Benoit Schweblin 2018-03-28 18:22:27 +01:00
parent 88294ffa79
commit 0c97f16587
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,16 @@
language: node_js
node_js:
- "8"
services:
- docker
before_install:
- docker build -t benweet/stackedit .
deploy:
provider: script
script: bash build/docker-push-tag.sh
on:
tags: true

7
build/docker-push-tag.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
docker tag benweet/stackedit "benweet/stackedit:$TRAVIS_TAG"
docker push "benweet/stackedit:$TRAVIS_TAG"
docker tag "benweet/stackedit:$TRAVIS_TAG" benweet/stackedit:latest
docker push benweet/stackedit:latest