forked from rmetzger/flink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
102 lines (96 loc) · 2.95 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
91
92
93
94
95
96
97
98
99
100
101
102
# 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
#does this trigger a build?
trigger:
- master
variables:
MAVEN_CACHE_FOLDER: /home/user/.m2/repository
MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
resources:
containers:
- container: flink-build-container
image: rmetzger/flink-ci:2
jobs:
- job: runOnASF
pool:
name: Default
container: flink-build-container
timeoutInMinutes: 0
steps:
# Azure pipelines can only evaluate conditions with the build repo name in the steps.
# if the repo != "rmetzger/flink", we stop
- script: exit 1
condition: not(eq(variables['Build.Repository.Name'], 'rmetzger/flink'))
- script: chown -R user:user /home/user
- script: chown -R user:user .
- script: ls -lisah $MAVEN_CACHE_FOLDER
# - script: whoami
# - script: su user
# continueOnError: true
# timeoutInMinutes: 1
# - script: whoami
#- script: gosu user mvn clean install
- script: ls -lisah ; pwd
- script: ls -lisah /home/user
- task: CacheBeta@0
inputs:
key: maven | **/pom.xml
path: /home/user/.m2/repository
displayName: Cache Maven local repo
- script: ls -lisah $MAVEN_CACHE_FOLDER
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'clean install'
timeoutInMinutes: 0
#options: '-X'
- script: ls -lisah $MAVEN_CACHE_FOLDER
- job: runOnAzure
pool:
vmImage: 'ubuntu-latest'
container: flink-build-container
timeoutInMinutes: 0
steps:
# Azure pipelines can only evaluate conditions with the build repo name in the steps.
# if the repo == "rmetzger/flink", we stop
- script: exit 1
condition: eq(variables['Build.Repository.Name'], 'rmetzger/flink')
- script: sudo chown -R user:user /home/user
- script: sudo chown -R user:user .
- script: ls -lisah $MAVEN_CACHE_FOLDER
# - script: whoami
# - script: su user
# continueOnError: true
# timeoutInMinutes: 1
# - script: whoami
#- script: gosu user mvn clean install
- script: ls -lisah ; pwd
- script: ls -lisah /home/user
- task: CacheBeta@0
inputs:
key: maven | **/pom.xml
path: /home/user/.m2/repository
securityNamespace: cache
displayName: Cache Maven local repo
- script: ls -lisah $MAVEN_CACHE_FOLDER
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'clean install'
timeoutInMinutes: 0
#options: '-X'
- script: ls -lisah $MAVEN_CACHE_FOLDER