Skip to content

Commit

Permalink
Merge pull request #1540 from goosemania/travis-update
Browse files Browse the repository at this point in the history
Travis config update
  • Loading branch information
goosemania committed Nov 27, 2019
2 parents 2c62e67 + 849c7ea commit 3708978
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if [ -n "$PULP_OPERATOR_PR_NUMBER" ]; then
fi


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

if [ -n "$PULP_PR_NUMBER" ]; then
cd pulpcore
Expand Down
1 change: 1 addition & 0 deletions .travis/check_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fi

for sha in `git log --format=oneline --no-merges "$RANGE" | cut '-d ' -f1`
do
pip install requests
python .travis/validate_commit_message.py $sha
VALUE=$?

Expand Down
22 changes: 8 additions & 14 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
set -euv

if [ "$TEST" = 'docs' ]; then

pip install -r ../pulpcore/doc_requirements.txt

pip install -r doc_requirements.txt
fi

Expand Down Expand Up @@ -48,34 +46,30 @@ else
fi


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
---
images:
- ${PLUGIN}-${TAG}:
image_name: $PLUGIN
- pulp_rpm-${TAG}:
image_name: pulp_rpm
tag: $TAG
plugins:
- ./$PLUGIN
- ./pulp_rpm
VARSYAML
else
cat > vars/vars.yaml << VARSYAML
---
images:
- ${PLUGIN}-${TAG}:
image_name: $PLUGIN
- pulp_rpm-${TAG}:
image_name: pulp_rpm
tag: $TAG
pulpcore: ./pulpcore
plugins:
- ./$PLUGIN
- ./pulp_rpm
VARSYAML
fi
ansible-playbook build.yaml
ansible-playbook -v build.yaml

cd $TRAVIS_BUILD_DIR/../pulp-operator
# Tell pulp-perator to deploy our image
Expand All @@ -90,7 +84,7 @@ spec:
access_mode: "ReadWriteOnce"
# We have a little over 40GB free on Travis VMs/instances
size: "40Gi"
image: $PLUGIN
image: pulp_rpm
tag: $TAG
database_connection:
username: pulp
Expand Down
1 change: 1 addition & 0 deletions .travis/publish_client_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ cd pulp-openapi-generator
./generate.sh pulp_rpm python $VERSION
cd pulp_rpm-client
python setup.py sdist bdist_wheel --python-tag py3
twine check dist/* || exit 1
twine upload dist/* -u pulp -p $PYPI_PASSWORD
exit $?
1 change: 1 addition & 0 deletions .travis/publish_plugin_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ set -euv
pip install twine

python setup.py sdist bdist_wheel --python-tag py3
twine check dist/* || exit 1
twine upload dist/* -u pulp -p $PYPI_PASSWORD
6 changes: 3 additions & 3 deletions .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ set -u

if [[ "$TEST" == "performance" ]]; then
echo "--- Performance Tests ---"
if [[ -n $PERFORMANCE_TEST ]]; then
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_rpm.tests.performance.test_$PERFORMANCE_TEST || show_logs_and_return_non_zero
else
if [[ -z "$PERFORMANCE_TEST" ]]; then
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_rpm.tests.performance || show_logs_and_return_non_zero
else
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_rpm.tests.performance.test_$PERFORMANCE_TEST || show_logs_and_return_non_zero
fi
exit
fi
Expand Down
2 changes: 1 addition & 1 deletion .travis/validate_commit_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

KEYWORDS = ["fixes", "closes", "re", "ref"]
NO_ISSUE = "[noissue]"
STATUSES = ["NEW", "ASSIGNED", "POST"]
STATUSES = ["NEW", "ASSIGNED", "POST", "MODIFIED"]

sha = sys.argv[1]
message = subprocess.check_output(["git", "log", "--format=%B", "-n 1", sha]).decode("utf-8")
Expand Down
5 changes: 4 additions & 1 deletion template_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ plugin_dash_short: rpm
plugin_name: pulp_rpm
plugin_snake: pulp_rpm
pulp_settings: null
pulpcore_branch: master
pydocstyle: true
pypi_username: pulp
test_bindings: true
test_performance: ['sync', 'publish']
test_performance:
- sync
- publish
travis_notifications: None

0 comments on commit 3708978

Please sign in to comment.