Commit 06ee356c authored by David Danier's avatar David Danier 🚀
Browse files

mysql

parents
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+14 −0
Changes for .gitlab-ci.yml: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
# This file is a template, and might need editing before it works on your project.
# Official docker image.
image: docker:latest

services:
  - docker:dind

stages:
  - build

build:
  stage: build
  script:
    - /bin/sh build.sh

5.6/Dockerfile

0 → 100644
+3 −0
Changes for 5.6/Dockerfile: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
FROM mysql:5.6

COPY docker-entrypoint-set-charset.sh /docker-entrypoint-initdb.d/docker-entrypoint-set-charset.sh

5.7/Dockerfile

0 → 100644
+3 −0
Changes for 5.7/Dockerfile: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
FROM mysql:5.7

COPY docker-entrypoint-set-charset.sh /docker-entrypoint-initdb.d/docker-entrypoint-set-charset.sh

8/Dockerfile

0 → 100644
+3 −0
Changes for 8/Dockerfile: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
FROM mysql:8

COPY docker-entrypoint-set-charset.sh /docker-entrypoint-initdb.d/docker-entrypoint-set-charset.sh

build.sh

0 → 100755
+31 −0
Changes for build.sh: 31 added lines, 0 removed lines.
Original line number Diff line number Diff line
#!/bin/bash

# Configuration

VERSIONS="5 10"
LATEST_VERSION="10"

# Let's do it

if [ -z "$CI_REGISTRY" ]
then  # outside gitlab ci runner
    docker login docker.team23.de
    BUILD_PROJECT_NAME=$( basename $( pwd ) )
    BUILD_IMAGE_BASE="docker.team23.de/docker/$BUILD_PROJECT_NAME"
else  # inside gitlab ci runner
    docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
    BUILD_IMAGE_BASE="$CI_REGISTRY/$CI_PROJECT_PATH"
fi

for VERSION in $VERSIONS
do
    # Copy shared files
    cp -rp shared/* "$VERSION/"
    # Build Image
    docker build --pull -t "$BUILD_IMAGE_BASE:$VERSION" "$VERSION"
    docker push "$BUILD_IMAGE_BASE:$VERSION"
done

# Build latest image
docker build --pull -t "$BUILD_IMAGE_BASE:latest" "$LATEST_VERSION"
docker push "$BUILD_IMAGE_BASE:latest"
Loading