From 029130cdbd00ad4715c3547b572ed7d19977ce4a Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Wed, 23 Oct 2019 03:18:14 -0400 Subject: [PATCH] Depend on pulpcore directly instead of pulpcore-plugin Required PR: https://github.com/pulp/pulpcore/pull/347 re: #5580 https://pulp.plan.io/issues/5580 --- .travis/before_install.sh | 52 +++++++++++++++++++++------------------ .travis/install.sh | 6 ----- .travis/script.sh | 2 +- CHANGES/5580.misc | 2 ++ 4 files changed, 31 insertions(+), 31 deletions(-) create mode 100644 CHANGES/5580.misc diff --git a/.travis/before_install.sh b/.travis/before_install.sh index 17f16c71..3cab3dd0 100755 --- a/.travis/before_install.sh +++ b/.travis/before_install.sh @@ -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 @@ -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 @@ -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_python diff --git a/.travis/install.sh b/.travis/install.sh index e069fd8e..98ff619f 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -52,8 +52,6 @@ PLUGIN=pulp_python # 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 @@ -64,7 +62,6 @@ images: tag: $TAG plugins: - ./$PLUGIN - VARSYAML else cat > vars/vars.yaml << VARSYAML @@ -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 diff --git a/.travis/script.sh b/.travis/script.sh index a6bfa44d..9b7eec42 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -104,7 +104,7 @@ set -u if [[ "$TEST" == "performance" ]]; then echo "--- Performance Tests ---" - pytest -vv -r sx --color=yes --pyargs --durations=0 pulp_python.tests.performance || show_logs_and_return_non_zero + pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_python.tests.performance || show_logs_and_return_non_zero exit fi diff --git a/CHANGES/5580.misc b/CHANGES/5580.misc new file mode 100644 index 00000000..c53f440c --- /dev/null +++ b/CHANGES/5580.misc @@ -0,0 +1,2 @@ +Depend on pulpcore, directly, instead of pulpcore-plugin. +