-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from guzman-raphael/travis
Part #3: Add Travis CI for builds and image push
- Loading branch information
Showing
5 changed files
with
32 additions
and
4 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 |
---|---|---|
@@ -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.
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
File renamed without changes.