From 21e3ecd2cb6e187dbbd486d2834f84f74f9d66c3 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 21 Mar 2018 22:16:28 +1100 Subject: [PATCH] Added docker image test for CI --- .gitlab-ci.yml | 1 + Dockerfile | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef1d1b7..a8aeccd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,6 +81,7 @@ docker:7-8.1: - if [ -f init ]; then chmod 500 init; fi - docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . + - docker run ${CI_REGISTRY_IMAGE}:${VERSION} -h - docker push ${CI_REGISTRY_IMAGE}:${VERSION} - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} tags: diff --git a/Dockerfile b/Dockerfile index 9c095dc..dbea9bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,15 @@ FROM centos:7 -#RUN curl -SL ftp://public.dhe.ibm.com/storage/tivoli-storage-management/maintenance/client/v8r1/Linux/LinuxX86/BA/v812/8.1.2.0-TIV-TSMBAC-LinuxX86.tar | tar -C /tmp/ -xf - gskcrypt64-8.0.50.78.linux.x86_64.rpm gskssl64-8.0.50.78.linux.x86_64.rpm TIVsm-API64.x86_64.rpm && yum install -y /tmp/*rpm && rm -f /tmp/*rpm /var/cache/yum +# If using FTP source (change tar to not use z) +#RUN SOURCE_URL=ftp://public.dhe.ibm.com/storage/tivoli-storage-management/maintenance/client/v8r1/Linux/LinuxX86/BA/v812/8.1.2.0-TIV-TSMBAC-LinuxX86.tar \ -RUN SOURCE_URL=http://yum.leenooks.net/docker/tsmba && \ - PREFIX=TSMCLI_LNX/tsmcli/linux86 && \ - CHARS=$(echo ${PREFIX} | awk -F"/" '{print NF}') && \ - curl -SL ${SOURCE_URL}/8.1.4 | tar -C /tmp/ --strip-components ${CHARS} -xzf - ${PREFIX}/gskcrypt64-*.linux.x86_64.rpm ${PREFIX}/gskssl64-*.linux.x86_64.rpm ${PREFIX}/TIVsm-API64.x86_64.rpm && \ - yum install -y /tmp/*rpm && rm -rf /tmp/*rpm /var/cache/yum +# If using PPA source +RUN SOURCE_URL=http://yum.leenooks.net/docker/tsmba/8.1.4 \ + && PREFIX=TSMCLI_LNX/tsmcli/linux86 \ + && CHARS=$(echo ${PREFIX} | awk -F"/" '{print NF}') \ + && curl -SL ${SOURCE_URL} | tar -zC /tmp/ --strip-components ${CHARS} -xf - ${PREFIX}/gskcrypt64-*.linux.x86_64.rpm ${PREFIX}/gskssl64-*.linux.x86_64.rpm ${PREFIX}/TIVsm-API64.x86_64.rpm \ + && yum install -y /tmp/*rpm && rm -rf /tmp/*rpm /var/cache/yum RUN ln -s /tsm/dsm.sys /opt/tivoli/tsm/client/api/bin64/ \ && ln -s /tsm/dsm.opt /opt/tivoli/tsm/client/api/bin64/ \