Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Docker Build Images
scripts
Commits
08318fec
Commit
08318fec
authored
Jul 12, 2019
by
Markus Frosch
Browse files
upload: Add support for ICINGA_BUILD_RELEASE_TYPE
parent
3e325c11
Pipeline
#4247
passed with stage
in 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
icinga-build-upload-aptly
View file @
08318fec
...
...
@@ -16,6 +16,7 @@ APTLY_SESSION = None
CI_JOB_NAME
=
'CI_JOB_NAME'
CI_JOB_UPLOAD_PREFIX
=
'upload[:/]'
ICINGA_BUILD_TYPE
=
'ICINGA_BUILD_TYPE'
ICINGA_BUILD_RELEASE_TYPE
=
'ICINGA_BUILD_RELEASE_TYPE'
ICINGA_BUILD_TYPE_DEFAULT
=
'release'
UPLOAD_TYPE_DEB
=
'DEB'
...
...
@@ -90,11 +91,17 @@ def ci_split_name():
return
None
def
get_
build
_type
():
def
get_
release
_type
():
"""
Get ICINGA_BUILD_TYPE from environ
Get
ICINGA_BUILD_RELEASE_TYPE or
ICINGA_BUILD_TYPE from environ
"""
return
os
.
environ
.
get
(
ICINGA_BUILD_TYPE
,
ICINGA_BUILD_TYPE_DEFAULT
)
if
os
.
environ
.
has_key
(
ICINGA_BUILD_RELEASE_TYPE
):
return
os
.
environ
.
get
(
ICINGA_BUILD_RELEASE_TYPE
)
if
os
.
environ
.
has_key
(
ICINGA_BUILD_TYPE
):
return
os
.
environ
.
get
(
ICINGA_BUILD_TYPE
)
return
ICINGA_BUILD_TYPE_DEFAULT
def
ci_release
(
upload_type
,
release
):
"""
...
...
@@ -108,7 +115,7 @@ def ci_release(upload_type, release):
RPM / 7 / release -> 7/release
RPM / X / Y -> X/Y
"""
build_type
=
get_
build
_type
()
build_type
=
get_
release
_type
()
if
upload_type
==
UPLOAD_TYPE_DEB
:
publish_release
=
'icinga-'
+
release
...
...
@@ -135,7 +142,7 @@ def ci_repo(upload_type, target, release):
if
upload_type
!=
UPLOAD_TYPE_DEB
:
raise
StandardError
,
"Repo can only be set on DEB uploads!"
build_type
=
get_
build
_type
()
build_type
=
get_
release
_type
()
return
'icinga-%s-%s-%s'
%
(
target
,
release
,
build_type
)
...
...
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