forked from doccano/doccano
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add continuous delivery of images to DockerHub
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 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,7 +1,15 @@ | ||
language: python | ||
services: | ||
- docker | ||
python: | ||
- "3.6" | ||
install: | ||
- pip install -r requirements.txt | ||
script: | ||
- tools/ci.sh | ||
deploy: | ||
- provider: script | ||
script: tools/cd.sh | ||
on: | ||
repo: chakki-works/doccano | ||
tags: true |
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,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ -z "${DOCKER_USERNAME}" ]]; then echo "Missing DOCKER_USERNAME environment variable" >&2; exit 1; fi | ||
if [[ -z "${DOCKER_PASSWORD}" ]]; then echo "Missing DOCKER_PASSWORD environment variable" >&2; exit 1; fi | ||
if [[ -z "${TRAVIS_TAG}" ]]; then echo "Missing TRAVIS_TAG environment variable" >&2; exit 1; fi | ||
|
||
set -o errexit | ||
|
||
docker build -t "${DOCKER_USERNAME}/doccano:latest" . | ||
docker build -t "${DOCKER_USERNAME}/doccano:${TRAVIS_TAG}" . | ||
|
||
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin | ||
|
||
docker push "${DOCKER_USERNAME}/doccano:latest" | ||
docker push "${DOCKER_USERNAME}/doccano:${TRAVIS_TAG}" |