forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
34 lines (26 loc) · 872 Bytes
/
.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
sudo: required
language: csharp
mono: none
dotnet: 2.0.0
dist: trusty
env:
- NAME="azure-powershell-core" CONFIG="Release"
services:
- docker
before_install:
- sudo apt-get update
- sudo apt-get install docker-ce
script:
- dotnet msbuild build.proj /t:BuildNetcore /p:Configuration=$CONFIG
after_success:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker build . -t $DOCKER_USER/$NAME:$TRAVIS_COMMIT --build-arg CONFIG=$CONFIG;
docker tag $DOCKER_USER/$NAME:$TRAVIS_COMMIT $DOCKER_USER/$NAME:$TRAVIS_BRANCH;
docker login -u $DOCKER_USER -p $DOCKER_PASS;
docker push $DOCKER_USER/$NAME:$TRAVIS_COMMIT;
docker push $DOCKER_USER/$NAME:$TRAVIS_BRANCH;
if [ "$TRAVIS_BRANCH" == "master" ]; then
docker tag $DOCKER_USER/$NAME:$TRAVIS_COMMIT $DOCKER_USER/$NAME:latest;
docker push $DOCKER_USER/$NAME:latest;
fi;
fi