-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (33 loc) · 1.04 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
sudo: required
language: node_js
node_js:
- "12"
services:
- docker
before_install:
- sudo apt-get install jq -y
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin quay.io
# All stages, except for the Release stage, utilize a built docker image
# No need to duplicate package installs
install: skip
jobs:
include:
- stage: Build Image
script:
- docker build -t pfa-api-ci .
- docker images
- docker tag pfa-api-ci quay.io/$DOCKER_USERNAME/pfa-api:build-$TRAVIS_BUILD_NUMBER
- docker push quay.io/$DOCKER_USERNAME/pfa-api:build-$TRAVIS_BUILD_NUMBER
- stage: Test Image
script:
- docker run --rm quay.io/$DOCKER_USERNAME/pfa-api:build-$TRAVIS_BUILD_NUMBER test:lint
- docker run --rm quay.io/$DOCKER_USERNAME/pfa-api:build-$TRAVIS_BUILD_NUMBER test:unit
- stage: Release
script: skip
node_js: "12"
deploy:
provider: script
skip_cleanup: true
on:
branch: master
script: ./scripts/deploy.sh