Commit 6213c8f4 authored by Fabio Montefuscolo's avatar Fabio Montefuscolo
Browse files

add version info

parent febe9a87
......@@ -8,18 +8,29 @@ stages:
variables:
IMAGE_TAGGED: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
IMAGE_LATEST: $CI_REGISTRY_IMAGE:latest
VERSION_INFO: "${CI_COMMIT_SHA} ${CI_COMMIT_REF_NAME} ${GITLAB_USER_NAME}"
build:
stage: build
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN hub.hacklab.com.br
- docker build -t $IMAGE_TAGGED .
- docker build --build-arg="version_info=$VERSION_INFO" -t $IMAGE_TAGGED .
- docker push $IMAGE_TAGGED
only:
- /master/
tags:
- docker:dind
build:
stage: build
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN hub.hacklab.com.br
- docker build --build-arg="version_info=$VERSION_INFO" -t $IMAGE_TAGGED .
- docker tag $IMAGE_TAGGED $IMAGE_LATEST
- docker push $IMAGE_TAGGED
- docker push $IMAGE_LATEST
only:
- tags
- /master/
tags:
- docker:dind
......@@ -12,7 +12,8 @@ ENV MYSQL_DATABASE="database"
ENV MYSQL_USER="pxcuser"
ENV MYSQL_PASSWORD="pxcpass"
ENV XTRABACKUP_PASSWORD="password"
ENV MYSQL_LOG_FILE=/var/log/mysqld.log
ENV MYSQL_LOG_FILE="/var/log/mysqld.log"
ARG version_info="hacklab/docker-pxc"
RUN groupadd -r mysql && useradd -r -m -d "${PXC_HOME}" -g mysql mysql \
&& apt-get update \
......@@ -25,7 +26,11 @@ RUN groupadd -r mysql && useradd -r -m -d "${PXC_HOME}" -g mysql mysql \
&& mkdir -m 755 -p "${PXC_DATA}" "${PXC_RUN}" \
&& chown -R mysql: "${PXC_DATA}" "${PXC_RUN}" \
&& rm pxc.deb \
&& rm /etc/mysql/my.cnf.old
&& rm /etc/mysql/my.cnf.old \
&& { \
date; \
printf "%-45s %-45s %s" $version_info; \
} > ${PXC_HOME}/versioninfo.txt
RUN { \
echo "[mysqld]"; \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment