forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (32 loc) · 1.36 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
sudo: required
language: csharp
mono: none
dotnet: 2.1.2
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
- sudo apt-get update
- sudo apt-get install -y powershell
- sudo pwsh -NonInteractive -NoLogo -NoProfile -Command "Install-Module platyPS -Force -Confirm:\$false -Scope CurrentUser"
script:
- dotnet msbuild build.proj /t:BuildNetcore /p:Configuration=$CONFIG
- dotnet test src/Azure.PowerShell.Netcore.Test.sln --filter="AcceptanceType=CheckIn" --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;
echo "$DOCKER_PASS" | docker login -u $DOCKER_USER --password-stdin;
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