Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
idiap-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
Package registry
Model registry
Operate
Environments
Terraform modules
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
software
idiap-devtools
Commits
ae4f0c77
Commit
ae4f0c77
authored
1 year ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[scripts.gitlab.release] Resolve review points
parent
c45a9c9b
No related branches found
No related tags found
1 merge request
!9
Improves dependence pinning on release with a specific flag
Pipeline
#75044
failed
1 year ago
Stage: qa
Stage: test
Stage: doc
Stage: dist
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+2
-12
2 additions, 12 deletions
.gitlab-ci.yml
src/idiap_devtools/scripts/gitlab/release.py
+19
-8
19 additions, 8 deletions
src/idiap_devtools/scripts/gitlab/release.py
with
21 additions
and
20 deletions
.gitlab-ci.yml
+
2
−
12
View file @
ae4f0c77
# Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
#
SPDX-FileCopyrightText:
Copyright © 2022 Idiap Research Institute <contact@idiap.ch>
#
#
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: BSD-3-Clause
include
:
include
:
-
project
:
software/dev-profile
-
project
:
software/dev-profile
file
:
/gitlab/python.yml
file
:
/gitlab/python+rtd.yml
documentation
:
image
:
quay.io/condaforge/linux-anvil-cos7-x86_64
before_script
:
-
rm -f /home/conda/.condarc
-
mamba update --override-channels -c conda-forge -n base --all
-
eval "$(/opt/conda/bin/conda shell.bash hook)"
-
conda activate base
-
pip install --pre --index-url https://gitlab.idiap.ch/api/v4/groups/software/-/packages/pypi/simple --extra-index-url https://pypi.org/simple '.[doc]' sphinx
This diff is collapsed.
Click to expand it.
src/idiap_devtools/scripts/gitlab/release.py
+
19
−
8
View file @
ae4f0c77
...
@@ -9,7 +9,7 @@ import typing
...
@@ -9,7 +9,7 @@ import typing
import
click
import
click
from
idiap_devtools.click
import
validate_profile
from
idiap_devtools.click
import
validate_profile
from
idiap_devtools.profile
import
Profile
from
idiap_devtools.profile
import
Profile
,
get_profile_path
from
...click
import
PreserveIndentCommand
,
verbosity_option
from
...click
import
PreserveIndentCommand
,
verbosity_option
from
...logging
import
setup
from
...logging
import
setup
...
@@ -112,7 +112,8 @@ def release(
...
@@ -112,7 +112,8 @@ def release(
N.B.: When the option ``pin-dependencies`` is set, the versions of the
N.B.: When the option ``pin-dependencies`` is set, the versions of the
dependencies in ``pyproject.toml`` will be pinned to those of the Python
dependencies in ``pyproject.toml`` will be pinned to those of the Python
``constraints.txt`` file available in the select development profile.
``constraints.txt`` file available in the select development profile
(choose using option ``--profile``).
The changelog is expected to have the following structure:
The changelog is expected to have the following structure:
...
@@ -154,9 +155,6 @@ def release(
...
@@ -154,9 +155,6 @@ def release(
gl
=
get_gitlab_instance
()
gl
=
get_gitlab_instance
()
# 1. loads profile data
the_profile
=
Profile
(
profile
)
# traverse all packages in the changelog, edit older tags with updated
# traverse all packages in the changelog, edit older tags with updated
# comments, tag them with a suggested version, then try to release, and
# comments, tag them with a suggested version, then try to release, and
# wait until done to proceed to the next package
# wait until done to proceed to the next package
...
@@ -172,9 +170,22 @@ def release(
...
@@ -172,9 +170,22 @@ def release(
]
]
if
dry_run
:
if
dry_run
:
click
.
secho
(
"
!!!! DRY RUN MODE !!!!
"
,
fg
=
"
yellow
"
,
bold
=
True
)
click
.
secho
(
click
.
secho
(
"
No changes will be committed to GitLab.
"
,
fg
=
"
yellow
"
,
bold
=
True
"
DRY RUN MODE: No changes will be committed to GitLab.
"
,
fg
=
"
yellow
"
,
bold
=
True
,
)
# loads profile data
if
pin_dependencies
:
the_profile
=
Profile
(
profile
)
logger
.
info
(
f
"
Pinning dependencies from profile `
{
get_profile_path
(
profile
)
}
'
...
"
,
)
else
:
the_profile
=
None
logger
.
warning
(
"
Not pinning dependencies (use --pin-dependencies to change this).
"
,
)
)
for
pkg_number
,
(
header
,
line
)
in
enumerate
(
pkgs
):
for
pkg_number
,
(
header
,
line
)
in
enumerate
(
pkgs
):
...
@@ -240,7 +251,7 @@ def release(
...
@@ -240,7 +251,7 @@ def release(
tag_name
=
vtag
,
tag_name
=
vtag
,
tag_comments
=
description_text
,
tag_comments
=
description_text
,
dry_run
=
dry_run
,
dry_run
=
dry_run
,
profile
=
the_profile
if
pin_dependencies
else
None
,
profile
=
the_profile
,
)
)
if
not
dry_run
:
if
not
dry_run
:
# now, wait for the pipeline to finish, before we can release the
# now, wait for the pipeline to finish, before we can release the
...
...
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