-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
63 lines (57 loc) · 2.43 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
# Maven
# Build your Java project and run tests with Apache Maven.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
trigger:
- master
jobs:
- job: runTests
condition: ne(variables['Build.SourceBranch'], 'refs/heads/master')
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
# according to: https://github.com/MicrosoftDocs/vsts-docs/issues/3845,
# maven options should go to goals instead, as mavenOptions is for jvm options
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'verify -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true --batch-mode --show-version'
- job: ifBranchIsMaster
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
# according to: https://github.com/MicrosoftDocs/vsts-docs/issues/3845,
# maven options should go to goals instead, as mavenOptions is for jvm options
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'verify -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true --batch-mode --show-version -Ddocker.username=$(DOCKER_HUB_USER) -Ddocker.password=$(DOCKER_HUB_PASS) docker:push'
- job: createTag
dependsOn: ifBranchIsMaster
condition: succeeded()
steps:
- task: Bash@3
inputs:
targetType: 'filePath'
filePath: 'VersionFromPom.sh'
- task: GitHubRelease@0
displayName: ‘Create GitHub Release’
inputs:
gitHubConnection: $(GITHUB_ACCOUNT)
repositoryName: cytechmobile/reminderbot
action: create
tag: $(version)
tagSource: 'manual'