provision: Rename --production-test-suite option in provision.

Since we use this option in our docker-zulip project also
so rather than using it as a test suite option we made it
more specific i.e. --build-release-tarball-only.
This commit is contained in:
arpit551
2020-06-04 00:37:33 +05:30
committed by Tim Abbott
parent 4b67259294
commit 291bce93d0
3 changed files with 12 additions and 14 deletions

View File

@@ -9,11 +9,11 @@ set -x
# Provisioning may fail due to many issues but most of the times a network
# connection issue is the reason. So we are going to retry entire provisioning
# once again if that fixes our problem.
tools/provision --production-test-suite || {
tools/provision --build-release-tarball-only || {
ret=$?
if [ "$ret" = 1 ]; then
echo "\`provision\`: Something went wrong with the provisioning, might be a network issue, Retrying to provision..."
tools/provision --production-test-suite
tools/provision --build-release-tarball-only
else
echo "\`provision\`: Something REALLY BAD went wrong with the provisioning, not retrying."
exit "$ret"

View File

@@ -385,7 +385,7 @@ def main(options: argparse.Namespace) -> "NoReturn":
run_as_root(["cp", REPO_STOPWORDS_PATH, TSEARCH_STOPWORDS_PATH])
if is_circleci and not options.is_production_test_suite:
if is_circleci and not options.is_build_release_tarball_only:
run_as_root(["service", "redis-server", "restart"])
run_as_root(["service", "memcached", "restart"])
if is_circleci:
@@ -412,7 +412,7 @@ def main(options: argparse.Namespace) -> "NoReturn":
[
provision_inner,
*(["--force"] if options.is_force else []),
*(["--production-test-suite"] if options.is_production_test_suite else []),
*(["--build-release-tarball-only"] if options.is_build_release_tarball_only else []),
]
)
@@ -423,10 +423,10 @@ if __name__ == "__main__":
default=False,
help="Ignore all provisioning optimizations.")
parser.add_argument('--production-test-suite', action='store_true',
dest='is_production_test_suite',
parser.add_argument('--build-release-tarball-only', action='store_true',
dest='is_build_release_tarball_only',
default=False,
help="Provision for test suite with production settings.")
help="Provision needed to build release tarball.")
options = parser.parse_args()
main(options)

View File

@@ -218,11 +218,9 @@ def main(options: argparse.Namespace) -> int:
else:
print("No need to run `scripts/setup/inline_email_css.py`.")
if not options.is_production_test_suite:
# The following block is skipped for the production test
# suite, because that suite doesn't make use of these elements
# of the development environment (it just uses the development
# environment to build a release tarball).
if not options.is_build_release_tarball_only:
# The following block is skipped when we just need the development
# environment to build a release tarball.
# Need to set up Django before using template_status
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
@@ -319,8 +317,8 @@ if __name__ == "__main__":
default=False,
help="Ignore all provisioning optimizations.")
parser.add_argument('--production-test-suite', action='store_true',
dest='is_production_test_suite',
parser.add_argument('--build-release-tarball-only', action='store_true',
dest='is_build_release_tarball_only',
default=False,
help="Provision for test suite with production settings.")