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

RF: Hook to pass additional arguments to conda build

parent 567a8740
...@@ -579,6 +579,7 @@ to control / customise the behaviour of the FSL CI rules. ...@@ -579,6 +579,7 @@ to control / customise the behaviour of the FSL CI rules.
| `FSLCONDA_REVISION` | Recipe | No | Build a conda package from this revision, instead of the revision specified in `meta.yaml`. | | `FSLCONDA_REVISION` | Recipe | No | Build a conda package from this revision, instead of the revision specified in `meta.yaml`. |
| `FSLCONDA_RECIPE_URL` | Project | No | Space separated list of recipe repository URLs, where the `fsl/<project>` / `fsl/conda/fsl-<project>` naming convention is not followed, or where multiple recipes are associated with one project. | | `FSLCONDA_RECIPE_URL` | Project | No | Space separated list of recipe repository URLs, where the `fsl/<project>` / `fsl/conda/fsl-<project>` naming convention is not followed, or where multiple recipes are associated with one project. |
| `FSLCONDA_BUILD_ON_ALL_BRANCHES` | Project | No | Trigger a build on all branches of the project repository, not just on the master branch. | | `FSLCONDA_BUILD_ON_ALL_BRANCHES` | Project | No | Trigger a build on all branches of the project repository, not just on the master branch. |
| `FSLCONDA_BUILD_EXTRA_ARGS` | Recipe | No | Additional arguments to pass to `conda build`. |
| `FSLCONDA_SKIP_PLATFORM` | Recipe | No | Space-separated list of conda package platforms which should not be built - see below. | | `FSLCONDA_SKIP_PLATFORM` | Recipe | No | Space-separated list of conda package platforms which should not be built - see below. |
| `FSLCONDA_SKIP_RECIPE_UPDATE` | Project | No | Do not open a merge request on the recipe repository when new tags are added to the project repository. | | `FSLCONDA_SKIP_RECIPE_UPDATE` | Project | No | Do not open a merge request on the recipe repository when new tags are added to the project repository. |
| `FSLCONDA_SKIP_MANIFEST_UPDATE` | Project | No | Do not open a merge request on the fsl/conda/manifest> repository when new tags are added to the project repository. | | `FSLCONDA_SKIP_MANIFEST_UPDATE` | Project | No | Do not open a merge request on the fsl/conda/manifest> repository when new tags are added to the project repository. |
......
...@@ -20,7 +20,7 @@ import subprocess as sp ...@@ -20,7 +20,7 @@ import subprocess as sp
import yaml import yaml
__version__ = '0.19.5' __version__ = '0.19.6'
"""Current version of the fsl-ci-rules.""" """Current version of the fsl-ci-rules."""
......
...@@ -33,11 +33,13 @@ def build_recipe(recipe_dir, repo, ref, output_dir, *channels): ...@@ -33,11 +33,13 @@ def build_recipe(recipe_dir, repo, ref, output_dir, *channels):
if ref in ('', None): env.pop('FSLCONDA_REVISION', None) if ref in ('', None): env.pop('FSLCONDA_REVISION', None)
else: env['FSLCONDA_REVISION'] = ref else: env['FSLCONDA_REVISION'] = ref
extra_args = os.environ.get('FSLCONDA_BUILD_EXTRA_ARGS', '')
cmd = 'conda build -c conda-forge -c defaults' cmd = 'conda build -c conda-forge -c defaults'
for chan in channels: for chan in channels:
cmd = f'{cmd} -c {chan}' cmd = f'{cmd} -c {chan}'
sprun(f'{cmd} --output-folder={output_dir} {recipe_dir}', env=env) sprun(f'{cmd} --output-folder={output_dir} {extra_args} {recipe_dir}',
env=env)
def build_report(output_dir): def build_report(output_dir):
......
Markdown is supported
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