This repository has been archived by the owner on Jan 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (52 loc) · 1.46 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
language: csharp
sudo: required
node_js:
- "7"
python:
- "2.7"
install:
- travis_retry pip install --upgrade pip
- travis_retry pip install ecs-deploy
- travis_retry pip install --user awscli
- export PATH=$PATH:$HOME/.local/bin
- cd $TRAVIS_BUILD_DIR/src/Seagrant.Tsunami.Web
- travis_retry npm install
- travis_retry dotnet restore ../SeaGrantApp.sln
services:
- docker
before_script:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$TRAVIS_PULL_REQUEST, BRANCH=$BRANCH"
script:
- dotnet build
- grunt all
# - cd $TRAVIS_BUILD_DIR/src/SeaGrant.API.Test
# - dotnet test
# - cd $TRAVIS_BUILD_DIR/src/SeaGrant.Web.Test
# - dotnet test
- dotnet publish $TRAVIS_BUILD_DIR/src/Seagrant.Tsunami.Web -o $TRAVIS_BUILD_DIR/publish/
matrix:
include:
- os: linux
dist: trusty
sudo: required
dotnet: 1.0.4
mono: none
#Docker section
after_success:
- docker --version
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
- cd $TRAVIS_BUILD_DIR
- chmod ugo+x app_docker_deploy.sh
- chmod ugo+x ecs_deploy.sh
deploy:
- provider: script
skip_cleanup: true
script: ./app_docker_deploy.sh
on:
tags: true
- provider: script
skip_cleanup: true
script: ./app_docker_deploy.sh && ./ecs_deploy.sh seagrant-tsunami-service seagrant-tsunami
on:
all_branches: master