forked from discord-csharp/CSharpRepl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
49 lines (49 loc) · 1.81 KB
/
appveyor.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
41
42
43
44
45
46
47
48
49
version: 1.0.{build}
image: Visual Studio 2017 Preview
configuration: Release
platform: Any CPU
pull_requests:
do_not_increment_build_number: true
install:
- dotnet --info
- ps: choco install docker-compose
before_build:
- dotnet restore CSDiscordService\CSDiscordService.csproj --configfile ..\.nuget\nuget.config
- dotnet restore CSDiscordService.Tests\CSDiscordService.Tests.csproj --configfile ..\.nuget\nuget.config
- 7z a deploy-script.zip before-deploy.ps1
build:
project: CSDiscord.sln
verbosity: minimal
test_script:
- docker run -d -e "tokens=test" -p 80:80/tcp --name CSDiscord --net nat csdiscordservice
- ps: |
$json = (& "docker" "inspect" "CSDiscord" | ConvertFrom-Json)
$address= $json.NetworkSettings.Networks.nat.ipaddress
iwr -uri "http://$address/Eval" -method POST -contentType "text/plain" -body "1+1" -UseBasicParsing -Headers @{"Authorization"="Token test"}
- docker stop CSDiscord
- docker rm CSDiscord
after_build:
- ps: |
if(-not [System.String]::IsNullOrWhitespace($env:APPVEYOR_PULL_REQUEST_NUMBER)) { return; }
$tag = $env:APPVEYOR_REPO_BRANCH
if([System.String]::IsNullOrWhitespace($tag)) { $tag = "untagged" }
docker login -u="$env:DOCKER_USER" -p="$env:DOCKER_PASS"
docker tag csdiscordservice cisien/csdiscord:$tag
docker push cisien/csdiscord:$tag
artifacts:
- path: deploy-script.zip
name: deploy-script
deploy:
- provider: Environment
name: docker
on:
branch: master
environment:
CLI_VERSION: 2.0.0-preview2-006497
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOCKER_USER:
secure: ry9x9cQ9gzMNaPOd45RSHQ==
DOCKER_PASS:
secure: AXXeju7g+0ZE1ZMW2TKcXfW6+CMT70ZDh5iWYE5Bg80=
TOKENS:
secure: 20GDZBJStUXBheGueyX+iIXiRK6E/npU6vn2OA6s+NzIq96C+33xZblQbSwUt6BtYCr3duMGuiwaCayUR20SYVWCYo1I2IBZq+uUUtTZVfk=