Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
conda
fsl-ci-rules
Commits
fc1325da
Commit
fc1325da
authored
Jun 04, 2021
by
Paul McCarthy
🚵
Browse files
RF: Staging builds have access to production channel
parent
4846ecd1
Changes
3
Hide whitespace changes
Inline
Side-by-side
fsl_ci/__init__.py
View file @
fc1325da
...
...
@@ -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
):
...
...
fsl_ci/scripts/build_conda_package.py
View file @
fc1325da
...
...
@@ -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_url
s
=
[
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 URL
s
:
{
channel_url
s
}
'
)
fprint
(
'************************************'
)
if
project_repo
==
''
:
project_repo
=
None
...
...
@@ -146,7 +147,7 @@ def main():
project_repo
,
project_ref
,
output_dir
,
channel_url
)
*
channel_url
s
)
if
__name__
==
'__main__'
:
...
...
fsl_ci/scripts/run_unit_tests.py
View file @
fc1325da
...
...
@@ -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
{
pkgchannel
s
}
'
f
'
{
pkgname
}
fsl-base'
)
# The conda command-line interface is
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment