2018-07-20 23:07:54 +00:00
|
|
|
# Build steps need access to the Docker agent
|
2017-11-25 11:01:30 +00:00
|
|
|
sudo: required
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2018-05-14 20:37:43 +00:00
|
|
|
jobs:
|
|
|
|
include:
|
2018-07-20 23:07:54 +00:00
|
|
|
|
|
|
|
# Run all the tests inside Docker
|
|
|
|
|
|
|
|
- stage: Test
|
|
|
|
script: docker build -f Dockerfile.test .
|
|
|
|
|
|
|
|
|
|
|
|
# If this is a tagged commit, publish the package to npm
|
|
|
|
|
|
|
|
- stage: Release npm
|
|
|
|
script: echo "Deploying to npm"
|
2018-05-14 20:37:43 +00:00
|
|
|
deploy:
|
|
|
|
provider: npm
|
|
|
|
email: asyncadventures@gmail.com
|
|
|
|
api_key: $NPM_TOKEN
|
|
|
|
on:
|
|
|
|
tags: true
|
2018-07-25 20:35:02 +00:00
|
|
|
condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+
|
2018-07-20 23:07:54 +00:00
|
|
|
|
|
|
|
# If this is a tagged commit, publish a new Docker image
|
|
|
|
|
|
|
|
- stage: Release Docker
|
|
|
|
script: echo "Deploying to DockerHub"
|
|
|
|
deploy:
|
|
|
|
provider: script
|
2018-07-25 20:35:02 +00:00
|
|
|
script: scripts/travis-release-docker
|
2018-07-20 23:07:54 +00:00
|
|
|
on:
|
|
|
|
tags: true
|
2018-07-25 20:35:02 +00:00
|
|
|
condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+
|