forked from OrchardCMS/OrchardCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (38 loc) · 1.7 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
language: csharp
sudo: required
services:
- docker
dist: trusty
mono: none
# dotnet: 2.1.300
env:
global:
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
os:
- linux
- osx
osx_image: xcode8.3
script:
- curl https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version 2.1.301
- if test "$TRAVIS_OS_NAME" == "linux"; then export PATH="/home/travis/.dotnet":"$PATH"; fi
- if test "$TRAVIS_OS_NAME" == "osx"; then export PATH="/Users/travis/.dotnet":"$PATH"; fi
- dotnet --info
- dotnet build -c Release
- if [[ "$TRAVIS_BRANCH" == "master" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
cd $TRAVIS_BUILD_DIR/src/OrchardCore.Cms.Web;
dotnet publish -c Release -o $TRAVIS_BUILD_DIR/.build/release;
cd $TRAVIS_BUILD_DIR;
docker build -t orchardproject/orchardcore-cms-linux:latest -t orchardproject/orchardcore-cms-linux:1.0.0-beta3 .;
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS";
docker push orchardproject/orchardcore-cms-linux;
fi;
- if [[ "$TRAVIS_BRANCH" == "dev" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
cd $TRAVIS_BUILD_DIR/src/OrchardCore.Cms.Web;
dotnet publish -c Release -o $TRAVIS_BUILD_DIR/.build/release;
cd $TRAVIS_BUILD_DIR;
docker build -t orchardproject/orchardcore-cms-linux:dev .;
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS";
docker push orchardproject/orchardcore-cms-linux;
fi;
- if test "$TRAVIS_OS_NAME" == "linux"; then dotnet test -c Release ./test/OrchardCore.Tests/OrchardCore.Tests.csproj; fi