Skip to content

Commit

Permalink
Problem: Travis will eventually check out the wrong plugin branches
Browse files Browse the repository at this point in the history
for pulpcore 3.0.

Solution:
1. Regenerate with latest plugin-template,
2. "repurpose" its var pulpcore_branch as the branch for
pulp_file: master/master & 3.0/0.1
3. Specify the current only branch for pulp-certguard: master
4. Add plugin-template's standard bash settings for robustness
and verbosity to pre_before_install.sh

Also cleanup the effectively empty .travis/post_script.sh

[noissue]

re: #5782
plugin-template needs to support both the pulpcore 3.0 and master branch for plugins
https://pulp.plan.io/issues/5782
  • Loading branch information
mikedep333 committed Nov 22, 2019
1 parent 0657f19 commit e12a3a5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis/install.sh
Expand Up @@ -56,7 +56,7 @@ PLUGIN=pulp_file
if [ -e $TRAVIS_BUILD_DIR/../pulp-certguard ]; then
PULP_CERTGUARD=./pulp-certguard
else
PULP_CERTGUARD=git+https://github.com/pulp/pulp-certguard.git
PULP_CERTGUARD=git+https://github.com/pulp/pulp-certguard.git@master
fi

cat > vars/vars.yaml << VARSYAML
Expand Down
1 change: 0 additions & 1 deletion .travis/post_script.sh

This file was deleted.

9 changes: 8 additions & 1 deletion .travis/pre_before_install.sh
@@ -1,8 +1,15 @@
#!/usr/bin/env bash
set -mveuo pipefail

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_CERTGUARD_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-certguard\/pull\/(\d+)' | awk -F'/' '{print $7}')

pip install yq
PULP_FILE_BRANCH=$(yq -r .pulpcore_branch ./template_config.yml)
echo PULP_FILE_BRANCH="$PULP_FILE_BRANCH"

cd ..
git clone https://github.com/pulp/pulp_file.git
git clone https://github.com/pulp/pulp_file.git --branch "$PULP_FILE_BRANCH"
if [ -n "$PULP_FILE_PR_NUMBER" ]; then
cd pulp_file
git fetch origin +refs/pull/$PULP_FILE_PR_NUMBER/merge
Expand Down
3 changes: 2 additions & 1 deletion template_config.yml
Expand Up @@ -2,7 +2,7 @@
# were not present before running plugin-template have been added with their default values.

additional_plugins:
- pulp-certguard
- { name: pulp-certguard, branch: master }
black: false
check_commit_message: true
coverage: true
Expand All @@ -22,6 +22,7 @@ plugin_dash_short: pulpcore
plugin_name: pulpcore
plugin_snake: pulpcore
pulp_settings: null
pulpcore_branch: master
pydocstyle: true
pypi_username: pulp
test_bindings: true
Expand Down

0 comments on commit e12a3a5

Please sign in to comment.