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
daa2cc0e
Commit
daa2cc0e
authored
3 years ago
by
André Anjos
Browse files
Options
Downloads
Plain Diff
Merge branch 'find-runners' into 'master'
[scripts.jobs] Fix tag finding on CI See merge request
!267
parents
5e9108c1
2fbe9da3
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!267
[scripts.jobs] Fix tag finding on CI
Pipeline
#55732
passed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/devtools/scripts/jobs.py
+13
-20
13 additions, 20 deletions
bob/devtools/scripts/jobs.py
conda/meta.yaml
+1
-1
1 addition, 1 deletion
conda/meta.yaml
with
14 additions
and
21 deletions
bob/devtools/scripts/jobs.py
+
13
−
20
View file @
daa2cc0e
...
@@ -13,18 +13,23 @@ logger = get_logger(__name__)
...
@@ -13,18 +13,23 @@ logger = get_logger(__name__)
epilog
=
"""
epilog
=
"""
Examples:
Examples:
1. List running jobs on any
of our
runners
1. List running jobs on any runners
with tag
"
bob
"
(default)
$ bdt gitlab jobs -vv
$ bdt gitlab jobs -vv
2. List running jobs on a runner
defined by its description
:
2. List running jobs on a runner
with tag
"
macos
"
:
$ bdt gitlab jobs -vv macmini
$ bdt gitlab jobs -vv macos
2. List running jobs on a runner with tag
"
macos
"
and
"
foo
"
:
$ bdt gitlab jobs -vv macos foo
"""
"""
)
)
@click.argument
(
"
name
"
,
nargs
=-
1
)
@click.argument
(
"
tags
"
,
nargs
=-
1
)
@click.option
(
@click.option
(
"
-s
"
,
"
-s
"
,
"
--status
"
,
"
--status
"
,
...
@@ -36,31 +41,19 @@ Examples:
...
@@ -36,31 +41,19 @@ Examples:
)
)
@verbosity_option
()
@verbosity_option
()
@bdt.raise_on_error
@bdt.raise_on_error
def
jobs
(
name
,
statu
s
):
def
jobs
(
status
,
tag
s
):
"""
Lists jobs on a given runner identified by description.
"""
"""
Lists jobs on a given runner identified by description.
"""
gl
=
get_gitlab_instance
()
gl
=
get_gitlab_instance
()
gl
.
auth
()
gl
.
auth
()
names
=
name
or
[
tags
=
tags
or
[
"
bob
"
]
"
linux-shell
"
,
"
linux-docker
"
,
"
macpro
"
,
"
macmini
"
,
"
macm1
"
,
]
# search for the runner(s) to affect
# search for the runner(s) to affect
runners
=
[
runners
=
gl
.
runners
.
list
(
tag_list
=
tags
)
k
for
k
in
gl
.
runners
.
list
(
all
=
True
)
if
k
.
attributes
[
"
description
"
]
in
names
]
if
not
runners
:
if
not
runners
:
raise
RuntimeError
(
raise
RuntimeError
(
"
Cannot find runner with tags = %s
"
%
"
|
"
.
join
(
tags
))
"
Cannot find runner with description = %s
"
%
"
|
"
.
join
(
names
)
)
for
runner
in
runners
:
for
runner
in
runners
:
jobs
=
runner
.
jobs
.
list
(
all
=
True
,
status
=
status
)
jobs
=
runner
.
jobs
.
list
(
all
=
True
,
status
=
status
)
...
...
This diff is collapsed.
Click to expand it.
conda/meta.yaml
+
1
−
1
View file @
daa2cc0e
...
@@ -43,7 +43,7 @@ requirements:
...
@@ -43,7 +43,7 @@ requirements:
-
gitpython
-
gitpython
-
python-gitlab
-
python-gitlab
-
requests
-
requests
-
sphinx
!
=4.0.
1
-
sphinx
>
=4.0.
2
-
pyyaml >=5.1
-
pyyaml >=5.1
-
twine <3
-
twine <3
-
lxml
-
lxml
...
...
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