-
Notifications
You must be signed in to change notification settings - Fork 21
246 lines (202 loc) · 6.48 KB
/
release.yaml
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
---
name: Release S3GW
on:
push:
tags:
- "v*"
jobs:
# Build the build-environment container, using it's workflow
build-s3gw:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Quay Login
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build Unittests
run: |
docker build \
--build-arg CMAKE_BUILD_TYPE=Release \
--build-arg NPROC=16 \
--file Dockerfile \
--tag s3gw-unittests \
--target s3gw-unittests \
.
- name: Run Unittests
run: |
docker run --rm s3gw-unittests
- name: Build s3gw Container Image
run: |
docker build \
--build-arg CMAKE_BUILD_TYPE=Release \
--build-arg NPROC=16 \
--build-arg S3GW_VERSION=${{ github.ref_name }} \
--build-arg QUAY_EXPIRATION=Never \
--file Dockerfile \
--tag quay.io/s3gw/s3gw:latest \
--tag quay.io/s3gw/s3gw:${{ github.ref_name }} \
.
docker push quay.io/s3gw/s3gw:latest
docker push quay.io/s3gw/s3gw:${{ github.ref_name }}
pre-release-smoke-test:
runs-on: ubuntu-latest
needs:
- build-s3gw
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Install S3cmd
run: |
sudo apt-get update
sudo apt-get install -y s3cmd
- name: Run Smoke Tests
run: |
source ceph/qa/rgw/store/sfs/tests/helpers.sh
CONTAINER=$(docker run --rm -d \
-p 7480:7480 \
quay.io/s3gw/s3gw:${{ github.ref_name }})
wait_for_http_200 "127.0.0.1:7480"
ceph/qa/rgw/store/sfs/tests/sfs-smoke-test.sh 127.0.0.1:7480
docker kill "$CONTAINER"
pre-release-on-disk-format-test:
runs-on: ubuntu-latest
needs:
- build-s3gw
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y s3cmd curl jq
- name: Run On-Disk Format Test
run: |
set -x
NEW_VERSION=${{ github.ref_name }}
OLD_VERSION_RAW="$(curl -L \
-H 'Accept: application/vnd.github+json' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
'https://api.github.com/repos/aquarist-labs/s3gw/releases/latest' \
| jq -r .name)"
OLD_VERSION="${OLD_VERSION_RAW//[^v0-9.]/}"
VERSION_AFTER_V=$(cut -d "v" -f2 <<< ${{ github.ref_name }})
VERSION_AFTER_RC=$(cut -d "-" -f1 <<< ${VERSION_AFTER_V})
ls -la $GITHUB_WORKSPACE/docs/release-notes
EXPECTED_RN_FILE="$GITHUB_WORKSPACE/docs/release-notes/s3gw-v${VERSION_AFTER_RC}.md"
if [ -f "$EXPECTED_RN_FILE" ]; then
export NEW_VERSION
export OLD_VERSION
tools/tests/on-disk-format-checker.sh || \
sed -n '/## Breaking Changes/,/## Known Issues/p' \
"${EXPECTED_RN_FILE}" | grep -i "format"
else
echo \
"Expected release-notes file: ${EXPECTED_RN_FILE} was not found"
exit 1
fi
# Build and push the ui container
build-s3gw-ui-container:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Quay Login
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and Push Container
uses: docker/build-push-action@v3
with:
push: true
tags: |
quay.io/s3gw/s3gw-ui:${{ github.ref_name }}
quay.io/s3gw/s3gw-ui:latest
file: ui/src/Dockerfile
context: ui/src
# Build and push the COSI sidecar and driver
build-s3gw-cosi-sidecar-and-driver:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Quay Login
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Build s3gw-cosi-sidecar
working-directory: cosi-sidecar
run: |
make build
- name: Build s3gw-cosi-driver
working-directory: cosi-driver
run: |
make build
- name: Build s3gw-cosi-sidecar Container
uses: docker/build-push-action@v3
with:
push: true
tags: |
quay.io/s3gw/s3gw-cosi-sidecar:${{ github.ref_name }}
quay.io/s3gw/s3gw-cosi-sidecar:latest
file: cosi-sidecar/Dockerfile
context: cosi-sidecar
- name: Build s3gw-cosi-driver Container
uses: docker/build-push-action@v3
with:
push: true
build-args: |
S3GW_VERSION=${{ github.ref_name }}
tags: |
quay.io/s3gw/s3gw-cosi-driver:${{ github.ref_name }}
quay.io/s3gw/s3gw-cosi-driver:latest
file: cosi-driver/Dockerfile
context: cosi-driver
draft-release:
runs-on: ubuntu-latest
needs:
- pre-release-smoke-test
- pre-release-on-disk-format-test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
body_path: docs/release-notes/latest
generate_release_notes: true
fail_on_unmatched_files: true
files: |
LICENSE
# Release the charts
# TODO