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
a38408ef
Commit
a38408ef
authored
5 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Prepared the doc build inside of 'bob ci docs'
parent
8f6aee32
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!59
Created the CLI command 'bdt ci docs' to replace the before_build.sh
Pipeline
#30379
failed
5 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/devtools/scripts/__init__.py
+0
-20
0 additions, 20 deletions
bob/devtools/scripts/__init__.py
bob/devtools/scripts/ci.py
+32
-9
32 additions, 9 deletions
bob/devtools/scripts/ci.py
conda/meta.yaml
+2
-1
2 additions, 1 deletion
conda/meta.yaml
with
34 additions
and
30 deletions
bob/devtools/scripts/__init__.py
+
0
−
20
View file @
a38408ef
#!/usr/bin/env python
def
read_packages
(
filename
):
"""
Return a python list given file containing one package per line
"""
# loads dirnames from order file (accepts # comments and empty lines)
packages
=
[]
with
open
(
filename
,
'
rt
'
)
as
f
:
for
line
in
f
:
line
=
line
.
partition
(
'
#
'
)[
0
].
strip
()
if
line
:
if
'
,
'
in
line
:
#user specified a branch
path
,
branch
=
[
k
.
strip
()
for
k
in
line
.
split
(
'
,
'
,
1
)]
packages
.
append
((
path
,
branch
))
else
:
packages
.
append
((
line
,
'
master
'
))
return
packages
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/ci.py
+
32
−
9
View file @
a38408ef
...
...
@@ -10,7 +10,7 @@ import click
import
pkg_resources
from
click_plugins
import
with_plugins
from
.
import
bdt
,
read_packages
from
.
import
bdt
from
..constants
import
SERVER
,
CONDA_BUILD_CONFIG
,
CONDA_RECIPE_APPEND
,
\
WEBDAV_PATHS
,
BASE_CONDARC
from
..deploy
import
deploy_conda_package
,
deploy_documentation
...
...
@@ -19,6 +19,26 @@ from ..log import verbosity_option, get_logger, echo_normal
logger
=
get_logger
(
__name__
)
def
read_packages
(
filename
):
"""
Return a python list given file containing one package per line
"""
# loads dirnames from order file (accepts # comments and empty lines)
packages
=
[]
with
open
(
filename
,
'
rt
'
)
as
f
:
for
line
in
f
:
line
=
line
.
partition
(
'
#
'
)[
0
].
strip
()
if
line
:
if
'
,
'
in
line
:
#user specified a branch
path
,
branch
=
[
k
.
strip
()
for
k
in
line
.
split
(
'
,
'
,
1
)]
packages
.
append
((
path
,
branch
))
else
:
packages
.
append
((
line
,
'
master
'
))
return
packages
@with_plugins
(
pkg_resources
.
iter_entry_points
(
'
bdt.ci.cli
'
))
@click.group
(
cls
=
bdt
.
AliasedGroup
)
def
ci
():
...
...
@@ -667,6 +687,8 @@ def docs(ctx, requirement, dry_run):
# in the documentation of this function
extra_intersphinx
=
[]
nitpick
=
[]
doc_path
=
os
.
path
.
join
(
os
.
environ
[
'
CI_PROJECT_DIR
'
],
'
doc
'
)
for
n
,
(
package
,
branch
)
in
enumerate
(
packages
):
echo_normal
(
'
\n
'
+
(
80
*
'
=
'
))
...
...
@@ -674,7 +696,6 @@ def docs(ctx, requirement, dry_run):
len
(
packages
)))
echo_normal
((
80
*
'
=
'
)
+
'
\n
'
)
doc_path
=
os
.
path
.
join
(
os
.
environ
[
'
CI_PROJECT_DIR
'
],
'
doc
'
)
clone_to
=
os
.
path
.
join
(
doc_path
,
package
)
dirname
=
os
.
path
.
dirname
(
clone_to
)
if
not
os
.
path
.
exists
(
dirname
):
...
...
@@ -712,13 +733,15 @@ def docs(ctx, requirement, dry_run):
logger
.
info
(
'
Generating sphinx files
'
)
# Making unique lists
extra_intersphinx
=
list
(
set
([
e
for
e
in
extra_intersphinx
if
group
not
in
e
]))
nitpick
=
list
(
set
([
e
for
e
in
nitpick
]))
# Making unique lists and removing all bob references
if
not
dry_run
:
extra_intersphinx
=
list
(
set
([
e
for
e
in
extra_intersphinx
if
group
not
in
e
]))
nitpick
=
list
(
set
([
e
for
e
in
nitpick
]))
# Removing projects that are part of the group
open
(
os
.
path
.
join
(
doc_path
,
"
extra-intersphinx.txt
"
),
"
w
"
).
writelines
(
extra_intersphinx
)
open
(
os
.
path
.
join
(
doc_path
,
"
nitpick-exceptions.txt
"
),
"
w
"
).
writelines
(
nitpick
)
# Removing projects that are part of the group
open
(
os
.
path
.
join
(
doc_path
,
"
extra-intersphinx.txt
"
),
"
w
"
).
writelines
(
extra_intersphinx
)
open
(
os
.
path
.
join
(
doc_path
,
"
nitpick-exceptions.txt
"
),
"
w
"
).
writelines
(
nitpick
)
logger
.
info
(
'
Done!!
'
)
logger
.
info
(
'
Building !!
'
)
ctx
.
invoke
(
build
,
dry_run
=
dry_run
)
This diff is collapsed.
Click to expand it.
conda/meta.yaml
+
2
−
1
View file @
a38408ef
...
...
@@ -65,7 +65,7 @@ test:
-
bdt caupdate --help
-
bdt new --help
-
bdt new -t "New package" -o bob.foobar bob/bob.foobar "John Doe" "joe.doe@example.com"
-
bdt new -t "New package" -l bsd -o bob.foobar2 bob/bob.foobar "John Doe" "joe.doe@example.com"
i
- bdt new -t "New package" -l bsd -o bob.foobar2 bob/bob.foobar "John Doe" "joe.doe@example.com"
-
bdt new -t "New package" -l bsd -o beat.foobar beat/beat.foobar "John Doe" "joe.doe@example.com"
-
bdt gitlab --help
-
bdt gitlab lasttag --help
...
...
@@ -90,6 +90,7 @@ test:
-
bdt ci readme --help
-
bdt ci clean --help
-
bdt ci nightlies --help
-
bdt ci docs --help
-
sphinx-build -aEW ${PREFIX}/share/doc/{{ name }}/doc sphinx
-
if [ -n "${CI_PROJECT_DIR}" ]; then mv sphinx "${CI_PROJECT_DIR}/"; fi
...
...
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