1
1
name : Building Image, Running Benchmarks and Deploying to Dockerhub
2
2
on :
3
+ # Launch on manual trigger
4
+ workflow_dispatch :
3
5
# Launch on any push
4
6
push :
5
7
pull_request :
11
13
types : [opened, synchronize, reopened]
12
14
13
15
env :
16
+ BASE_DEPLOY_URL : https://repo.hops.works/master
17
+ ARM_IMAGE_NAME : rondb-standalone-arm64
18
+ X86_IMAGE_NAME : rondb-standalone-amd64
19
+
14
20
RONDB_VERSION_LTS : 21.04.16
21
+ LTS_X86_TARBALL_NAME : rondb-21.04.16-linux-glibc2.17-x86_64.tar.gz
22
+ LTS_ARM_TARBALL_NAME : rondb-21.04.16-linux-glibc2.35-arm64_v8.tar.gz
23
+
15
24
RONDB_VERSION_STABLE : 22.10.1
16
- ARM_IMAGE_NAME : rondb-standalone-arm64
17
- AMD_IMAGE_NAME : rondb-standalone-amd64
25
+ STABLE_X86_TARBALL_NAME : rondb-22.10.1-linux-glibc2.28-x86_64.tar.gz
26
+ STABLE_ARM_TARBALL_NAME : rondb-22.10.1-linux-glibc2.35-arm64_v8.tar.gz
18
27
19
28
jobs :
20
29
integration-test-and-package :
21
30
runs-on : ubuntu-latest
22
31
steps :
23
- - uses : actions/checkout@v3
32
+ - uses : actions/checkout@v4
24
33
25
34
- name : Build and run Docker Compose cluster with benchmarking for RONDB_VERSION_LTS
26
35
run : |
27
36
./run.sh -lv \
28
- --rondb-tarball-url https://repo.hops.works/master/rondb-$RONDB_VERSION_LTS-linux-glibc2.28-x86_64.tar.gz \
37
+ --rondb-tarball-url $BASE_DEPLOY_URL/$LTS_X86_TARBALL_NAME \
29
38
--rondb-version $RONDB_VERSION_LTS \
30
39
--size mini \
31
40
--run-benchmark sysbench_single \
@@ -84,42 +93,46 @@ jobs:
84
93
username : hopsworks
85
94
password : ${{ secrets.DOCKERHUB_TOKEN }}
86
95
87
- - name : Build AMD64 image for RONDB_VERSION_STABLE
96
+ - name : Build X86 image for RONDB_VERSION_STABLE
88
97
if : github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
89
98
run : |
90
99
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
91
100
docker buildx build . \
92
101
--tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION \
93
102
--build-arg RONDB_VERSION=$RONDB_VERSION_STABLE \
94
103
--build-arg RONDB_TARBALL_LOCAL_REMOTE=remote \
95
- --build-arg RONDB_TARBALL_URI=https://repo.hops.works/master/rondb-$RONDB_VERSION_STABLE-linux-glibc2.28-x86_64.tar.gz
104
+ --build-arg RONDB_TARBALL_URI=$BASE_DEPLOY_URL/$STABLE_X86_TARBALL_NAME
96
105
97
106
# In the main branch, we work with "<version>-SNAPSHOT", which might as well be called "latest"
98
- - name : Push AMD64 *latest* images to Dockerhub
107
+ - name : Push X86 *latest* images to Dockerhub
99
108
if : github.repository == 'logicalclocks/rondb-docker' && github.ref_name == 'main'
100
109
run : |
101
110
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
102
- docker tag rondb-standalone:$RONDB_VERSION_LTS-$VERSION hopsworks/$AMD_IMAGE_NAME:$RONDB_VERSION_LTS-latest
103
- docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$AMD_IMAGE_NAME:$RONDB_VERSION_STABLE-latest
104
- docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$AMD_IMAGE_NAME:latest
105
- docker push hopsworks/$AMD_IMAGE_NAME:$RONDB_VERSION_LTS-latest
106
- docker push hopsworks/$AMD_IMAGE_NAME:$RONDB_VERSION_STABLE-latest
107
- docker push hopsworks/$AMD_IMAGE_NAME:latest
108
-
109
- - name : Push AMD64 *release* images to Dockerhub
111
+ docker tag rondb-standalone:$RONDB_VERSION_LTS-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION
112
+ docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION
113
+ docker tag rondb-standalone:$RONDB_VERSION_LTS-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-latest
114
+ docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_STABLE-latest
115
+ docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$X86_IMAGE_NAME:latest
116
+ docker push hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION
117
+ docker push hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION
118
+ docker push hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-latest
119
+ docker push hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_STABLE-latest
120
+ docker push hopsworks/$X86_IMAGE_NAME:latest
121
+
122
+ - name : Push X86 *release* images to Dockerhub
110
123
if : github.repository == 'logicalclocks/rondb-docker' && startsWith(github.ref_name, 'release-')
111
124
run : |
112
125
VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
113
- docker tag rondb-standalone:$RONDB_VERSION_LTS-$VERSION hopsworks/$AMD_IMAGE_NAME :$RONDB_VERSION_LTS-$VERSION
114
- docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$AMD_IMAGE_NAME :$RONDB_VERSION_STABLE-$VERSION
115
- docker push hopsworks/$AMD_IMAGE_NAME :$RONDB_VERSION_LTS-$VERSION
116
- docker push hopsworks/$AMD_IMAGE_NAME :$RONDB_VERSION_STABLE-$VERSION
126
+ docker tag rondb-standalone:$RONDB_VERSION_LTS-$VERSION hopsworks/$X86_IMAGE_NAME :$RONDB_VERSION_LTS-$VERSION
127
+ docker tag rondb-standalone:$RONDB_VERSION_STABLE-$VERSION hopsworks/$X86_IMAGE_NAME :$RONDB_VERSION_STABLE-$VERSION
128
+ docker push hopsworks/$X86_IMAGE_NAME :$RONDB_VERSION_LTS-$VERSION
129
+ docker push hopsworks/$X86_IMAGE_NAME :$RONDB_VERSION_STABLE-$VERSION
117
130
118
131
build-and-push-ARM64 :
119
132
runs-on : ubuntu-latest
120
133
if : github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
121
134
steps :
122
- - uses : actions/checkout@v3
135
+ - uses : actions/checkout@v4
123
136
124
137
- name : Set up QEMU
125
138
uses : docker/setup-qemu-action@v2
@@ -138,29 +151,27 @@ jobs:
138
151
# all types of benchmarking to the tests.
139
152
- name : Build and push ARM64 image for RONDB_VERSION_LTS
140
153
run : |
141
- if [[ "${{ startsWith(github.ref_name, 'release-') }}" == "true" ]]; then
142
- VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
143
- TAG="hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION"
144
- else
145
- TAG="hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-latest"
154
+ VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
155
+ TAGS="hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION"
156
+ if [[ "${{ github.ref_name == 'main' }}" == "true" ]]; then
157
+ TAGS+=" --tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-latest"
146
158
fi
147
159
docker buildx build . \
148
- --tag $TAG \
160
+ --tag $TAGS \
149
161
--platform=linux/arm64 \
150
162
--output type=registry \
151
163
--build-arg RONDB_VERSION=$RONDB_VERSION_LTS \
152
164
--build-arg RONDB_TARBALL_LOCAL_REMOTE=remote \
153
- --build-arg RONDB_TARBALL_URI=https://repo.hops.works/master/rondb-$RONDB_VERSION_LTS-linux-glibc2.35-arm64_v8.tar.gz \
165
+ --build-arg RONDB_TARBALL_URI=$BASE_DEPLOY_URL/$LTS_ARM_TARBALL_NAME \
154
166
--cache-to type=registry,ref=hopsworks/rondb-standalone-cache,mode=max \
155
167
--cache-from type=registry,ref=hopsworks/rondb-standalone-cache,mode=max
156
168
157
169
- name : Build and push ARM64 image for RONDB_VERSION_STABLE
158
170
run : |
159
- if [[ "${{ startsWith(github.ref_name, 'release-') }}" == "true" ]]; then
160
- VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
161
- TAGS="--tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION"
162
- else
163
- TAGS="--tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-latest"
171
+ VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
172
+ TAGS="--tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION"
173
+ if [[ "${{ github.ref_name == 'main' }}" == "true" ]]; then
174
+ TAGS+=" --tag hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-latest"
164
175
TAGS+=" --tag hopsworks/$ARM_IMAGE_NAME:latest"
165
176
fi
166
177
docker buildx build . \
@@ -169,7 +180,7 @@ jobs:
169
180
--output type=registry \
170
181
--build-arg RONDB_VERSION=$RONDB_VERSION_STABLE \
171
182
--build-arg RONDB_TARBALL_LOCAL_REMOTE=remote \
172
- --build-arg RONDB_TARBALL_URI=https://repo.hops.works/master/rondb-$RONDB_VERSION_STABLE-linux-glibc2.35-arm64_v8.tar.gz \
183
+ --build-arg RONDB_TARBALL_URI=$BASE_DEPLOY_URL/$STABLE_ARM_TARBALL_NAME \
173
184
--cache-to type=registry,ref=hopsworks/rondb-standalone-cache,mode=max \
174
185
--cache-from type=registry,ref=hopsworks/rondb-standalone-cache,mode=max
175
186
@@ -178,7 +189,7 @@ jobs:
178
189
if : github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
179
190
needs : [integration-test-and-package, build-and-push-ARM64]
180
191
steps :
181
- - uses : actions/checkout@v3
192
+ - uses : actions/checkout@v4
182
193
183
194
- name : Set up Docker Buildx
184
195
uses : docker/setup-buildx-action@v2
@@ -191,22 +202,26 @@ jobs:
191
202
192
203
- name : Create and push multi-platform image
193
204
run : |
194
- if [[ "${{ startsWith(github.ref_name, 'release-') }}" == "true" ]]; then
195
- VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
196
- docker buildx imagetools create -t hopsworks/rondb-standalone:$RONDB_VERSION_LTS-$VERSION \
197
- hopsworks/$AMD_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION \
198
- hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION
199
- docker buildx imagetools create -t hopsworks/rondb-standalone:$RONDB_VERSION_STABLE-$VERSION \
200
- hopsworks/$AMD_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION \
201
- hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION
202
- else
205
+ VERSION="$(< "./VERSION" sed -e 's/^[[:space:]]*//')"
206
+
207
+ # Using $VERSION will create weird `-SNAPSHOT` tags, when in main, but we need
208
+ # those Dockerhub images in order to run the main branch.
209
+
210
+ docker buildx imagetools create -t hopsworks/rondb-standalone:$RONDB_VERSION_LTS-$VERSION \
211
+ hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION \
212
+ hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-$VERSION
213
+ docker buildx imagetools create -t hopsworks/rondb-standalone:$RONDB_VERSION_STABLE-$VERSION \
214
+ hopsworks/$X86_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION \
215
+ hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-$VERSION
216
+
217
+ if [[ "${{ github.ref_name == 'main' }}" == "true" ]]; then
203
218
docker buildx imagetools create -t hopsworks/rondb-standalone:$RONDB_VERSION_LTS-latest \
204
- hopsworks/$AMD_IMAGE_NAME :$RONDB_VERSION_LTS-latest \
219
+ hopsworks/$X86_IMAGE_NAME :$RONDB_VERSION_LTS-latest \
205
220
hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_LTS-latest
206
221
docker buildx imagetools create -t hopsworks/rondb-standalone:$RONDB_VERSION_STABLE-latest \
207
- hopsworks/$AMD_IMAGE_NAME :$RONDB_VERSION_STABLE-latest \
222
+ hopsworks/$X86_IMAGE_NAME :$RONDB_VERSION_STABLE-latest \
208
223
hopsworks/$ARM_IMAGE_NAME:$RONDB_VERSION_STABLE-latest
209
224
docker buildx imagetools create -t hopsworks/rondb-standalone:latest \
210
- hopsworks/$AMD_IMAGE_NAME :latest \
225
+ hopsworks/$X86_IMAGE_NAME :latest \
211
226
hopsworks/$ARM_IMAGE_NAME:latest
212
227
fi
0 commit comments