Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sosthène Sosth
tails
Commits
a1176534
Unverified
Commit
a1176534
authored
Nov 23, 2020
by
intrigeri
Browse files
Lint
parent
23b3a8d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/copy-iuks-to-rsync-server-and-verify
View file @
a1176534
...
...
@@ -54,7 +54,7 @@ def main():
logging
.
basicConfig
(
level
=
logging
.
INFO
,
format
=
LOG_FORMAT
)
if
not
Path
(
args
.
hashes_file
).
exists
():
log
.
error
(
"%s does not exist"
%
(
args
.
hashes_file
)
)
log
.
error
(
"%s does not exist"
,
args
.
hashes_file
)
sys
.
exit
(
1
)
if
not
args
.
skip_sending_hashes_file
:
...
...
@@ -93,7 +93,7 @@ def send_hashes_file(hashes_file: str, desthost: str, destdir: str) -> None:
def
iuks_listed_in
(
hashes_file
:
str
)
->
List
[
str
]:
with
Path
(
hashes_file
).
open
()
as
f
:
lines
=
f
.
readlines
()
return
[
l
.
split
(
' '
)[
-
1
].
rstrip
()
for
l
in
lines
]
return
[
l
ine
.
split
(
' '
)[
-
1
].
rstrip
()
for
l
ine
in
lines
]
def
get_jenkins_iuks_urls
(
jenkins_iuks_base_url
:
str
,
...
...
@@ -151,9 +151,9 @@ def get_jenkins_iuks_urls(jenkins_iuks_base_url: str,
def
download_iuks_from_jenkins
(
hashes_file
:
str
,
desthost
:
str
,
destdir
:
str
,
jenkins_iuks_base_url
:
str
,
jenkins_build_id
:
int
)
->
None
:
log
.
info
(
"Downloading IUKs from Jenkins to %s…"
%
(
desthost
)
)
log
.
info
(
"Downloading IUKs from Jenkins to %s…"
,
desthost
)
expected_iuks
=
iuks_listed_in
(
hashes_file
)
log
.
debug
(
"IUKS: %s"
%
', '
.
join
(
expected_iuks
)
)
log
.
debug
(
"IUKS: %s"
,
', '
.
join
(
expected_iuks
)
jenkins_iuks_urls
=
get_jenkins_iuks_urls
(
jenkins_iuks_base_url
,
jenkins_build_id
)
jenkins_iuks
=
[
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment