forked from eclipse-che/che-server
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
66 lines (53 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
# 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:
- azure-pipelines
variables:
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository
MAVEN_OPTS: '-Xmx4096m -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -Dhttp.keepAlive=false'
jobs:
- job: Build
timeoutInMinutes: 0
pool:
vmImage: 'Ubuntu-20.04'
steps:
- task: Docker@1
displayName: Container registry login
inputs:
command: login
dockerRegistryEndpoint: camino.azurecr.io
containerRegistryType: Container Registry
- task: Cache@2
inputs:
key: 'maven | "$(Agent.OS)" | **/pom.xml'
restoreKeys: |
maven | "$(Agent.OS)"
maven
path: $(MAVEN_CACHE_FOLDER)
displayName: Cache Maven local repo
- script: |
chmod -R o+rwx .
sudo chown -R 1000:1000 .
displayName: Chmod / Chown
- task: Maven@3
inputs:
jdkVersionOption: '1.11'
mavenPomFile: 'pom.xml'
options: '-DskipTests -DskipIntegrationTests -Dlicense.skip'
mavenOpts: ${{ variables.MAVEN_OPTS }}
- script: |
cd dockerfiles/che
./build.sh --organization:camino.azurecr.io/camino
displayName: Building the image
- script: |
docker tag camino.azurecr.io/camino/che-server:next camino.azurecr.io/camino/che-server:$(build.buildId)
displayName: Tagging
- script: |
docker push camino.azurecr.io/camino/che-server:$(build.buildId)
displayName: Pushing tagged :buildId
- script: |
docker push camino.azurecr.io/camino/che-server:next
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: Pushing :next