22
33# WARNING: DO NOT EDIT!
44#
5- # This file was generated by plugin_template, and is managed by bootstrap.py . Please use
6- # bootstrap.py to update this file.
5+ # This file was generated by plugin_template, and is managed by it . Please use
6+ # './plugin-template --travis pulp_python' to update this file.
77#
88# For more info visit https://github.com/pulp/plugin_template
99
@@ -16,27 +16,23 @@ COMMIT_MSG=$(git log --format=%B --no-merges -1)
1616export COMMIT_MSG
1717
1818if [ -f $PRE_BEFORE_INSTALL ]; then
19- $PRE_BEFORE_INSTALL
19+ source $PRE_BEFORE_INSTALL
2020fi
2121
2222if [[ -n $( echo -e $COMMIT_MSG | grep -P " Required PR:.*" | grep -v " https" ) ]]; then
2323 echo " Invalid Required PR link detected in commit message. Please use the full https url."
2424 exit 1
2525fi
2626
27- if [ " $TRAVIS_PULL_REQUEST " != " false" ] || [ -z " $TRAVIS_TAG " -a " $TRAVIS_BRANCH " != " master" ]
27+ if [ " $TRAVIS_PULL_REQUEST " != " false" ] || [ -z " $TRAVIS_TAG " -a " $TRAVIS_BRANCH " != " master" ]
2828then
29- export PULP_PR_NUMBER=$( echo $COMMIT_MSG | grep -oP ' Required\ PR:\ https\:\/\/github\.com\/pulp\/pulpcore\/pull\/(\d+)' | awk -F' /' ' {print $7}' )
30- export PULP_SMASH_PR_NUMBER=$( echo $COMMIT_MSG | grep -oP ' Required\ PR:\ https\:\/\/github\.com\/PulpQE\/pulp-smash\/pull\/(\d+)' | awk -F' /' ' {print $7}' )
31- export PULP_ROLES_PR_NUMBER=$( echo $COMMIT_MSG | grep -oP ' Required\ PR:\ https\:\/\/github\.com\/pulp\/ansible-pulp\/pull\/(\d+)' | awk -F' /' ' {print $7}' )
32- 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}' )
33- export PULP_OPERATOR_PR_NUMBER=$( echo $COMMIT_MSG | grep -oP ' Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-operator\/pull\/(\d+)' | awk -F' /' ' {print $7}' )
29+ export PULPCORE_PR_NUMBER=$( echo $COMMIT_MSG | grep -oP ' Required\ PR:\ https\:\/\/github\.com\/pulp\/pulpcore\/pull\/(\d+)' | awk -F' /' ' {print $7}' )
30+ export PULP_SMASH_PR_NUMBER=$( echo $COMMIT_MSG | grep -oP ' Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-smash\/pull\/(\d+)' | awk -F' /' ' {print $7}' )
31+ export PULP_OPENAPI_GENERATOR_PR_NUMBER=$( echo $COMMIT_MSG | grep -oP ' Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-openapi-generator\/pull\/(\d+)' | awk -F' /' ' {print $7}' )
3432else
35- export PULP_PR_NUMBER =
33+ export PULPCORE_PR_NUMBER =
3634 export PULP_SMASH_PR_NUMBER=
37- export PULP_ROLES_PR_NUMBER=
38- export PULP_BINDINGS_PR_NUMBER=
39- export PULP_OPERATOR_PR_NUMBER=
35+ export PULP_OPENAPI_GENERATOR_PR_NUMBER=
4036fi
4137
4238# dev_requirements contains tools needed for flake8, etc.
@@ -51,50 +47,45 @@ pip install -r dev_requirements.txt
5147# Lint code.
5248flake8 --config flake8.cfg
5349
54- cd ..
55- git clone --depth=1 https://github.com/pulp/ansible-pulp.git
56- if [ -n " $PULP_ROLES_PR_NUMBER " ]; then
57- cd ansible-pulp
58- git fetch --depth=1 origin +refs/pull/$PULP_ROLES_PR_NUMBER /merge
59- git checkout FETCH_HEAD
60- cd ..
61- fi
50+ # check for imports from pulpcore that aren't pulpcore.plugin
51+ ./.travis/check_pulpcore_imports.sh
6252
53+ cd ..
6354
64- git clone --depth=1 https://github.com/pulp/pulp-operator.git
65- if [ -n " $PULP_OPERATOR_PR_NUMBER " ]; then
66- cd pulp-operator
67- git fetch --depth=1 origin +refs/pull/$PULP_OPERATOR_PR_NUMBER /merge
68- git checkout FETCH_HEAD
69- RELEASE_VERSION=v0.9.0
70- curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /operator-sdk-${RELEASE_VERSION} -x86_64-linux-gnu
71- 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
72- sudo operator-sdk build --image-builder=docker quay.io/pulp/pulp-operator:latest
55+ git clone https://github.com/pulp/pulp-openapi-generator.git
56+ if [ -n " $PULP_OPENAPI_GENERATOR_PR_NUMBER " ]; then
57+ cd pulp-openapi-generator
58+ git fetch origin pull/$PULP_OPENAPI_GENERATOR_PR_NUMBER /head:$PULP_OPENAPI_GENERATOR_PR_NUMBER
59+ git checkout $PULP_OPENAPI_GENERATOR_PR_NUMBER
7360 cd ..
7461fi
7562
63+ cd pulp-openapi-generator
64+ sed -i -e ' s/localhost:24817/pulp/g' generate.sh
65+ sed -i -e ' s/:24817/pulp/g' generate.sh
66+ cd ..
7667
77- git clone --depth=1 https://github.com/pulp/pulpcore.git
68+ git clone --depth=1 https://github.com/pulp/pulpcore.git --branch master
7869
79- if [ -n " $PULP_PR_NUMBER " ]; then
80- cd pulpcore
81- git fetch --depth=1 origin +refs/pull/$PULP_PR_NUMBER /merge
82- git checkout FETCH_HEAD
83- cd ..
70+ cd pulpcore
71+ if [ -n " $PULPCORE_PR_NUMBER " ]; then
72+ git fetch --depth=1 origin pull/$PULPCORE_PR_NUMBER /head:$PULPCORE_PR_NUMBER
73+ git checkout $PULPCORE_PR_NUMBER
8474fi
75+ cd ..
8576
8677
8778
8879# When building a (release) tag, we don't need the development modules for the
8980# build (they will be installed as dependencies of the plugin).
9081if [ -z " $TRAVIS_TAG " ]; then
9182
92- git clone --depth=1 https://github.com/PulpQE /pulp-smash.git
83+ git clone --depth=1 https://github.com/pulp /pulp-smash.git
9384
9485 if [ -n " $PULP_SMASH_PR_NUMBER " ]; then
9586 cd pulp-smash
96- git fetch --depth=1 origin +refs/ pull/$PULP_SMASH_PR_NUMBER /merge
97- git checkout FETCH_HEAD
87+ git fetch --depth=1 origin pull/$PULP_SMASH_PR_NUMBER /head: $PULP_SMASH_PR_NUMBER
88+ git checkout $PULP_SMASH_PR_NUMBER
9889 cd ..
9990 fi
10091
@@ -104,10 +95,17 @@ if [ -z "$TRAVIS_TAG" ]; then
10495fi
10596
10697
107- pip install ansible
98+ # Intall requirements for ansible playbooks
99+ pip install docker netaddr boto3
100+
101+ # Install ansible with the boto3 tags to dict fix
102+ # There is a PR for this issue:
103+ # https://github.com/ansible-collections/amazon.aws/pull/37
104+ # Be aware, that the code will have moved to that collection with upcoming releases of ansible
105+ pip install git+https://github.com/mdellweg/ansible.git@fix_boto3_tags_dict
108106
109107cd pulp_python
110108
111109if [ -f $POST_BEFORE_INSTALL ]; then
112- $POST_BEFORE_INSTALL
110+ source $POST_BEFORE_INSTALL
113111fi
0 commit comments