diff --git a/.travis.yml b/.travis.yml index 865483e82d..8d2686a4fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ install: - git config --global clangformat.binary ${HOME}/clang+llvm-7.0.1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-format env: matrix: + - BUILD_MATRIX_ENTRY=olcf-gitlab-sync - BUILD_MATRIX_ENTRY=format - BUILD_MATRIX_ENTRY=docker-ubuntu1804 - BUILD_MATRIX_ENTRY=docker-ubuntu1910 diff --git a/scripts/travis/run-olcf-gitlab-sync.sh b/scripts/travis/run-olcf-gitlab-sync.sh new file mode 100755 index 0000000000..4aa5d533cb --- /dev/null +++ b/scripts/travis/run-olcf-gitlab-sync.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +if [ -z "${SOURCE_DIR}" ] +then + echo "Error: SOURCE_DIR is empty or undefined" + exit 1 +fi + +cd ${SOURCE_DIR} + +echo "ADIOS2_OLCF_GITLAB_DEPLOY_KEY_BASE64" | base64 -d > /tmp/deploykey + +env | sort + + +GIT_SSH_COMMAND="ssh -i /tmp/deploykey -F /dev/null" +if [ -n "${TRAVIS_PULL_REQUEST}" ] +then + git push -f git@code.ornl.gov:ecpcitest/ADIOS2 HEAD:github/pr${TRAVIS_PULL_REQUEST} +else + echo Hello World +fi + + +exit 0 diff --git a/scripts/travis/run.sh b/scripts/travis/run.sh index 47d5d1c8c7..15138bc39c 100755 --- a/scripts/travis/run.sh +++ b/scripts/travis/run.sh @@ -13,6 +13,12 @@ fi case ${BUILD_MATRIX_ENTRY} in + olcf-gitlab-sync) + echo "Running OLCF GitLab Sync" + if ! ${SOURCE_DIR}/scripts/travis/run-olcf-gitlab-sync.sh; then + exit 1; + fi + ;; format) echo "Running formatting tests" if ! ${SOURCE_DIR}/scripts/travis/run-format.sh; then