-
Notifications
You must be signed in to change notification settings - Fork 0
173 lines (158 loc) · 4.82 KB
/
build.yaml
File metadata and controls
173 lines (158 loc) · 4.82 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: Build
on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- main
tags:
- "*"
env:
QUAY_RHACS_ENG_RW_USERNAME: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }}
QUAY_RHACS_ENG_RW_PASSWORD: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }}
QUAY_STACKROX_IO_RW_USERNAME: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }}
QUAY_STACKROX_IO_RW_PASSWORD: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }}
jobs:
build-and-push-stackrox-build:
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/actions/build-and-push-image
with:
image-flavor: "stackrox-build"
arch: ${{ matrix.arch }}
build-and-push-stackrox-test:
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
needs:
- build-and-push-stackrox-build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/actions/build-and-push-image
with:
image-flavor: "stackrox-test"
arch: ${{ matrix.arch }}
build-and-push-multiarch:
runs-on: ubuntu-latest
needs:
- build-and-push-stackrox-build
- build-and-push-stackrox-test
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Login to quay.io/stackrox-io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_STACKROX_IO_RW_USERNAME }}
password: ${{ secrets.QUAY_STACKROX_IO_RW_PASSWORD }}
- uses: ./.github/actions/create-multiarch-manifest
with:
base-image: quay.io/stackrox-io/apollo-ci
image-flavor: stackrox-build
- uses: ./.github/actions/create-multiarch-manifest
with:
base-image: quay.io/stackrox-io/apollo-ci
image-flavor: stackrox-test
- name: Login to quay.io/rhacs-eng
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }}
password: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }}
- uses: ./.github/actions/create-multiarch-manifest
with:
base-image: quay.io/rhacs-eng/apollo-ci
image-flavor: stackrox-build
- uses: ./.github/actions/create-multiarch-manifest
with:
base-image: quay.io/rhacs-eng/apollo-ci
image-flavor: stackrox-test
build-and-push-stackrox-ui-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/actions/build-and-push-image
with:
image-flavor: "stackrox-ui-test"
build-and-push-scanner-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/actions/build-and-push-image
with:
image-flavor: "scanner-build"
build-and-push-scanner-test:
runs-on: ubuntu-latest
needs:
- build-and-push-scanner-build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/actions/build-and-push-image
with:
image-flavor: "scanner-test"
build-and-push-jenkins-plugin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./.github/actions/build-and-push-image
with:
image-flavor: "jenkins-plugin"
test-cci-export:
runs-on: ubuntu-latest
needs:
- build-and-push-stackrox-test
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Test cci-export in a context similar to how it is used in CI
run: |
docker login -u "$QUAY_RHACS_ENG_RW_USERNAME" --password-stdin <<<"$QUAY_RHACS_ENG_RW_PASSWORD" quay.io
make test-cci-export