forked from apache/incubator-kie-kogito-images
-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (61 loc) · 2.38 KB
/
kogito-images-pr-check.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
name: Images PR check
on: pull_request
jobs:
bats_test:
concurrency:
group: ${{ github.repository.name }}_bats_test-${{ github.head_ref }}
cancel-in-progress: true
name: Bats Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install xmllint
run: |
sudo apt-get update
sudo apt-get install libxml2-utils --fix-missing
- name: Cache bats binaries
uses: actions/cache@v1
with:
path: $GITHUB_WORKSPACE/bats/
key: ${{ runner.os }}-bats-binaries
restore-keys: |
${{ runner.os }}-bats-binaries
- name: run bats
run: |
./scripts/run-bats.sh
validate_kogito_imagestream:
concurrency:
group: ${{ github.repository.name }}_validate_kogito_imagestream-${{ github.head_ref }}
cancel-in-progress: true
name: Validate Kogito imagestreams
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download openshift-validator-tool
run: |
wget https://github.com/jboss-container-images/jboss-kie-modules/raw/main/tools/openshift-template-validator/openshift-template-validator-linux-amd64
- name: Add execution permission to openshift-validator-tool
run: |
chmod +x openshift-template-validator-linux-amd64
mv openshift-template-validator-linux-amd64 ${HOME}
- name: validate kogito imagestream
run: |
${HOME}/openshift-template-validator-linux-amd64 validate -f kogito-imagestream.yaml
- name: validate logic imagestream
run: |
${HOME}/openshift-template-validator-linux-amd64 validate -f logic-imagestream.yaml
shellcheck:
concurrency:
group: ${{ github.repository.name }}_shellcheck-${{ github.head_ref }}
cancel-in-progress: true
name: ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Shellcheck
run: sudo apt install shellcheck
- name: Check configure scripts
run: |
# Ignore SC2034 since we have many var which are unused in the script but can be used while deployment at runtime by setting env. For eg: ${KOGITO_QUARKUS_JVM_PROPS}
# Ignore SC1090 since the source files in our case didn't need to be checked
shellcheck -e SC2034 -e SC1090 modules/**/configure modules/**/*.sh