forked from omegat-org/omegat
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
88 lines (82 loc) · 2.42 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
trigger:
branches:
include:
- master
- releases/*
- refs/tags/v*
exclude:
- release/*
- standard
pr:
branches:
include:
- master
- releases/*
exclude:
- standard
paths:
exclude:
- docs
- doc_src
- docs_devel
- README.md
schedules:
- cron: '0 12 * * 6'
displayName: Weekly saturday build
branches:
include:
- master
- releases/*
always: true
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
isReleasesBranch: $[contains(variables['Build.SourceBranch'], 'refs/heads/releases/')]
isRelease: $[contains(variables['Build.SourceBranch'], 'refs/tags/v')]
isSchedule: $[eq(variables['Build.Reason'], 'Schedule')]
GRADLE_USER_HOME: '$(Pipeline.Workspace)/.gradle'
stages:
- stage: Check
condition: not(or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual')))
jobs:
- job: GitHubCI
displayName: CI Check for master, releases/* and Pull-Requests
pool:
vmImage: 'ubuntu-22.04'
steps:
- template: ci/azure-pipelines/check_steps.yml
# Weekly release steps will be triggerred after integration-test succeeded.
- stage: Weekly
condition: or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual'))
jobs:
- job: WeeklyBuild
displayName: Build for master weekly
pool:
vmImage: 'ubuntu-22.04'
steps:
- script: |
version=$(./gradlew -qq printVersion | head -n -1 )
echo "##vso[task.setvariable variable=version]$version"
- template: ci/azure-pipelines/integ_test_steps.yml
parameters:
testType: 'GIT'
duration: 600
- template: ci/azure-pipelines/build_steps.yml
- template: ci/azure-pipelines/publish_weekly.yml
parameters:
omegatVersion: $(version)
# Release steps will run on the main and/or release branch with tags.
- stage: Release
dependsOn: Check
condition: and(succeeded(), eq(variables.isRelease, true))
jobs:
- job: ReleaseBuild
pool:
vmImage: 'ubuntu-22.04'
steps:
- script: |
version=$(./gradlew -qq printVersion | head -n -1 )
echo "##vso[task.setvariable variable=version]$version"
- template: ci/azure-pipelines/build_steps.yml
- template: ci/azure-pipelines/publish_release.yml
parameters:
omegatVersion: $(version)