Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoC - Run CI locally #405

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .travis/local_test.sh
Original file line number Diff line number Diff line change
@@ -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