-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsemaphore.yml
85 lines (76 loc) · 2.45 KB
/
semaphore.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
# This file is managed by ServiceBot plugin - Semaphore. The content in this file is created using a common
# template and configurations in service.yml. Code changes made to the remaining sections will not be affected.
# For more information, please refer to the page:
# https://confluentinc.atlassian.net/wiki/spaces/Foundations/pages/2871296194/Add+SemaphoreCI
version: v1.0
name: build-test-release
agent:
machine:
type: s1-prod-ubuntu24-04-amd64-2
auto_cancel:
running:
when: "branch != 'main'"
execution_time_limit:
hours: 1
queue:
- when: "branch != 'main'"
processing: parallel
global_job_config:
prologue:
commands:
- checkout
- make ci-bin-sem-cache-restore
- make docker-login-ci
- make load-cached-docker-images
- sem-version java 21
epilogue:
always:
commands:
- make store-test-results-to-semaphore
- make ci-bin-sem-cache-store
- make cache-docker-images
blocks:
- name: "Build JARs and Unit Test"
dependencies: []
task:
epilogue:
always:
commands:
- emit-sonarqube-data --run_only_sonar_scan
jobs:
- name: "Build JARs and Unit Test"
commands:
- make build
- make test
- name: "Build Native Executable and Test"
dependencies: []
task:
jobs:
- name: "Build Native Executable and Test"
commands:
- make mvn-verify-native-executable
- name: "Release"
dependencies: ["Build JARs and Unit Test", "Build Native Executable and Test"]
run:
when: "branch =~ '.*'"
task:
jobs:
- name: "Release"
commands:
- make release-ci
- sem-context put release_version=$(cat .versions/ide-sidecar-version.txt)
after_pipeline:
task:
jobs:
- name: Publish Test Results to Semaphore
commands:
- test-results gen-pipeline-report || echo "Could not publish pipeline test result report due to probably no test results to publish"
promotions:
- name: "Multi Arch Builds and Upload to GitHub Releases"
pipeline_file: multi-arch-builds-and-upload.yml
auto_promote:
when: "result = 'passed' and branch =~ '.*'"
- name: "Third Party Notices PR"
pipeline_file: third-party-notices.yml
auto_promote:
when: "branch =~ '.*' and change_in(['/pom.xml', '/NOTICE.txt'], {default_branch: 'main', branch_range: '$SEMAPHORE_GIT_COMMIT_RANGE', pipeline_file: 'ignore'})"