Skip to content

Commit

Permalink
Depend on pulpcore directly instead of pulpcore-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
dralley committed Oct 23, 2019
1 parent 679602c commit 2fa1b74
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 81 deletions.
15 changes: 5 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ python:
- "3.7"
env:
matrix:
- DB=postgres TEST=pulp
- DB=postgres TEST=docs
- DB=postgres TEST=bindings

- TEST=pulp
- TEST=docs
- TEST=bindings
matrix:
exclude:
- python: '3.7'
env: DB=postgres TEST=bindings
env: TEST=bindings
- python: '3.6'
env: DB=postgres TEST=docs
env: TEST=docs
fast_finish: true
services:
- postgresql
Expand Down Expand Up @@ -53,25 +52,21 @@ jobs:
- stage: publish-daily-client-gem
script: PULP_SETTINGS=/etc/pulp/settings.py bash .travis/publish_client_gem.sh
env:
- DB=postgres
- TEST=bindings
if: type = cron
- stage: publish-daily-client-pypi
script: PULP_SETTINGS=/etc/pulp/settings.py bash .travis/publish_client_pypi.sh
env:
- DB=postgres
- TEST=bindings
if: type = cron
- stage: publish-client-gem
script: PULP_SETTINGS=/etc/pulp/settings.py bash .travis/publish_client_gem.sh
env:
- DB=postgres
- TEST=bindings
if: tag IS present
- stage: publish-client-pypi
script: PULP_SETTINGS=/etc/pulp/settings.py bash .travis/publish_client_pypi.sh
env:
- DB=postgres
- TEST=bindings
if: tag IS present

Expand Down
79 changes: 47 additions & 32 deletions .travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,28 @@ if [ -f $PRE_BEFORE_INSTALL ]; then
$PRE_BEFORE_INSTALL
fi

export PULP_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulpcore\/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_SMASH_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/PulpQE\/pulp-smash\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_ROLES_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/ansible-pulp\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_BINDINGS_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-openapi-generator\/pull\/(\d+)' | awk -F'/' '{print $7}')
if [[ -n $(echo -e $COMMIT_MSG | grep -P "Required PR:.*" | grep -v "https") ]]; then
echo "Invalid Required PR link detected in commit message. Please use the full https url."
exit 1
fi

if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ -z "$TRAVIS_TAG" -a "$TRAVIS_BRANCH" != "master"]
then
export PULP_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulpcore\/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_ROLES_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/ansible-pulp\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_BINDINGS_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-openapi-generator\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_OPERATOR_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-operator\/pull\/(\d+)' | awk -F'/' '{print $7}')
else
export PULP_PR_NUMBER=
export PULP_SMASH_PR_NUMBER=
export PULP_ROLES_PR_NUMBER=
export PULP_BINDINGS_PR_NUMBER=
export PULP_OPERATOR_PR_NUMBER=
fi

# dev_requirements should not be needed for testing; don't install them to make sure
# test_requirements contains tools needed for flake8, etc.
# So install them here rather than in install.sh
pip install -r test_requirements.txt

# check the commit message
Expand All @@ -39,48 +54,49 @@ flake8 --config flake8.cfg

cd ..
git clone --depth=1 https://github.com/pulp/ansible-pulp.git
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
if [ -n "$PULP_ROLES_PR_NUMBER" ]; then
cd ansible-pulp
git fetch --depth=1 origin +refs/pull/$PULP_ROLES_PR_NUMBER/merge
git checkout FETCH_HEAD
cd ..
fi
if [ -n "$PULP_ROLES_PR_NUMBER" ]; then
cd ansible-pulp
git fetch --depth=1 origin +refs/pull/$PULP_ROLES_PR_NUMBER/merge
git checkout FETCH_HEAD
cd ..
fi

git clone --depth=1 https://github.com/pulp/pulpcore.git

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
if [ -n "$PULP_PR_NUMBER" ]; then
cd pulpcore
git fetch --depth=1 origin +refs/pull/$PULP_PR_NUMBER/merge
git checkout FETCH_HEAD
cd ..
fi
git clone --depth=1 https://github.com/pulp/pulp-operator.git
if [ -n "$PULP_OPERATOR_PR_NUMBER" ]; then
cd pulp-operator
git fetch --depth=1 origin +refs/pull/$PULP_OPERATOR_PR_NUMBER/merge
git checkout FETCH_HEAD
RELEASE_VERSION=v0.9.0
curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu
chmod +x operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu && sudo mkdir -p /usr/local/bin/ && sudo cp operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/operator-sdk && rm operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu
sudo operator-sdk build --image-builder=docker quay.io/pulp/pulp-operator:latest
cd ..
fi


git clone --depth=1 https://github.com/pulp/pulpcore-plugin.git
git clone --depth=1 https://github.com/pulp/pulpcore.git

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
if [ -n "$PULP_PLUGIN_PR_NUMBER" ]; then
cd pulpcore-plugin
git fetch --depth=1 origin +refs/pull/$PULP_PLUGIN_PR_NUMBER/merge
git checkout FETCH_HEAD
cd ..
fi
if [ -n "$PULP_PR_NUMBER" ]; then
cd pulpcore
git fetch --depth=1 origin +refs/pull/$PULP_PR_NUMBER/merge
git checkout FETCH_HEAD
cd ..
fi


git clone --depth=1 https://github.com/PulpQE/pulp-smash.git
# When building a (release) tag, we don't need the development modules for the
# build (they will be installed as dependencies of the plugin).
if [ -z "$TRAVIS_TAG" ]; then
git clone --depth=1 https://github.com/PulpQE/pulp-smash.git

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
if [ -n "$PULP_SMASH_PR_NUMBER" ]; then
cd pulp-smash
git fetch --depth=1 origin +refs/pull/$PULP_SMASH_PR_NUMBER/merge
git checkout FETCH_HEAD
cd ..
fi

# pulp-smash already got installed via test_requirements.txt
pip install --upgrade --force-reinstall ./pulp-smash
fi
Expand All @@ -89,7 +105,6 @@ psql -c 'CREATE DATABASE pulp OWNER travis;'

pip install ansible
cp pulp_ansible/.travis/playbook.yml ansible-pulp/playbook.yml
cp pulp_ansible/.travis/postgres.yml ansible-pulp/postgres.yml

cd pulp_ansible

Expand Down
4 changes: 3 additions & 1 deletion .travis/check_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#
# For more info visit https://github.com/pulp/plugin_template

set -euv

# skip this check for everything but PRs
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
exit 0
Expand All @@ -18,7 +20,7 @@ elif [ "$TRAVIS_COMMIT" != "" ]; then
RANGE=$TRAVIS_COMMIT
fi

# Travis sends the ranges with 3 dots. Git only wants one.
# Travis sends the ranges with 3 dots. Git only wants two.
if [[ "$RANGE" == *...* ]]; then
RANGE=`echo $TRAVIS_COMMIT_RANGE | sed 's/\.\.\./../'`
else
Expand Down
9 changes: 0 additions & 9 deletions .travis/mariadb.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .travis/postgres.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGES/5580.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Depend on pulpcore, directly, instead of pulpcore-plugin.
41 changes: 21 additions & 20 deletions template_config.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
# This config represents the latest values used when running the plugin-template. Any settings that
# were not present before running plugin-template have been added with their default values.

all: False
bootstrap: False
docs: False
additional_plugins: []
all: false
black: true
bootstrap: false
check_commit_message: true
coverage: false
deploy_client_to_pypi: true
deploy_client_to_rubygems: true
deploy_daily_client_to_pypi: true
deploy_daily_client_to_rubygems: true
deploy_to_pypi: true
docs: false
docs_test: true
plugin_app_label: ansible
plugin_camel: PulpAnsible
plugin_camel_short: Ansible
plugin_caps: PULP_ANSIBLE
plugin_caps_short: ANSIBLE
plugin_dash: pulp-ansible
plugin_dash_short: ansible
plugin_name: ansible
plugin_name: pulp_ansible
plugin_snake: pulp_ansible
plugin_snake_short: ansible
pydocstyle: true
pypi_username: pulp
test: False
black: True
check_commit_message: True
coverage: False
deploy_client_to_pypi: True
deploy_client_to_rubygems: True
deploy_daily_client_to_pypi: True
deploy_daily_client_to_rubygems: True
deploy_to_pypi: True
docs_test: True
pydocstyle: True
test_bindings: True
plugin_app_label: ansible
test: false
test_bindings: true
test_performance: false
travis_notifications:
irc:
channels:
- "chat.freenode.net#pulp-ansible"
on_success: change
- chat.freenode.net#pulp-ansible
on_failure: always

on_success: change

0 comments on commit 2fa1b74

Please sign in to comment.