Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.devtools
Commits
5e2ee0f1
Commit
5e2ee0f1
authored
6 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[build] Fix usage of conda_build.api.build() when using metadata (bis)
parent
3b4bd2e5
No related branches found
No related tags found
No related merge requests found
Pipeline
#27894
passed
6 years ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/devtools/build.py
+1
-1
1 addition, 1 deletion
bob/devtools/build.py
bob/devtools/scripts/ci.py
+19
-3
19 additions, 3 deletions
bob/devtools/scripts/ci.py
bob/devtools/scripts/rebuild.py
+2
-1
2 additions, 1 deletion
bob/devtools/scripts/rebuild.py
with
22 additions
and
5 deletions
bob/devtools/build.py
+
1
−
1
View file @
5e2ee0f1
...
@@ -524,7 +524,7 @@ def base_build(bootstrap, server, intranet, group, recipe_dir,
...
@@ -524,7 +524,7 @@ def base_build(bootstrap, server, intranet, group, recipe_dir,
# if you get to this point, just builds the package
# if you get to this point, just builds the package
logger
.
info
(
'
Building %s
'
,
path
)
logger
.
info
(
'
Building %s
'
,
path
)
conda_build
.
api
.
build
(
metadata
[
0
],
config
=
conda_config
)
conda_build
.
api
.
build
(
metadata
[
0
]
[
0
]
,
config
=
conda_config
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/ci.py
+
19
−
3
View file @
5e2ee0f1
...
@@ -266,9 +266,25 @@ def base_build(order, group, python, dry_run):
...
@@ -266,9 +266,25 @@ def base_build(order, group, python, dry_run):
"""
"""
condarc
=
os
.
path
.
join
(
os
.
environ
[
'
CONDA_ROOT
'
],
'
condarc
'
)
condarc
=
os
.
path
.
join
(
os
.
environ
[
'
CONDA_ROOT
'
],
'
condarc
'
)
logger
.
info
(
'
Loading (this build
\'
s) CONDARC file from %s...
'
,
condarc
)
if
os
.
path
.
exists
(
condarc
):
with
open
(
condarc
,
'
rb
'
)
as
f
:
logger
.
info
(
'
Loading (this build
\'
s) CONDARC file from %s...
'
,
condarc
)
condarc_options
=
yaml
.
load
(
f
)
with
open
(
condarc
,
'
rb
'
)
as
f
:
condarc_options
=
yaml
.
load
(
f
)
else
:
#not building on the CI? - use defaults
import
yaml
from
..constants
import
BASE_CONDARC
,
SERVER
from
..bootstrap
import
get_channels
# get potential channel upload and other auxiliary channels
channels
=
get_channels
(
public
=
True
,
stable
=
True
,
server
=
SERVER
,
intranet
=
'
True
'
,
group
=
'
bob
'
)
# use default and add channels
condarc_options
=
yaml
.
load
(
BASE_CONDARC
)
#n.b.: no channels
logger
.
info
(
'
Using the following channels during build:
\n
- %s
'
,
'
\n
-
'
.
join
(
channels
+
[
'
defaults
'
]))
condarc_options
[
'
channels
'
]
=
channels
+
[
'
defaults
'
]
# dump packages at conda_root
# dump packages at conda_root
condarc_options
[
'
croot
'
]
=
os
.
path
.
join
(
os
.
environ
[
'
CONDA_ROOT
'
],
condarc_options
[
'
croot
'
]
=
os
.
path
.
join
(
os
.
environ
[
'
CONDA_ROOT
'
],
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/rebuild.py
+
2
−
1
View file @
5e2ee0f1
...
@@ -200,7 +200,8 @@ def rebuild(recipe_dir, python, condarc, config, append_file,
...
@@ -200,7 +200,8 @@ def rebuild(recipe_dir, python, condarc, config, append_file,
os
.
unlink
(
candidate
)
os
.
unlink
(
candidate
)
if
not
dry_run
:
if
not
dry_run
:
conda_build
.
api
.
build
(
metadata
[
0
],
config
=
conda_config
,
notest
=
no_test
)
conda_build
.
api
.
build
(
metadata
[
0
][
0
],
config
=
conda_config
,
notest
=
no_test
)
# if you get to this point, the package was successfully rebuilt
# if you get to this point, the package was successfully rebuilt
# set environment to signal caller we can upload it
# set environment to signal caller we can upload it
os
.
environ
[
'
BDT_REBUILD
'
]
=
candidate
os
.
environ
[
'
BDT_REBUILD
'
]
=
candidate
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment