Commit 1acb19c6 authored by André Anjos's avatar André Anjos 💬
Browse files

[scripts][build] Create specific option for CI running

parent d15ca431
Pipeline #26129 passed with stages
in 5 minutes and 43 seconds
...@@ -69,10 +69,12 @@ Examples: ...@@ -69,10 +69,12 @@ Examples:
help='Only goes through the actions, but does not execute them ' \ help='Only goes through the actions, but does not execute them ' \
'(combine with the verbosity flags - e.g. ``-vvv``) to enable ' \ '(combine with the verbosity flags - e.g. ``-vvv``) to enable ' \
'printing to help you understand what will be done') 'printing to help you understand what will be done')
@click.option('-C', '--ci/--no-ci', default=False, hidden=True,
help='Use this flag to indicate the build will be running on the CI')
@verbosity_option() @verbosity_option()
@bdt.raise_on_error @bdt.raise_on_error
def build(recipe_dir, python, condarc, config, no_test, append_file, def build(recipe_dir, python, condarc, config, no_test, append_file,
server, private, stable, dry_run): server, private, stable, dry_run, ci):
"""Builds package through conda-build with stock configuration """Builds package through conda-build with stock configuration
This command wraps the execution of conda-build so that you use the same This command wraps the execution of conda-build so that you use the same
...@@ -92,7 +94,7 @@ def build(recipe_dir, python, condarc, config, no_test, append_file, ...@@ -92,7 +94,7 @@ def build(recipe_dir, python, condarc, config, no_test, append_file,
# get potential channel upload and other auxiliary channels # get potential channel upload and other auxiliary channels
channels = get_channels(public=(not private), stable=stable, server=server, channels = get_channels(public=(not private), stable=stable, server=server,
intranet=private) intranet=ci)
if condarc is not None: if condarc is not None:
logger.info('Loading CONDARC file from %s...', condarc) logger.info('Loading CONDARC file from %s...', condarc)
...@@ -118,7 +120,7 @@ def build(recipe_dir, python, condarc, config, no_test, append_file, ...@@ -118,7 +120,7 @@ def build(recipe_dir, python, condarc, config, no_test, append_file,
# and derived documentation building via Sphinx) # and derived documentation building via Sphinx)
set_environment('DOCSERVER', server, verbose=True) set_environment('DOCSERVER', server, verbose=True)
doc_urls = get_docserver_setup(public=(not private), stable=stable, doc_urls = get_docserver_setup(public=(not private), stable=stable,
server=server, intranet=private) server=server, intranet=ci)
set_environment('BOB_DOCUMENTATION_SERVER', doc_urls, verbose=True) set_environment('BOB_DOCUMENTATION_SERVER', doc_urls, verbose=True)
for d in recipe_dir: for d in recipe_dir:
......
...@@ -249,6 +249,7 @@ def build(ctx, dry_run): ...@@ -249,6 +249,7 @@ def build(ctx, dry_run):
private=(os.environ['CI_PROJECT_VISIBILITY'] != 'public'), private=(os.environ['CI_PROJECT_VISIBILITY'] != 'public'),
stable='CI_COMMIT_TAG' in os.environ, stable='CI_COMMIT_TAG' in os.environ,
dry_run=dry_run, dry_run=dry_run,
ci=True,
) )
git_clean_build(run_cmdline, arch) git_clean_build(run_cmdline, arch)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment