Skip to content

Commit

Permalink
ci: Use travis to sync with gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuck Atkins committed May 10, 2020
1 parent 4d41038 commit 5198ab1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 25 additions & 0 deletions scripts/travis/run-olcf-gitlab-sync.sh
Original file line number Diff line number Diff line change
@@ -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 [email protected]:ecpcitest/ADIOS2 HEAD:github/pr${TRAVIS_PULL_REQUEST}
else
echo Hello World
fi


exit 0
6 changes: 6 additions & 0 deletions scripts/travis/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5198ab1

Please sign in to comment.