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 fd6f821 commit 46d639d
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 40 deletions.
15 changes: 5 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,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.6'
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 @@ -61,30 +61,25 @@ jobs:
- stage: publish-daily-client-gem
script: bash .travis/publish_client_gem.sh
env:
- DB=postgres
- TEST=bindings
if: type = cron
- stage: publish-daily-client-pypi
script: bash .travis/publish_client_pypi.sh
env:
- DB=postgres
- TEST=bindings
if: type = cron
- stage: publish-client-gem
script: bash .travis/publish_client_gem.sh
env:
- DB=postgres
- TEST=bindings
if: tag IS present
- stage: publish-client-pypi
script: bash .travis/publish_client_pypi.sh
env:
- DB=postgres
- TEST=bindings
if: tag IS present
- stage: daily-performance-test
env:
- DB=postgres
- TEST=performance
if: type = cron
notifications: None
Expand Down
52 changes: 28 additions & 24 deletions .travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,20 @@ if [[ -n $(echo -e $COMMIT_MSG | grep -P "Required PR:.*" | grep -v "https") ]];
exit 1
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}')
export PULP_OPERATOR_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-operator\/pull\/(\d+)' | awk -F'/' '{print $7}')
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

# test_requirements contains tools needed for flake8, etc.
# So install them here rather than in install.sh
Expand Down Expand Up @@ -58,6 +66,10 @@ 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

Expand All @@ -76,29 +88,21 @@ fi
# build (they will be installed as dependencies of the plugin).
if [ -z "$TRAVIS_TAG" ]; then

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

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
git clone --depth=1 https://github.com/PulpQE/pulp-smash.git

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

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

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

# pulp-smash already got installed via test_requirements.txt
pip install --upgrade --force-reinstall ./pulp-smash
fi


pip install ansible

cd pulp_rpm
Expand Down
6 changes: 0 additions & 6 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ PLUGIN=pulp_rpm


# For pulpcore, and any other repo that might check out some plugin PR


if [ -n "$TRAVIS_TAG" ]; then
# Install the plugin only and use published PyPI packages for the rest
cat > vars/vars.yaml << VARSYAML
Expand All @@ -64,7 +62,6 @@ images:
tag: $TAG
plugins:
- ./$PLUGIN
VARSYAML
else
cat > vars/vars.yaml << VARSYAML
Expand All @@ -74,13 +71,10 @@ images:
image_name: $PLUGIN
tag: $TAG
pulpcore: ./pulpcore
pulpcore_plugin: ./pulpcore-plugin
plugins:
- ./$PLUGIN
VARSYAML
fi

ansible-playbook build.yaml

cd $TRAVIS_BUILD_DIR/../pulp-operator
Expand Down
2 changes: 2 additions & 0 deletions CHANGES/5580.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Depend on pulpcore, directly, instead of pulpcore-plugin.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# pulp-rpm

A Pulp plugin to support hosting your own rpm.

For more information, please see the [documentation](docs/index.rst) or the [Pulp project page](https://pulpproject.org/).
6 changes: 6 additions & 0 deletions pulp_rpm/app/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""
Check `Plugin Writer's Guide`_ for more details.
.. _Plugin Writer's Guide:
http://docs.pulpproject.org/en/3.0/nightly/plugins/plugin-writer/index.html
"""

0 comments on commit 46d639d

Please sign in to comment.