forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (31 loc) · 1.37 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: csharp
mono: none
dotnet: 2.1.400
dist: trusty
env:
- NAME="azure-powershell-core" CONFIG="Debug"
services:
- docker
before_install:
- sudo apt-get update
- sudo apt-get install docker-ce
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
- curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
- wget -q https://packages.microsoft.com/config/ubuntu/14.04/packages-microsoft-prod.deb
- sudo dpkg -i packages-microsoft-prod.deb
- sudo apt-get install apt-transport-https
- sudo apt-get update
- sudo apt-get install -y powershell
- sudo pwsh -NonInteractive -NoLogo -NoProfile -Command "Install-Module platyPS -Force -Confirm:\$false -Scope CurrentUser"
# https://github.com/travis-ci/travis-ci/issues/1066#issuecomment-383489298
script:
- sudo dotnet msbuild build.proj /t:Full /p:ExcludeAuthenticators=true /p:Configuration=$CONFIG || travis_terminate 1
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;
echo "$DOCKER_PASS" | docker login -u $DOCKER_USER --password-stdin;
docker push $DOCKER_USER/$NAME:$TRAVIS_COMMIT;
docker push $DOCKER_USER/$NAME:$TRAVIS_BRANCH;
fi