forked from JasperFx/marten
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
90 lines (87 loc) · 2.86 KB
/
azure-pipelines.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
trigger:
batch: true
branches:
include:
- master
- refs/tags/*
resources:
containers:
- container: pg11
image: ionx/postgres-plv8:11.1
ports:
- 5432:5432
- container: pg10
image: ionx/postgres-plv8:10.6
ports:
- 5432:5432
- container: pg9.6
image: mysticmind/postgres-plv8:9.6-1.4
ports:
- 5432:5432
variables:
config: Release
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
dotnet_core_version: 2.1.400
node_version: 10.x
pg_db: marten_test
marten_testing_database: "Host=localhost;Port=5432;Database=marten_test;Username=postgres;Password=Password12!"
jobs:
- job: Build
# timeoutInMinutes: 20
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
pg9.6:
postgresService: pg9.6
pg10:
postgresService: pg10
pg11:
postgresService: pg11
services:
postgres: $[ variables['postgresService'] ]
steps:
- task: DotNetCoreInstaller@0
displayName: Install .Net Core
inputs:
version: $(dotnet_core_version)
- task: NodeTool@0
displayName: Install Node.js
inputs:
versionSpec: $(node_version)
- script: |
PG_CONTAINER_NAME=$(docker ps --filter expose=5432/tcp --format {{.Names}})
docker exec $PG_CONTAINER_NAME psql -U postgres -c "create database $(pg_db);"
docker exec $PG_CONTAINER_NAME psql -U postgres -d $(pg_db) -c "create extension if not exists plv8;"
docker exec $PG_CONTAINER_NAME psql -U postgres -c "DO 'plv8.elog(NOTICE, plv8.version);' LANGUAGE plv8;"
displayName: Create db and add plv8 extension
- script: ./build.sh --no-color ci
displayName: Build
# Publish job will be enabled later
# - job: Publish
# dependsOn: Build
# # run publish only if all build jobs succeed and a GitHub tag is created
# condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
# pool:
# vmImage: 'ubuntu-latest'
# steps:
# - task: DotNetCoreInstaller@0
# displayName: Install .Net Core
# inputs:
# version: $(dotnet_core_version)
# - script: ./build.sh --no-color pack
# displayName: Create NuGet Packages
# - task: NuGetCommand@2
# displayName: Publish packages to NuGet
# inputs:
# command: 'push'
# nuGetFeedType: 'external'
# packagesToPush: '$(Build.Repository.LocalPath)/artifacts/*.nupkg'
# publishFeedCredentials: 'NuGetServiceConnection'
# - task: NuGetCommand@2
# displayName: Publish symbol packages to NuGet
# inputs:
# command: 'push'
# packagesToPush: '$(Build.Repository.LocalPath)/artifacts/*.snupkg'
# publishFeedCredentials: 'NuGetServiceConnection'