Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solution: use plugin-template to update travis config The code is now also formatted with black. Migrations are committed. closes: #5217 https://pulp.plan.io/issues/5217
- Loading branch information
Showing
33 changed files
with
564 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,87 @@ | ||
#!/usr/bin/env sh | ||
set -v | ||
#!/usr/bin/env bash | ||
|
||
COMMIT_MSG=$(git show HEAD^2 -s) | ||
# WARNING: DO NOT EDIT! | ||
# | ||
# This file was generated by plugin_template, and is managed by bootstrap.py. Please use | ||
# bootstrap.py to update this file. | ||
# | ||
# For more info visit https://github.com/pulp/plugin_template | ||
|
||
set -mveuo pipefail | ||
|
||
export PRE_BEFORE_INSTALL=$TRAVIS_BUILD_DIR/.travis/pre_before_install.sh | ||
export POST_BEFORE_INSTALL=$TRAVIS_BUILD_DIR/.travis/post_before_install.sh | ||
|
||
COMMIT_MSG=$(git log --format=%B --no-merges -1) | ||
export COMMIT_MSG | ||
|
||
if [ -f $PRE_BEFORE_INSTALL ]; then | ||
$PRE_BEFORE_INSTALL | ||
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}') | ||
|
||
# dev_requirements should not be needed for testing; don't install them to make sure | ||
pip install -r test_requirements.txt | ||
|
||
# check the commit message | ||
./.travis/check_commit.sh | ||
|
||
# run black separately from flake8 to get a diff | ||
black --check --diff . | ||
|
||
# Lint code. | ||
flake8 --config flake8.cfg || exit 1 | ||
flake8 --config flake8.cfg | ||
|
||
cd .. | ||
git clone https://github.com/pulp/ansible-pulp.git | ||
git clone --depth=1 https://github.com/pulp/ansible-pulp.git | ||
if [ -n "$PULP_ROLES_PR_NUMBER" ]; then | ||
pushd ansible-pulp | ||
git fetch origin +refs/pull/$PULP_ROLES_PR_NUMBER/merge | ||
cd ansible-pulp | ||
git fetch --depth=1 origin +refs/pull/$PULP_ROLES_PR_NUMBER/merge | ||
git checkout FETCH_HEAD | ||
popd | ||
cd .. | ||
fi | ||
|
||
git clone https://github.com/pulp/pulpcore.git | ||
git clone --depth=1 https://github.com/pulp/pulpcore.git | ||
|
||
if [ -n "$PULP_PR_NUMBER" ]; then | ||
pushd pulpcore | ||
git fetch origin +refs/pull/$PULP_PR_NUMBER/merge | ||
cd pulpcore | ||
git fetch --depth=1 origin +refs/pull/$PULP_PR_NUMBER/merge | ||
git checkout FETCH_HEAD | ||
popd | ||
cd .. | ||
fi | ||
|
||
|
||
git clone https://github.com/pulp/pulpcore-plugin.git | ||
git clone --depth=1 https://github.com/pulp/pulpcore-plugin.git | ||
|
||
if [ -n "$PULP_PLUGIN_PR_NUMBER" ]; then | ||
pushd pulpcore-plugin | ||
git fetch origin +refs/pull/$PULP_PLUGIN_PR_NUMBER/merge | ||
cd pulpcore-plugin | ||
git fetch --depth=1 origin +refs/pull/$PULP_PLUGIN_PR_NUMBER/merge | ||
git checkout FETCH_HEAD | ||
popd | ||
cd .. | ||
fi | ||
|
||
|
||
if [ -n "$PULP_SMASH_PR_NUMBER" ]; then | ||
git clone https://github.com/PulpQE/pulp-smash.git | ||
pushd pulp-smash | ||
git fetch origin +refs/pull/$PULP_SMASH_PR_NUMBER/merge | ||
git clone --depth=1 https://github.com/PulpQE/pulp-smash.git | ||
cd pulp-smash | ||
git fetch --depth=1 origin +refs/pull/$PULP_SMASH_PR_NUMBER/merge | ||
git checkout FETCH_HEAD | ||
popd | ||
cd .. | ||
fi | ||
|
||
if [ "$DB" = 'mariadb' ]; then | ||
# working around https://travis-ci.community/t/mariadb-build-error-with-xenial/3160 | ||
mysql -u root -e "DROP USER IF EXISTS 'travis'@'%';" | ||
mysql -u root -e "CREATE USER 'travis'@'%';" | ||
mysql -u root -e "CREATE DATABASE pulp;" | ||
mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'travis'@'%';"; | ||
else | ||
psql -c 'CREATE DATABASE pulp OWNER travis;' | ||
fi | ||
psql -c 'CREATE DATABASE pulp OWNER travis;' | ||
|
||
pip install ansible | ||
cp pulp_maven/.travis/playbook.yml ansible-pulp/playbook.yml | ||
cp pulp_maven/.travis/postgres.yml ansible-pulp/postgres.yml | ||
cp pulp_maven/.travis/mariadb.yml ansible-pulp/mariadb.yml | ||
|
||
cd pulp_maven | ||
|
||
if [ -f $POST_BEFORE_INSTALL ]; then | ||
$POST_BEFORE_INSTALL | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,26 @@ | ||
#!/usr/bin/env sh | ||
|
||
# WARNING: DO NOT EDIT! | ||
# | ||
# This file was generated by plugin_template, and is managed by bootstrap.py. Please use | ||
# bootstrap.py to update this file. | ||
# | ||
# For more info visit https://github.com/pulp/plugin_template | ||
|
||
set -v | ||
|
||
export PRE_BEFORE_SCRIPT=$TRAVIS_BUILD_DIR/.travis/pre_before_script.sh | ||
export POST_BEFORE_SCRIPT=$TRAVIS_BUILD_DIR/.travis/post_before_script.sh | ||
|
||
if [ -f $PRE_BEFORE_SCRIPT ]; then | ||
$PRE_BEFORE_SCRIPT | ||
fi | ||
|
||
|
||
mkdir -p ~/.config/pulp_smash | ||
cp ../pulpcore/.travis/pulp-smash-config.json ~/.config/pulp_smash/settings.json | ||
|
||
|
||
if [ -f $POST_BEFORE_SCRIPT ]; then | ||
$POST_BEFORE_SCRIPT | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
# WARNING: DO NOT EDIT! | ||
# | ||
# This file was generated by plugin_template, and is managed by bootstrap.py. Please use | ||
# bootstrap.py to update this file. | ||
# | ||
# For more info visit https://github.com/pulp/plugin_template | ||
|
||
--- | ||
pulp_db_backend: django.db.backends.mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
# WARNING: DO NOT EDIT! | ||
# | ||
# This file was generated by plugin_template, and is managed by bootstrap.py. Please use | ||
# bootstrap.py to update this file. | ||
# | ||
# For more info visit https://github.com/pulp/plugin_template | ||
|
||
--- | ||
pulp_db_backend: django.db.backends.postgresql_psycopg2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# WARNING: DO NOT EDIT! | ||
# | ||
# This file was generated by plugin_template, and is managed by bootstrap.py. Please use | ||
# bootstrap.py to update this file. | ||
# | ||
# For more info visit https://github.com/pulp/plugin_template | ||
|
||
pip install twine | ||
|
||
python setup.py sdist bdist_wheel --python-tag py3 | ||
twine upload dist/* -u pulp -p $PYPI_PASSWORD | ||
twine upload dist/* -u None -p $PYPI_PASSWORD |
Oops, something went wrong.