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
5ed727cb
Commit
5ed727cb
authored
5 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[scripts/ci] Use order parser from build module
parent
67f90cb5
No related branches found
No related tags found
1 merge request
!89
Docformatter
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/devtools/ci.py
+3
-10
3 additions, 10 deletions
bob/devtools/ci.py
bob/devtools/scripts/ci.py
+4
-10
4 additions, 10 deletions
bob/devtools/scripts/ci.py
with
7 additions
and
20 deletions
bob/devtools/ci.py
+
3
−
10
View file @
5ed727cb
...
...
@@ -8,6 +8,7 @@ import git
import
distutils.version
from
.log
import
get_logger
from
.build
import
load_order_file
logger
=
get_logger
(
__name__
)
...
...
@@ -79,22 +80,14 @@ def is_stable(package, refname, tag, repodir):
return
False
def
comment_cleanup
(
lines
):
"""
Cleans-up comments and empty lines from textual data read from files
"""
no_comments
=
[
k
.
partition
(
"
#
"
)[
0
].
strip
()
for
k
in
lines
]
return
[
k
for
k
in
no_comments
if
k
]
def
read_packages
(
filename
):
"""
Return a python list of tuples (repository, branch), given a file containing
one package (and branch) per line. Comments are excluded
"""
# loads dirnames from order file (accepts # comments and empty lines)
with
open
(
filename
,
"
rt
"
)
as
f
:
lines
=
comment_cleanup
(
f
.
readlines
())
lines
=
load_order_file
(
filename
)
packages
=
[]
for
line
in
lines
:
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/ci.py
+
4
−
10
View file @
5ed727cb
...
...
@@ -13,9 +13,9 @@ from click_plugins import with_plugins
from
.
import
bdt
from
..constants
import
SERVER
,
WEBDAV_PATHS
,
BASE_CONDARC
from
..deploy
import
deploy_conda_package
,
deploy_documentation
from
..build
import
comment_cleanup
,
load_order_file
from
..ci
import
(
read_packages
,
comment_cleanup
,
uniq
,
select_conda_build_config
,
select_conda_recipe_append
,
...
...
@@ -403,13 +403,7 @@ def base_build(order, group, python, dry_run):
os
.
environ
[
"
CONDA_ROOT
"
],
"
conda-bld
"
)
# loads dirnames from order file (accepts # comments and empty lines)
recipes
=
[]
with
open
(
order
,
"
rt
"
)
as
f
:
for
line
in
f
:
line
=
line
.
partition
(
"
#
"
)[
0
].
strip
()
if
line
:
recipes
.
append
(
line
)
recipes
=
load_order_file
(
order
)
import
itertools
from
..
import
bootstrap
...
...
@@ -421,12 +415,12 @@ def base_build(order, group, python, dry_run):
else
:
recipes
=
list
(
itertools
.
product
([
None
],
recipes
))
for
order
,
(
pyver
,
recipe
)
in
enumerate
(
recipes
):
for
k
,
(
pyver
,
recipe
)
in
enumerate
(
recipes
):
echo_normal
(
"
\n
"
+
(
80
*
"
=
"
))
pytext
=
"
for python-%s
"
%
pyver
if
pyver
is
not
None
else
""
echo_normal
(
'
Building
"
%s
"
%s(%d/%d)
'
%
(
recipe
,
pytext
,
order
+
1
,
len
(
recipes
))
%
(
recipe
,
pytext
,
k
+
1
,
len
(
recipes
))
)
echo_normal
((
80
*
"
=
"
)
+
"
\n
"
)
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
recipe
,
"
meta.yaml
"
)):
...
...
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