-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (47 loc) · 1.37 KB
/
hpi-builder.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
name: Jenkins plugin .hpi build
# This workflow will build an executable Jenkins plugin in .hpi format for further manual installation in Jenkins
on: [push, workflow_dispatch]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Jenkins plugin code
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: maven
- name: Check repository content
shell: bash
run: pwd && ls -la
- name: Build Jenkins Plugin into .hpi
shell: bash
run: chmod +x mvnw && ./mvnw clean package
- name: Verify content of target folder
shell: bash
run: pwd && ls -l target/
- name: Archive the Build Output
uses: actions/upload-artifact@v4
with:
name: zowe-zdevops
path: target/*.hpi
- name: Unzip archive
run: unzip target/*.hpi
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout the plugin GitHub repository
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: maven
- name: Run Unit Tests with Maven
run: ./mvn test