Skip to content

Commit ea6c2bf

Browse files
authored
build: Pass MYSQL_VERISON ARG (mysql#21)
1 parent e39b12a commit ea6c2bf

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.buildkite/hooks/pre-command

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ git log -25000 --format='%H' | sort > tmp-log
99
git show-ref | grep tags/mysql-8 | sort > tmp-tags
1010
export CONTAINER_SEMVER=$(join tmp-log tmp-tags | sort -t. -n -k3 | tail -1 | cut -d- -f2)
1111
[ -n "$CONTAINER_SEMVER" ]
12+
export MYSQL_VERSION="${CONTAINER_SEMVER}"
1213
export CONTAINER_SEMVER="$CONTAINER_SEMVER.$TODAY"
1314
echo "Semantic version = \"${CONTAINER_SEMVER}\""
1415

Dockerfile.release

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
# Since we can't strip-components with ADD, we'll need to manually extract it
44
FROM debian:bullseye-slim as mysql-dist
5-
ARG MYSQL_VERSION=mysql-8.0.28-linux-x86_64
5+
ARG MYSQL_VERSION
66

77
ENV DEBIAN_FRONTEND noninteractive
88

99
RUN apt-get update && \
1010
apt-get install -y \
1111
binutils
1212

13-
COPY ${MYSQL_VERSION}.tar.gz /dist/
13+
COPY mysql-${MYSQL_VERSION}-linux-x86_64.tar.gz /dist/
1414

1515
RUN mkdir /dist/usr && \
16-
tar -xzvf /dist/${MYSQL_VERSION}.tar.gz -C /dist/usr --strip-components=1 && \
16+
tar -xzvf /dist/mysql-${MYSQL_VERSION}-linux-x86_64.tar.gz -C /dist/usr --strip-components=1 && \
1717
rm -rf /dist/usr/mysql-test && \
1818
strip /dist/usr/bin/mysql* || true
1919

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ services:
1212
build:
1313
context: ./dist
1414
dockerfile: ../Dockerfile.release
15+
args:
16+
- MYSQL_VERSION=${MYSQL_VERSION:?}
1517
environment:
1618
- BUILDKITE_BRANCH=${BUILDKITE_BRANCH}

0 commit comments

Comments
 (0)