This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
forked from eclipse-che/che-theia
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
78 lines (64 loc) · 2.57 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
---
# 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
jobs:
- job: Build_node
pool:
vmImage: 'Ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.18.2'
- script: yarn
displayName: Run yarn.
- job: Build_container
timeoutInMinutes: 0
condition: ne(variables['Build.Reason'], 'PullRequest')
variables:
- group: che-theia
- name: organization
value: camino
- name: prefix
value: che
- name: tag
value: next
pool:
vmImage: 'Ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.18.2'
- script: |
docker pull quay.io/eclipse/che-theia-dev:next
docker tag quay.io/eclipse/che-theia-dev:next eclipse/che-theia-dev:next
./build.sh --build-arg:GITHUB_TOKEN=${GITHUB_TOKEN} \
--organization:$(organization) --tag:$(tag) --prefix:$(prefix) \
--root-yarn-opts:--ignore-scripts --dockerfile:Dockerfile.alpine
displayName: Building.
env:
GITHUB_TOKEN: $(github_token)
- task: Docker@1
displayName: Container registry login
inputs:
command: login
dockerRegistryEndpoint: camino.azurecr.io
containerRegistryType: Container Registry
condition: succeeded()
- script: |
docker tag $(organization)/che-theia-dev:$(tag) camino.azurecr.io/$(organization)/che-theia-dev:$(tag)
docker tag $(organization)/che-theia:$(tag) camino.azurecr.io/$(organization)/che-theia:$(tag)
docker push camino.azurecr.io/$(organization)/che-theia-dev:$(tag)
docker push camino.azurecr.io/$(organization)/che-theia:$(tag)
condition: succeeded()
displayName: Pushing
- script: |
docker tag $(organization)/che-theia-dev:$(tag) camino.azurecr.io/$(organization)/che-theia-dev:$(tag)-pr$(System.PullRequest.PullRequestNumber)
docker tag $(organization)/che-theia:$(tag) camino.azurecr.io/$(organization)/che-theia:$(tag)-pr$(System.PullRequest.PullRequestNumber)
docker push camino.azurecr.io/$(organization)/che-theia-dev:$(tag)-pr$(System.PullRequest.PullRequestNumber)
docker push camino.azurecr.io/$(organization)/che-theia:$(tag)-pr$(System.PullRequest.PullRequestNumber)
condition: succeeded()
displayName: Pushing (staging)