forked from XiaoMi/mone
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (87 loc) · 6.82 KB
/
hera_package.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
# This is a basic workflow to help you get started with Actions
name: hera test
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
paths:
- 'hera-all/**'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check-build-8:
name: hera test
runs-on: ubuntu-latest
if: (github.event == 'pull_request' && github.head_ref == 'refs/heads/jdk8')
steps:
- name: Setup Maven Action
uses: s4u/[email protected]
with:
java-version: 8
#settings-properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
- run: echo '<settings> <interactiveMode>false</interactiveMode> <profiles> <profile> <repositories> <repository> <snapshots /> <id>ossrh</id> <name>ossrh-snapshot</name> <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <snapshots /> <id>ossrh</id> <name>ossrh-snapshot</name> <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> </pluginRepository> </pluginRepositories> <id>artifactory</id> </profile> </profiles> <activeProfiles> <activeProfile>artifactory</activeProfile> </activeProfiles> <servers> <server> <id>github</id> <username>${env.GITHUB_ACTOR}</username> <password>${env.GITHUB_TOKEN}</password> </server> </servers> <mirrors/> <proxies/></settings>' > ~/.m2/settings.xml
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
hera-app:
- 'hera-all/hera-app/**'
hera-operator:
- 'hera-all/hera-operator/**'
hera-tspandata:
- 'hera-all/hera-tspandata/**'
hera-log:
- 'hera-all/hera-log/**'
hera-monitor:
- 'hera-all/hera-monitor/**'
hera-prometheus-agent:
- 'hera-all/hera-prometheus-agent/**'
prometheus-starter-all:
- 'hera-all/prometheus-starter-all/**'
trace-etl:
- 'hera-all/trace-etl/**'
hera-demo-client:
- 'hera-all/hera-demo-client/**'
hera-webhook:
- 'hera-all/hera-webhook/**'
# run only if some file in 'src' folder was changed
- if: always() && steps.changes.outputs.hera-app == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-app; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-operator == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-operator; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-tspandata == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-tspandata; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-log == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-log; mvn -U clean package --fail-at-end -Dmaven.test.skip=true -pl '!log-agent'; cd ../..
- if: always() && steps.changes.outputs.hera-monitor == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-monitor; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..\
- if: always() && steps.changes.outputs.hera-prometheus-agent == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-prometheus-agent; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.prometheus-starter-all == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/prometheus-starter-all; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.trace-etl == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/trace-etl; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-demo-client == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-demo-client; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
- if: always() && steps.changes.outputs.hera-webhook == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-webhook; mvn -U clean package --fail-at-end -Dmaven.test.skip=true; cd ../..
check-build-20:
name: hera test 20
runs-on: ubuntu-latest
if: (github.event == 'pull_request' && github.head_ref == 'refs/heads/master')
steps:
- name: Setup Maven Action
uses: s4u/[email protected]
with:
java-version: 20
#settings-properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
- run: echo '<settings> <interactiveMode>false</interactiveMode> <profiles> <profile> <repositories> <repository> <snapshots /> <id>ossrh</id> <name>ossrh-snapshot</name> <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <snapshots /> <id>ossrh</id> <name>ossrh-snapshot</name> <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> </pluginRepository> </pluginRepositories> <id>artifactory</id> </profile> </profiles> <activeProfiles> <activeProfile>artifactory</activeProfile> </activeProfiles> <servers> <server> <id>github</id> <username>${env.GITHUB_ACTOR}</username> <password>${env.GITHUB_TOKEN}</password> </server> </servers> <mirrors/> <proxies/></settings>' > ~/.m2/settings.xml
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
hera-log:
- 'hera-all/hera-log/**'
# run only if some file in 'src' folder was changed
- if: always() && steps.changes.outputs.hera-log == 'true' || github.event == 'workflow_dispatch'
run: cd hera-all/hera-log; mvn -U clean package --fail-at-end -Dmaven.test.skip=true -pl 'log-agent'; cd ../..