From a45df79e27d2509dcf37dbbe844bc9d955b34de2 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 23 Jun 2016 22:04:57 +1000 Subject: [PATCH] Added gitlab runner config for CentOS 7 --- .gitlab-ci.yml | 46 ++++++++++++++++++++++++++++++++++++++-------- test/dsm.opt | 0 test/test.sh | 8 +++++--- 3 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 test/dsm.opt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 03df1a7..b36e7c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,27 +1,57 @@ -# Compile on CentOS 6.x, for some reason compiling on CentOS 7.x results in buffer corruption stages: - build - test -cache: - untracked: true - -test:6-7.1:build: +# Compile on CentOS 6.x, for some reason compiling on CentOS 7.x results in buffer corruption +build:6-7.1: stage: build image: leenooks/ci-tsm:6-7.1 script: - make -f Makefile.linux64 only: - - master + - test tags: - C + artifacts: + name: "$CI_BUILD_NAME" + paths: + - tsmpipe -test:6-7.1:test: +test:6-7.1: stage: test image: leenooks/ci-tsm:6-7.1 + dependencies: + - build:6-7.1 script: - cd test && ./test.sh only: - - master + - test + tags: + - C + +# Compile on CentOS 6.x, for some reason compiling on CentOS 7.x results in buffer corruption +build:7-7.1: + stage: build + image: leenooks/ci-tsm:7-7.1 + script: + - make -f Makefile.linux64 + only: + - test + tags: + - C + artifacts: + name: "$CI_BUILD_NAME" + paths: + - tsmpipe + +test:7-7.1: + stage: test + image: leenooks/ci-tsm:7-7.1 + dependencies: + - build:7-7.1 + script: + - cd test && ./test.sh + only: + - test tags: - C diff --git a/test/dsm.opt b/test/dsm.opt new file mode 100644 index 0000000..e69de29 diff --git a/test/test.sh b/test/test.sh index 1eafbc3..bba22c3 100755 --- a/test/test.sh +++ b/test/test.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/bin/sh +set -e FILE=random.1m # Create TEST File @@ -11,6 +12,7 @@ echo "MD5 of [${FILE}] is [${MD5}] (${SIZE})" ln -s /opt/tivoli/tsm/client/api/bin64/EN_US export DSMI_DIR=./ +export DSMI_CONFIG=dsm.opt # Send file to TSM echo "+ TEST SEND FILE!" @@ -31,11 +33,11 @@ RETRIEVE=$(md5sum ${FILE}.back | awk '{print $1}') if [ "${MD5}" != "${RETRIEVE}" ]; then exit 1 else - echo "+ RETRIEVE VALID!" + echo "+ RETRIEVE VALID (${RETRIEVE})!" fi # Delete it echo "+ TEST DELETE!" -./${TSMPIPE} -Bds /test -f ${FILE} -vvv -O"-VIRTUALNODENAME=TEST -PASSWORD=TEST" +${TSMPIPE} -Bds /test -f ${FILE} -vvv -O"-VIRTUALNODENAME=TEST -PASSWORD=TEST" rm -f EN_US ${FILE} ${FILE}.back