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
6f34b90a
Commit
6f34b90a
authored
5 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
Add a local base-build command
parent
faa90c91
No related branches found
No related tags found
1 merge request
!87
Local base build
Pipeline
#32362
passed
5 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/devtools/scripts/local.py
+55
-5
55 additions, 5 deletions
bob/devtools/scripts/local.py
setup.py
+1
-0
1 addition, 0 deletions
setup.py
with
56 additions
and
5 deletions
bob/devtools/scripts/local.py
+
55
−
5
View file @
6f34b90a
...
...
@@ -41,7 +41,8 @@ def set_up_environment_variables(
os
.
environ
[
"
CI_PROJECT_DIR
"
]
=
project_dir
os
.
environ
[
"
CI_PROJECT_NAMESPACE
"
]
=
name_space
os
.
environ
[
"
CI_PROJECT_VISIBILITY
"
]
=
project_visibility
os
.
environ
[
"
PYTHON_VERSION
"
]
=
python
if
python
:
os
.
environ
[
"
PYTHON_VERSION
"
]
=
python
@with_plugins
(
pkg_resources
.
iter_entry_points
(
"
bdt.local.cli
"
))
...
...
@@ -136,10 +137,10 @@ Examples:
"
printing to help you understand what will be done
"
,
)
@click.option
(
'
-r
'
,
'
--recipe-dir
'
,
default
=
os
.
path
.
join
(
os
.
path
.
realpath
(
os
.
curdir
),
'
conda
'
),
help
=
"
Custom recipe folder for build.
"
"
-r
"
,
"
--recipe-dir
"
,
default
=
os
.
path
.
join
(
os
.
path
.
realpath
(
os
.
curdir
),
"
conda
"
),
help
=
"
Custom recipe folder for build.
"
,
)
@click.option
(
"
-p
"
,
...
...
@@ -164,3 +165,52 @@ def build(ctx, dry_run, recipe_dir, python, group):
set_up_environment_variables
(
python
=
python
,
name_space
=
group
)
ctx
.
invoke
(
ci
.
build
,
dry_run
=
dry_run
,
recipe_dir
=
recipe_dir
)
@local.command
(
epilog
=
"""
Examples:
1. Runs the CI build steps locally:
$ bdt local base-build -vv nopython.txt
"""
)
@click.argument
(
"
order
"
,
required
=
True
,
type
=
click
.
Path
(
file_okay
=
True
,
dir_okay
=
False
,
exists
=
True
),
nargs
=
1
,
)
@click.option
(
"
-d
"
,
"
--dry-run/--no-dry-run
"
,
default
=
False
,
help
=
"
Only goes through the actions, but does not execute them
"
"
(combine with the verbosity flags - e.g. ``-vvv``) to enable
"
"
printing to help you understand what will be done
"
,
)
@click.option
(
"
-p
"
,
"
--python
"
,
multiple
=
True
,
help
=
'
Versions of python in the format
"
x.y
"
we should build for. Pass
'
"
various times this option to build for multiple python versions
"
,
)
@click.option
(
"
-g
"
,
"
--group
"
,
show_default
=
True
,
default
=
"
bob
"
,
help
=
"
Group of packages (gitlab namespace) this package belongs to
"
,
)
@verbosity_option
()
@bdt.raise_on_error
@click.pass_context
def
base_build
(
ctx
,
order
,
dry_run
,
python
,
group
):
"""
Run the CI build step locally
"""
set_up_environment_variables
(
python
=
python
,
name_space
=
group
)
ctx
.
invoke
(
ci
.
base_build
,
order
=
order
,
dry_run
=
dry_run
,
group
=
group
,
python
=
python
)
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
0
View file @
6f34b90a
...
...
@@ -83,6 +83,7 @@ setup(
'
bdt.local.cli
'
:
[
'
docs = bob.devtools.scripts.local:docs
'
,
'
build = bob.devtools.scripts.local:build
'
,
'
base-build = bob.devtools.scripts.local:base_build
'
,
],
},
...
...
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