-
Notifications
You must be signed in to change notification settings - Fork 8
/
azure-pipelines.yml
72 lines (66 loc) · 1.75 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
variables:
MYSQL_ROOT_PASSWORD: mysql_root_pwd
MYSQL_HOST: '127.0.0.1'
MYSQL_PORT: '3306'
System.Debug: true
trigger:
branches:
include:
- '*'
tags:
include:
- 'v*'
paths:
exclude:
- '*.md'
- LICENSE
resources:
containers:
- container: mariadb
image: mariadb:10.6
env:
MYSQL_DATABASE: ispybtest
MYSQL_ROOT_PASSWORD: $(MYSQL_ROOT_PASSWORD)
ports:
- $(MYSQL_PORT):$(MYSQL_PORT)
pool:
vmImage: ubuntu-20.04
stages:
- stage: build
displayName: Build
dependsOn:
jobs:
- job: build
displayName: build package
pool:
vmImage: ubuntu-20.04
services:
db: mariadb
steps:
- task: Maven@3
displayName: ‘Maven package build’
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
mavenAuthenticateFeed: true
options: '-Dispyb.url="jdbc:mariadb://$(MYSQL_HOST):$(MYSQL_PORT)" -Dispyb.user=root -Dispyb.pw="$(MYSQL_ROOT_PASSWORD)" -Dispyb.host=$(MYSQL_HOST)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(System.DefaultWorkingDirectory)/target
artifactName: jars
- task: DownloadPipelineArtifact@2
inputs:
artifact: jars
- task: GithubRelease@0
displayName: ‘Create GitHub Release’
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs:
githubConnection: KarlConnection
repositoryName: DiamondLightSource/gda-ispyb-api
assets: '$(Pipeline.Workspace)/ispyb-api-*.jar'