Commit fc1325da authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Staging builds have access to production channel

parent 4846ecd1
......@@ -131,7 +131,7 @@ def lockdir(dirname):
def loadyaml(s):
"""Loads a YAML string, returning a dict-like. """
return yaml.load(s)
return yaml.load(s, Loader=yaml.Loader)
def dumpyaml(o):
......
......@@ -119,9 +119,10 @@ def main():
output_dir = op.join(os.getcwd(), 'conda_build', f'_{platform}_')
if staging:
channel_url = os.environ['FSLCONDA_STAGING_CHANNEL_URL']
channel_urls = [os.environ['FSLCONDA_STAGING_CHANNEL_URL'],
os.environ['FSLCONDA_PRODUCTION_CHANNEL_URL']]
else:
channel_url = os.environ['FSLCONDA_PRODUCTION_CHANNEL_URL']
channel_urls = [os.environ['FSLCONDA_PRODUCTION_CHANNEL_URL']]
os.makedirs(output_dir)
......@@ -133,7 +134,7 @@ def main():
fprint(f' build from repo specified in meta.yaml): {project_repo}')
fprint( 'Project revision (empty means to ')
fprint(f' build release specified in meta.yaml): {project_ref}')
fprint(f'FSL conda channel URL: {channel_url}')
fprint(f'FSL conda channel URLs: {channel_urls}')
fprint('************************************')
if project_repo == '': project_repo = None
......@@ -146,7 +147,7 @@ def main():
project_repo,
project_ref,
output_dir,
channel_url)
*channel_urls)
if __name__ == '__main__':
......
......@@ -60,8 +60,11 @@ def create_test_env(env_dir, build_dir):
prodchannel = os.environ['FSLCONDA_PRODUCTION_CHANNEL_URL']
stagechannel = os.environ['FSLCONDA_STAGING_CHANNEL_URL']
if os.environ['STAGING']: pkgchannel = stagechannel
else: pkgchannel = prodchannel
if os.environ['STAGING']: pkgchannels = [stagechannel, prodchannel]
else: pkgchannels = [prodchannel]
pkgchannels = [f'-c {c}' for c in pkgchannels]
pkgchannels = ' '.join(pkgchannels)
# Install pyfeeds from <prodchannel>
# Install <pkgname> from local build dir
......@@ -83,7 +86,7 @@ def create_test_env(env_dir, build_dir):
# with what I am trying to do here.
sprun(f'conda create -p {env_dir} '
f'-c {build_dir} -c conda-forge '
f'-c defaults -c {pkgchannel} '
f'-c defaults {pkgchannels} '
f'{pkgname} fsl-base')
# The conda command-line interface is
......
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