Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Data Flow
Data Ingestion
osdu-airflow-lib
Commits
4a990a2a
Commit
4a990a2a
authored
Sep 09, 2021
by
Siarhei Khaletski (EPAM)
🚩
Browse files
Added pipeline iid as a build id for package version
parent
fc1f4d30
Pipeline
#64303
passed with stages
in 2 minutes and 24 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
4a990a2a
variables
:
BUILD_TAG
:
$CI_COMMIT_TAG
BUILD_COMMIT_SHORT_SHA
:
$CI_COMMIT_SHORT_SHA
BUILD_ID
:
$CI_PIPELINE_IID
default
:
image
:
python:3.6-slim-buster
...
...
setup.py
View file @
4a990a2a
...
...
@@ -25,7 +25,7 @@ def get_version_from_file():
return
fh
.
read
().
strip
()
def
prepare_version
():
version
=
os
.
getenv
(
"
CI_COMMIT
_TAG"
,
''
)
version
=
os
.
getenv
(
"
BUILD
_TAG"
,
''
)
if
version
.
startswith
(
'v'
):
# release tag version, e.g. v0.9.0
...
...
@@ -33,8 +33,9 @@ def prepare_version():
else
:
# we assume that it is commit version
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#local-version-identifiers
commit
=
os
.
environ
[
"CI_COMMIT_SHORT_SHA"
]
version
=
f
"
{
get_version_from_file
()
}
.dev+
{
commit
}
"
commit
=
os
.
environ
[
"BUILD_COMMIT_SHORT_SHA"
]
build_id
=
os
.
environ
[
"BUILD_ID"
]
version
=
f
"
{
get_version_from_file
()
}
.dev
{
build_id
}
+
{
commit
}
"
return
version
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment