-
Notifications
You must be signed in to change notification settings - Fork 22
105 lines (105 loc) · 3.7 KB
/
pr.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
name: "Pull Request Build"
on:
workflow_dispatch:
pull_request:
jobs:
linux-build-local:
name: PR - Linux - JVM ${{ matrix.java }} - Local
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11 ]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'maven'
- name: Build
run: ./mvnw -s .github/mvn-settings.xml clean verify
linux-build-ocp:
name: PR - Linux - JVM ${{ matrix.java }} - OpenShift ${{ matrix.openshift }}
needs: linux-build-local
# the action "manusa/[email protected]" only works in ubuntu-20.04
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ 11 ]
openshift: [ v3.11.0 ]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'maven'
- name: Setup OpenShift
uses: manusa/[email protected]
with:
oc version: ${{ matrix.openshift }}
dns ip: 1.1.1.1
github token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Project using Dekorate
run: |
oc new-project dekorate
./run_tests_with_dekorate_in_ocp.sh -s .github/mvn-settings.xml
- name: Delete Project using Dekorate
run: oc delete project dekorate
- name: Clean folder
run: ./mvnw -s .github/mvn-settings.xml clean
- name: Build Project using S2i
run: |
oc new-project s2i
./run_tests_with_s2i.sh --repository-url "${{ github.event.pull_request.head.repo.owner.html_url }}/${{ github.event.pull_request.head.repo.name }}" --branch-to-test ${{ github.head_ref }} --maven-settings ".github/mvn-settings.xml"
- name: Delete Project using S2i
run: oc delete project s2i
- name: Build Project using Helm
run: |
oc new-project helm
./run_tests_with_helm_in_ocp.sh "${{ github.event.pull_request.head.repo.owner.html_url }}/${{ github.event.pull_request.head.repo.name }}" ${{ github.head_ref }}
- name: Delete Project using Helm
run: oc delete project helm
linux-build-kubernetes:
name: PR - Linux - JVM ${{ matrix.java }} - Kubernetes
needs: linux-build-local
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11 ]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: 'maven'
- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v1
with:
version: v0.11.1
registry: true
- name: Build Project using Helm
run: |
kubectl create namespace helm
./run_tests_with_helm_in_k8s.sh $KIND_REGISTRY helm
- name: Delete Project using Helm
run: kubectl delete namespace helm
- name: Build Project using Dekorate
run: |
kubectl create namespace k8s
./run_tests_with_dekorate_in_k8s.sh $KIND_REGISTRY k8s
- name: Delete Project using K8s
run: kubectl delete namespace k8s
- name: Build Project using the generated Helm by Dekorate
run: |
kubectl create namespace genhelm
./run_tests_with_generated_helm_in_k8s.sh $KIND_REGISTRY genhelm
- name: Delete Project using the generated Helm by Dekorate
run: kubectl delete namespace genhelm