Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inau
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
util
inau
Commits
f622cbb2
Commit
f622cbb2
authored
4 years ago
by
Alessio Igor Bogani
Browse files
Options
Downloads
Patches
Plain Diff
A couple of minor changes
parent
54933e8d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inau-dispatcher.py
+6
-5
6 additions, 5 deletions
inau-dispatcher.py
with
6 additions
and
5 deletions
inau-dispatcher.py
+
6
−
5
View file @
f622cbb2
...
...
@@ -12,6 +12,7 @@ import sys
import
logging
import
logging.handlers
import
argparse
import
datetime
import
subprocess
import
paramiko
import
hashlib
...
...
@@ -145,11 +146,11 @@ class Builder:
else
:
raiseException
(
'
Invalid type
'
)
artifacts
=
[]
for
r
,
d
,
f
in
os
.
walk
(
basedir
):
dir
=
""
if
r
!=
basedir
:
dir
=
os
.
path
.
basename
(
r
)
+
"
/
"
artifacts
=
[]
for
file
in
f
:
hashFile
=
""
with
open
(
basedir
+
dir
+
file
,
"
rb
"
)
as
fd
:
...
...
@@ -157,9 +158,9 @@ class Builder:
hashFile
=
hashlib
.
sha256
(
bytes
).
hexdigest
();
if
not
os
.
path
.
isfile
(
args
.
store
+
hashFile
):
shutil
.
copyfile
(
basedir
+
dir
+
file
,
args
.
store
+
hashFile
,
follow_symlinks
=
False
)
artifacts
.
append
(
db
.
Artifacts
(
build_id
=
job
.
build_id
,
hash
=
hashFile
,
filename
=
dir
+
file
))
session
.
add_all
(
artifacts
)
session
.
commit
()
artifacts
.
append
(
db
.
Artifacts
(
build_id
=
job
.
build_id
,
hash
=
hashFile
,
filename
=
dir
+
file
))
session
.
add_all
(
artifacts
)
session
.
commit
()
sendEmail
(
session
,
job
.
emails
,
outcome
,
output
)
...
...
@@ -310,7 +311,7 @@ class Server(BaseHTTPRequestHandler):
session
.
close
()
return
builds
.
append
(
db
.
Builds
(
repository_id
=
r
.
id
,
platform_id
=
r
.
platform_id
,
tag
=
post_json
[
'
ref
'
]))
builds
.
append
(
db
.
Builds
(
repository_id
=
r
.
id
,
platform_id
=
r
.
platform_id
,
tag
=
os
.
path
.
basename
(
post_json
[
'
ref
'
]))
)
if
not
builds
:
self
.
send_response
(
404
)
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment