Skip to content

Commit

Permalink
refactor: run travis in parallel for expo cli v2 and v3
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Jul 22, 2019
1 parent cd33736 commit 882d5f9
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,31 @@ services:
env:
global:
- DOCKER_IMAGE=bycedric/expo-cli
- DOCKER_TAG=2
script:
- docker build base -t $DOCKER_IMAGE:$DOCKER_TAG
- docker run -ti --rm $DOCKER_IMAGE:$DOCKER_TAG diagnostics
- docker build . -t expo/expo-github-action
- docker run -ti --rm expo/expo-github-action diagnostics
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker tag $DOCKER_IMAGE:$DOCKER_TAG $DOCKER_IMAGE:latest
deploy:
provider: script
script: docker push $DOCKER_IMAGE:$DOCKER_TAG && docker push $DOCKER_IMAGE:latest
on:
branch: master
stages:
- expo cli v3
- expo cli v2
jobs:
include:
- stage: expo cli v3
script:
- docker build base/3 -t $DOCKER_IMAGE:3
- docker run -ti --rm $DOCKER_IMAGE:3 diagnostics
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker tag $DOCKER_IMAGE:3 $DOCKER_IMAGE:latest
deploy:
provider: script
script: docker push $DOCKER_IMAGE:3 && docker push $DOCKER_IMAGE:latest
on:
branch: master
- stage: expo cli v2
script:
- docker build base/2 -t $DOCKER_IMAGE:2
- docker run -ti --rm $DOCKER_IMAGE:2 diagnostics
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
deploy:
provider: script
script: docker push $DOCKER_IMAGE:2
on:
branch: master

0 comments on commit 882d5f9

Please sign in to comment.