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
b213d808
Commit
b213d808
authored
3 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[release] Adapt to gitlab API changes
parent
088f9113
No related branches found
No related tags found
1 merge request
!278
Python deploy issues
Pipeline
#58947
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/devtools/release.py
+7
-5
7 additions, 5 deletions
bob/devtools/release.py
with
7 additions
and
5 deletions
bob/devtools/release.py
+
7
−
5
View file @
b213d808
...
@@ -139,7 +139,7 @@ def get_latest_tag_name(gitpkg):
...
@@ -139,7 +139,7 @@ def get_latest_tag_name(gitpkg):
"""
"""
# get 50 latest tags as a list
# get 50 latest tags as a list
latest_tags
=
gitpkg
.
tag
s
.
list
(
all
=
True
)
latest_tags
=
gitpkg
.
release
s
.
list
(
all
=
True
)
if
not
latest_tags
:
if
not
latest_tags
:
return
None
return
None
# create list of tags' names but ignore the first 'v' character in each name
# create list of tags' names but ignore the first 'v' character in each name
...
@@ -252,13 +252,14 @@ def update_tag_comments(gitpkg, tag_name, tag_comments_list, dry_run=False):
...
@@ -252,13 +252,14 @@ def update_tag_comments(gitpkg, tag_name, tag_comments_list, dry_run=False):
# get tag and update its description
# get tag and update its description
logger
.
info
(
tag_name
)
logger
.
info
(
tag_name
)
tag
=
gitpkg
.
tag
s
.
get
(
tag_name
)
tag
=
gitpkg
.
release
s
.
get
(
tag_name
)
tag_comments
=
"
\n
"
.
join
(
tag_comments_list
)
tag_comments
=
"
\n
"
.
join
(
tag_comments_list
)
logger
.
info
(
logger
.
info
(
"
Found tag %s, updating its comments with:
\n
%s
"
,
tag
.
name
,
tag_comments
"
Found tag %s, updating its comments with:
\n
%s
"
,
tag
.
name
,
tag_comments
)
)
if
not
dry_run
:
if
not
dry_run
:
tag
.
set_release_description
(
tag_comments
)
tag
.
description
=
tag_comments
tag
.
save
()
return
tag
return
tag
...
@@ -547,10 +548,11 @@ def release_package(gitpkg, tag_name, tag_comments_list, dry_run=False):
...
@@ -547,10 +548,11 @@ def release_package(gitpkg, tag_name, tag_comments_list, dry_run=False):
tag_comments
=
"
\n
"
.
join
(
tag_comments_list
)
tag_comments
=
"
\n
"
.
join
(
tag_comments_list
)
logger
.
debug
(
"
Updating tag comments with:
\n
%s
"
,
tag_comments
)
logger
.
debug
(
"
Updating tag comments with:
\n
%s
"
,
tag_comments
)
if
not
dry_run
:
if
not
dry_run
:
tag
=
gitpkg
.
tag
s
.
create
({
"
tag_name
"
:
tag_name
,
"
ref
"
:
"
master
"
})
tag
=
gitpkg
.
release
s
.
create
({
"
tag_name
"
:
tag_name
,
"
ref
"
:
"
master
"
})
# update tag with comments
# update tag with comments
if
tag_comments
:
if
tag_comments
:
tag
.
set_release_description
(
tag_comments
)
tag
.
description
=
tag_comments
tag
.
save
()
# get the pipeline that is actually running with no skips
# get the pipeline that is actually running with no skips
running_pipeline
=
get_last_pipeline
(
gitpkg
)
running_pipeline
=
get_last_pipeline
(
gitpkg
)
...
...
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