-
Notifications
You must be signed in to change notification settings - Fork 50
131 lines (126 loc) · 4.84 KB
/
gradle.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: CI Tests
on: [push]
jobs:
build-verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Fetch Tags
run: git -c protocol.version=2 fetch --tags --progress --no-recurse-submodules origin
if: "!contains(github.ref, 'refs/tags')"
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build -Porg.gradle.dependency.verification.console=verbose --dependency-verification strict
- uses: actions/upload-artifact@v3
if: failure()
with:
name: dependency-verification
path: build/reports/dependency-verification/
java11-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Fetch Tags
run: git -c protocol.version=2 fetch --tags --progress --no-recurse-submodules origin
if: "!contains(github.ref, 'refs/tags')"
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Integration Test
run: ./gradlew integrationTest --dependency-verification off
- uses: actions/upload-artifact@v3
if: failure()
with:
name: integration-test-report
path: integration-tests/build/reports/tests/integrationTest
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Fetch Tags
run: git -c protocol.version=2 fetch --tags --progress --no-recurse-submodules origin
if: "!contains(github.ref, 'refs/tags')"
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build --dependency-verification off
- name: Integration tests
run: ./gradlew integrationTest --dependency-verification off
- uses: actions/upload-artifact@v3
if: failure()
with:
name: integration-test-report
path: integration-tests/build/reports/tests/integrationTest
- name: deb/rpm install test
run: bash scripts/install-test.sh
- name: rpm upgrade test
run: bash scripts/rpm-upgrade.sh
- name: Get Release Version
id: get_version
run: VERSION=$(./gradlew currentVersion -q -Prelease.quiet --dependency-verification off) && echo ::set-output name=VERSION::$VERSION
- name: Get RPM Version
id: get_rpm_version
run: VERSION=$(./gradlew currentVersion -q -Prelease.quiet --dependency-verification off | sed 's/-/./') && echo ::set-output name=VERSION::$VERSION
- name: Upload zip
uses: actions/[email protected]
with:
# Artifact name
name: rd-${{ steps.get_version.outputs.VERSION }}.zip
# Directory containing files to upload
path: rd-cli-tool/build/distributions/rd-${{ steps.get_version.outputs.VERSION }}.zip
- name: Upload rpm
uses: actions/[email protected]
with:
# Artifact name
name: rundeck-cli-${{ steps.get_rpm_version.outputs.VERSION }}-1.noarch.rpm
# Directory containing files to upload
path: rd-cli-tool/build/distributions/rundeck-cli-${{ steps.get_rpm_version.outputs.VERSION }}-1.noarch.rpm
- name: Upload deb
uses: actions/[email protected]
with:
# Artifact name
name: rundeck-cli_${{ steps.get_rpm_version.outputs.VERSION }}-1_all.deb
# Directory containing files to upload
path: rd-cli-tool/build/distributions/rundeck-cli_${{ steps.get_rpm_version.outputs.VERSION }}-1_all.deb
- name: Upload all-jar
uses: actions/[email protected]
with:
# Artifact name
name: rundeck-cli-${{ steps.get_version.outputs.VERSION }}-all.jar
# Directory containing files to upload
path: rd-cli-tool/build/libs/rundeck-cli-${{ steps.get_version.outputs.VERSION }}-all.jar
- name: Upload api-lib
uses: actions/[email protected]
with:
# Artifact name
name: rd-api-client-${{ steps.get_version.outputs.VERSION }}.jar
# Directory containing files to upload
path: rd-api-client/build/libs/rd-api-client-${{ steps.get_version.outputs.VERSION }}.jar
- name: Upload rd-cli-lib
uses: actions/[email protected]
with:
# Artifact name
name: rd-cli-lib-${{ steps.get_version.outputs.VERSION }}.jar
# Directory containing files to upload
path: rd-cli-lib/build/libs/rd-cli-lib-${{ steps.get_version.outputs.VERSION }}.jar