-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
.travis.yml
38 lines (36 loc) · 1.3 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
language: csharp
sudo: required
dotnet: 2.1.300
os:
- linux
branches:
only:
- master
services:
- docker
before_install:
- cd SoftPlc
install:
- sudo apt-get update
- sudo apt-get install -y qemu qemu-user-static qemu-user binfmt-support
script:
- dotnet publish -c release -o release
- cp ./native/linux/libsnap7.so ./release/libsnap7.so
- cp ./Docker/linux-x64/Dockerfile ./release/Dockerfile
- cd release
- docker build -t fbarresi/softplc:1.1.$TRAVIS_BUILD_NUMBER-linux .
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- cd ..
- dotnet publish -c release -o release_arm -r linux-arm
- cp ./native/arm/libsnap7.so ./release_arm/libsnap7.so
- cp ./Docker/arm/Dockerfile ./release_arm/Dockerfile
- cd release_arm
- docker build -t fbarresi/softplc:1.1.$TRAVIS_BUILD_NUMBER-arm .
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
- docker push fbarresi/softplc:1.1.$TRAVIS_BUILD_NUMBER-linux;
- docker tag fbarresi/softplc:1.1.$TRAVIS_BUILD_NUMBER-linux fbarresi/softplc:latest-linux;
- docker push fbarresi/softplc:latest-linux;
- docker push fbarresi/softplc:1.1.$TRAVIS_BUILD_NUMBER-arm;
- docker tag fbarresi/softplc:1.1.$TRAVIS_BUILD_NUMBER-arm fbarresi/softplc:latest-arm;
- docker push fbarresi/softplc:latest-arm;