Skip to content

Commit

Permalink
Merge pull request #11 from guzman-raphael/travis
Browse files Browse the repository at this point in the history
Part #3: Add Travis CI for builds and image push
  • Loading branch information
dimitri-yatsenko authored Jul 24, 2019
2 parents 377713e + 4e51a64 commit 139aecd
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
sudo: required
services:
- docker
slim: &slim
stage: Slim
os: linux
language: shell
script:
- docker build --build-arg MYSQL_VER=$MYSQL_VER -t ${DOCKER_USERNAME}/mysql slim/.
- docker rmi mysql:${MYSQL_VER}
- docker tag ${DOCKER_USERNAME}/mysql:latest ${DOCKER_USERNAME}/mysql:${MYSQL_VER}
- docker tag ${DOCKER_USERNAME}/mysql:latest ${DOCKER_USERNAME}/mysql:${MYSQL_VER}-slim
- docker tag ${DOCKER_USERNAME}/mysql:latest ${DOCKER_USERNAME}/mysql:${MYSQL_VER}-slim-${TRAVIS_COMMIT:0:7}
- sh -c "[ \"$MYSQL_VER\" = \"5.7\" ] || docker rmi ${DOCKER_USERNAME}/mysql:latest"
after_success:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker images
- for i in `docker images --format {{.Repository}}:{{.Tag}}`; do docker push $i; done
jobs:
include:
- <<: *slim
env:
- MYSQL_VER: 5.6
- <<: *slim
env:
- MYSQL_VER: 5.7
- <<: *slim
env:
- MYSQL_VER: 8.0
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions slim9.9/docker-compose.yml → slim/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
version: '2.4'

services:
db:
# image: datajoint/mysql:5.6-slim9.9
image: datajoint/mysql:5.7-slim9.9
# image: datajoint/mysql:8.0-slim9.9
# image: datajoint/mysql:5.6
image: datajoint/mysql:5.7
# image: datajoint/mysql:8.0
ports:
- "3306:3306"
environment:
Expand Down
File renamed without changes.

0 comments on commit 139aecd

Please sign in to comment.