Skip to content

Commit

Permalink
Master build only tags dev release
Browse files Browse the repository at this point in the history
  • Loading branch information
soffokl committed Oct 4, 2018
1 parent be2f023 commit 0e667ed
Showing 1 changed file with 8 additions and 29 deletions.
37 changes: 8 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ cache:
- vendor

stages:
- name: dep-cache
if: tag != dev
- name: test
if: tag != dev
- dep-cache
- test
- name: build
if: (type != pull_request AND branch = master AND tag IS blank) OR (tag IS present AND tag != dev)
if: (type != pull_request AND branch = master AND tag IS blank) OR tag IS present
- name: release-dev
if: type != pull_request AND branch = master AND tag IS blank
- name: release
if: tag IS present AND tag != dev
if: tag IS present

jobs:
include:
Expand Down Expand Up @@ -94,31 +92,11 @@ jobs:
name: "Ubuntu docker image"

# Development bleeding-edge release (on master commits only)
- stage: release-dev
script: bin/s3 sync s3://build-artifacts build/package
name: "Update for build-artifacts"
before_deploy:
- stage: release-dev-tag
script:
- git tag -f dev
- git remote add gh https://${TRAVIS_REPO_SLUG%/*}:${GIT_RELEASES_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git
- git push -f gh dev
- git remote remove gh
deploy:
provider: releases
file_glob: true
file: build/package/*
skip_cleanup: true
api_key: "$GIT_RELEASES_API_KEY"
prerelease: true
overwrite: true
on:
branch: master

- script:
- bin/s3 sync s3://docker-images build/docker
- docker load -i build/docker/myst_alpine.tgz
- docker load -i build/docker/myst_ubuntu.tgz
- bin/release_docker dev
name: "Pushing dev docker images"

- script:
- bin/release_goreport
Expand All @@ -140,7 +118,8 @@ jobs:
- bin/s3 sync s3://docker-images build/docker
- docker load -i build/docker/myst_alpine.tgz
- docker load -i build/docker/myst_ubuntu.tgz
- bin/release_docker $TRAVIS_TAG latest
- bin/release_docker $TRAVIS_TAG
- if [ "$TRAVIS_TAG" != "dev" ]; then bin/release_docker latest; fi
name: "Pushing release to hub.docker.com"

notifications:
Expand Down

0 comments on commit 0e667ed

Please sign in to comment.