Skip to content

Commit

Permalink
Adding pulp rpm plugin in pulp core
Browse files Browse the repository at this point in the history
Since the tests in
``pulpcore/tests/functional/api/using_plugin/test_multiple_plugins.py``
needs multiple plugins incl. rpm to be installed, this commit adds RPM
installation to pulp core.
  • Loading branch information
ragabala committed Mar 20, 2019
1 parent e8cc199 commit a362065
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -v
COMMIT_MSG=$(git show HEAD^2 -s)
export COMMIT_MSG
export PULP_FILE_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp_file\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_RPM_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp_rpm\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_SMASH_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/PulpQE\/pulp-smash\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_PLUGIN_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulpcore-plugin\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_ROLES_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/ansible-pulp3\/pull\/(\d+)' | awk -F'/' '{print $7}')
Expand Down Expand Up @@ -33,6 +34,14 @@ if [ -n "$PULP_FILE_PR_NUMBER" ]; then
cd ..
fi

git clone https://github.com/pulp/pulp_rpm.git
if [ -n "$PULP_RPM_PR_NUMBER" ]; then
cd pulp_rpm
git fetch origin +refs/pull/$PULP_RPM_PR_NUMBER/merge
git checkout FETCH_HEAD
cd ..
fi

if [ -n "$PULP_SMASH_PR_NUMBER" ]; then
pip uninstall -y pulp-smash
git clone https://github.com/PulpQE/pulp-smash.git
Expand Down
3 changes: 3 additions & 0 deletions .travis/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
pulp-file:
app_label: "file"
source_dir: "/home/travis/build/pulp/pulp_file"
pulp-rpm:
app_label: "rpm"
source_dir: "/home/travis/build/pulp/pulp_rpm"
ansible_python_interpreter: '/opt/pyenv/shims/python3'
pulp_user: 'travis'
developer_user: 'travis'
Expand Down
4 changes: 2 additions & 2 deletions .travis/validate_commit_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ def check_status(issue):
regex = r'(?:{keywords})[\s:]+#(\d+)'.format(keywords=('|').join(KEYWORDS))
pattern = re.compile(regex)

issues = pattern.findall(message)
issues = pattern.findall(message, re.IGNORECASE)

if issues:
for issue in pattern.findall(message):
for issue in pattern.findall(message, re.IGNORECASE):
check_status(issue)
else:
sys.exit("Error: no attached issues found for {sha}. If this was intentional, add "
Expand Down

0 comments on commit a362065

Please sign in to comment.