@@ -76,14 +76,21 @@ jobs:
76
76
echo "is_highest=false" >> $GITHUB_ENV
77
77
fi
78
78
79
- integration -test-x86 :
79
+ build -test-push -x86 :
80
80
runs-on : ubuntu-latest
81
- if : ${{ inputs.skip_test == 'false' }}
82
81
needs : [check-git]
83
82
steps :
84
83
- uses : actions/checkout@v4
85
84
85
+ - name : Login to Dockerhub
86
+ uses : docker/login-action@v2
87
+ if : github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
88
+ with :
89
+ username : hopsworks
90
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
91
+
86
92
- name : Build and run Docker Compose cluster with benchmarking
93
+ if : ${{ inputs.skip_test == 'false' }}
87
94
run : |
88
95
./run.sh -lv \
89
96
--rondb-tarball-url $BASE_DOWNLOAD_URL/${{ inputs.rondb_x86_tarball_name }} \
93
100
--detached
94
101
95
102
- name : Wait for one container exit or timeout
103
+ if : ${{ inputs.skip_test == 'false' }}
96
104
run : |
97
105
start=`date +%s`
98
106
while true; do
@@ -111,17 +119,24 @@ jobs:
111
119
done
112
120
113
121
- run : docker container ls
122
+ if : ${{ inputs.skip_test == 'false' }}
114
123
- run : docker logs mgmd_1
124
+ if : ${{ inputs.skip_test == 'false' }}
115
125
- run : docker logs ndbd_1
126
+ if : ${{ inputs.skip_test == 'false' }}
116
127
- run : docker logs mysqld_1
128
+ if : ${{ inputs.skip_test == 'false' }}
117
129
- run : docker logs rest_1
130
+ if : ${{ inputs.skip_test == 'false' }}
118
131
- run : docker logs bench_1
132
+ if : ${{ inputs.skip_test == 'false' }}
119
133
120
134
# At this point we only know that one container has exited. We want to
121
135
# check whether the bench container has exited with exit code 0. We need
122
136
# both status and exit code to do so, since Docker reports exit code 0
123
137
# for running containers.
124
138
- name : Check Benchmarking Exit Code
139
+ if : ${{ inputs.skip_test == 'false' }}
125
140
run : |
126
141
if [ "$(docker inspect bench_1 --format='{{.State.Status}}')" != "exited" ]
127
142
then
@@ -136,16 +151,11 @@ jobs:
136
151
fi
137
152
138
153
- name : Printing Sysbench results
154
+ if : ${{ inputs.skip_test == 'false' }}
139
155
run : cat autogenerated_files/*/volumes/sysbench_single/final_result.txt
140
156
141
- build-x86 :
142
- runs-on : ubuntu-latest
143
- if : ${{ inputs.skip_test == 'true' }}
144
- steps :
145
- - uses : actions/checkout@v4
146
-
147
157
- name : Build X86 image
148
- if : github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
158
+ if : ${{ inputs.skip_test == 'true' }} && github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
149
159
run : |
150
160
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
151
161
docker buildx build . \
@@ -154,36 +164,17 @@ jobs:
154
164
--build-arg RONDB_TARBALL_LOCAL_REMOTE=remote \
155
165
--build-arg RONDB_X86_TARBALL_URI=$BASE_DOWNLOAD_URL/${{ inputs.rondb_x86_tarball_name }}
156
166
157
- # TODO: This doesn't have access to the images of the previous jobs
158
- push-x86 :
159
- runs-on : ubuntu-latest
160
- # It's always EITHER one or the other that will be run
161
- # https://github.com/actions/runner/issues/491#issuecomment-850884422
162
- needs : [check-git, integration-test-x86, build-x86]
163
- if : |
164
- always() &&
165
- (needs.integration-test-x86.result == 'success' || needs.integration-test-x86.result == 'skipped') &&
166
- (needs.build-x86.result == 'success' || needs.build-x86.result == 'skipped') &&
167
- github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
168
- steps :
169
- - uses : actions/checkout@v4
170
-
171
- - name : Login to Dockerhub
172
- uses : docker/login-action@v2
173
- with :
174
- username : hopsworks
175
- password : ${{ secrets.DOCKERHUB_TOKEN }}
176
-
177
167
- name : Push standard versioned image
168
+ if : github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
178
169
run : |
179
170
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
180
171
IMAGE_NAME=hopsworks/$X86_IMAGE_NAME:${{ inputs.rondb_version }}-$VERSION
181
172
182
173
docker tag rondb-standalone:${{ inputs.rondb_version }}-$VERSION $IMAGE_NAME
183
174
docker push $IMAGE_NAME
184
175
185
- # Our "latest" branch points to the latest *release* branch.
186
- - name : Push with "latest" tag (omit rondb-docker version)
176
+ - name : Push with tag `<rondb-version>- latest`
177
+ # Our "latest" branch points to the latest *release* branch.
187
178
if : needs.check-git.outputs.is_highest_release == 'true'
188
179
run : |
189
180
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
@@ -192,7 +183,7 @@ jobs:
192
183
docker tag rondb-standalone:${{ inputs.rondb_version }}-$VERSION $IMAGE_NAME
193
184
docker push $IMAGE_NAME
194
185
195
- - name : Push with "latest" tag (also omit rondb version)
186
+ - name : Push with tag `latest`
196
187
if : needs.check-git.outputs.is_highest_release == 'true' && ${{ inputs.is_latest_rondb_release == 'true' }}
197
188
run : |
198
189
VERSION="$(sed -e 's/^[[:space:]]*//' -e '/-SNAPSHOT$/s/.*/dev/' ./VERSION)"
@@ -201,7 +192,7 @@ jobs:
201
192
docker tag rondb-standalone:${{ inputs.rondb_version }}-$VERSION $IMAGE_NAME
202
193
docker push $IMAGE_NAME
203
194
204
- build-and- push-ARM64 :
195
+ build-push-arm64 :
205
196
runs-on : ubuntu-latest
206
197
if : github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
207
198
needs : [check-git]
@@ -247,7 +238,7 @@ jobs:
247
238
make-multi-platform-image :
248
239
runs-on : ubuntu-latest
249
240
if : github.repository == 'logicalclocks/rondb-docker' && (startsWith(github.ref_name, 'release-') || github.ref_name == 'main')
250
- needs : [check-git, push-x86, build-and- push-ARM64 ]
241
+ needs : [check-git, build-test- push-x86, build-push-arm64 ]
251
242
steps :
252
243
- uses : actions/checkout@v4
253
244
0 commit comments