-
-
Notifications
You must be signed in to change notification settings - Fork 165
147 lines (142 loc) · 4.9 KB
/
dockertests.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: docker tests
on:
push:
branches:
- feature/*
- release/*
- fix/*
workflow_dispatch:
pull_request:
jobs:
linux-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
java-version: ['19']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- name: npm install, build and test
run: |
npm install
npm run build --if-present
npm test
npm install -g @cyclonedx/cdxgen-plugins-bin
mkdir -p bomresults repotests
env:
CI: true
- uses: actions/checkout@v4
with:
repository: 'grafana-operator/grafana-operator'
path: 'repotests/grafana-operator'
- name: dockertests
run: |
bin/cdxgen.js ubuntu:latest -t docker -o bomresults/bom-ubuntu.json
bin/cdxgen.js almalinux:9.2-minimal -t docker -o bomresults/bom-almalinux.json
bin/cdxgen.js centos:latest -t docker -o bomresults/bom-centos.json
bin/cdxgen.js phpmyadmin@sha256:1092481630056189e43cc0fe66fd01defcc9334d78ab4611b22f65e9a39869bd -o bomresults/bom-phpmyadmin.json --validate
bin/cdxgen.js shiftleft/scan-slim -o bomresults/bom-scanslim.json -t docker --validate
bin/cdxgen.js redmine@sha256:a5c5f8a64a0d9a436a0a6941bc3fb156be0c89996add834fe33b66ebeed2439e -o bomresults/bom-redmine.json --validate
bin/cdxgen.js rocket.chat@sha256:379f7afa0e67497c363ac9a9b3e7e6a6d31deee228233307c987e4a0c68b28e6 -o bomresults/bom-rocket.json --validate
bin/cdxgen.js sonarqube@sha256:7c0edcb99c964984db6d24330db33bb12de1e8ae0d5974d77640b1efea1483d1 -o bomresults/bom-sonar.json --validate
bin/cdxgen.js zookeeper@sha256:5bf00616677db5ef57d8a2da7c5dadf67f1a6be54b0c33a79be3332c9c80aeb6 -o bomresults/bom-zoo.json --validate
docker pull shiftleft/scan-slim:latest
docker save -o /tmp/scanslim.tar shiftleft/scan-slim:latest
bin/cdxgen.js /tmp/scanslim.tar -o bomresults/bom-scanarch.json --validate
bin/cdxgen.js -t docker-compose test/data -o bomresults/bom-dc.json --validate
bin/cdxgen.js -t operator repotests/grafana-operator -o bomresults/bom-op.json --validate
ls -ltr bomresults
- uses: actions/upload-artifact@v3
with:
name: bomresults
path: bomresults
os-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
java-version: ['19']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- name: npm install, build and test
run: |
npm install
npm run build --if-present
npm install -g @cyclonedx/cdxgen-plugins-bin
mkdir -p bomresults
env:
CI: true
- name: ostests
run: |
bin/cdxgen.js -t os -o bomresults/bom-os.json --validate
env:
CDXGEN_DEBUG_MODE: debug
- uses: actions/upload-artifact@v3
with:
name: bomresults-os
path: bomresults
win-tests:
runs-on: windows-latest
strategy:
matrix:
node-version: [18.x]
java-version: ['19']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- name: npm install, build
run: |
npm install
npm run build --if-present
mkdir bomresults
npm install -g @cyclonedx/cdxgen-plugins-bin
env:
CI: true
- name: wintests
run: |
node bin/cdxgen.js -t os -o bomresults/bom-win.json --validate
dir bomresults
env:
CDXGEN_DEBUG_MODE: debug
- uses: actions/upload-artifact@v3
with:
name: bomresults-win
path: bomresults