From 399aa2107ebe2353ac76fd96e9c174407dea343f Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Wed, 26 Aug 2020 20:53:17 -0300 Subject: [PATCH] Run CI locally No-Issue --- .travis/local_test.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 .travis/local_test.sh diff --git a/.travis/local_test.sh b/.travis/local_test.sh new file mode 100755 index 0000000000..486aeec585 --- /dev/null +++ b/.travis/local_test.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# WARNING: DO NOT EDIT! +# +# This file was generated by plugin_template, and is managed by bootstrap.py. Please use +# bootstrap.py to update this file. +# +# For more info visit https://github.com/pulp/plugin_template + +set -euv + +# Copy current dir to /tmp +cd .. +rm -rf /tmp/CI_env +mkdir -p /tmp/CI_env +cp -R ./galaxy_ng /tmp/CI_env +cd /tmp/CI_env/galaxy_ng + +# Python venv +python3 -m venv .venv +source .venv/bin/activate + +# Setting travis env vars - https://docs.travis-ci.com/user/environment-variables/#default-environment-variables +export TRAVIS_BUILD_DIR=$PWD +export TRAVIS_PULL_REQUEST=false +export TRAVIS_TAG="" +export TRAVIS_BRANCH=$(git rev-parse --abbrev-ref HEAD) +export TRAVIS_PULL_REQUEST_BRANCH=$(git rev-parse --abbrev-ref HEAD) + +# Specify the test +export TEST="${TEST:-pulp}" + +# Ansible become +sed -i "s/start_container.yaml/start_container.yaml --become/g" .travis/install.sh + + +.travis/before_install.sh +.travis/install.sh +.travis/before_script.sh +.travis/script.sh + +# SELinux trick for: [Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!] +# https://github.com/ansible-community/molecule/issues/1724#issuecomment-460610492