Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Managetests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Managetests
Commits
c218b3d8
Commit
c218b3d8
authored
Mar 02, 2019
by
Mattia Rizzolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always set all the metadata on deployment failure
Signed-off-by:
Mattia Rizzolo
<
mattia@debian.org
>
parent
1d9822b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
managetests/branches.py
managetests/branches.py
+12
-3
No files found.
managetests/branches.py
View file @
c218b3d8
...
...
@@ -246,7 +246,7 @@ class Branch:
if
not
(
branch
/
"build"
/
"managetests.json"
).
exists
():
log
(
"[!] No managetests.json found in the branch!"
)
log
(
"[!] Aborting!"
)
return
False
return
self
.
fail_deployment
(
branch
)
shutil
.
copy
(
str
(
branch
/
"build"
/
"managetests.json"
),
...
...
@@ -259,7 +259,7 @@ class Branch:
if
not
self
.
exec_command
(
cmd
,
build
=
True
):
log
(
"[!] Failed to execute build command: %s"
%
" "
.
join
(
cmd
))
log
(
"[!] Aborting!"
)
return
False
self
.
fail_deployment
(
branch
)
# Check if the branch was successifully built
popen_args
=
self
.
command_popen_args
(
self
.
config
[
"run"
])
...
...
@@ -268,7 +268,7 @@ class Branch:
self
.
update_status
(
"success"
)
else
:
log
(
"[!] Warning: build seems to have failed"
)
self
.
update_status
(
"failed"
)
self
.
fail_deployment
(
branch
)
self
.
manager
.
details
[
"branches"
][
self
.
name
]
=
self
.
mr
self
.
manager
.
save_details
()
...
...
@@ -299,6 +299,15 @@ class Branch:
pass
self
.
manager
.
save_details
()
def
fail_deployment
(
self
,
branch
):
self
.
_deploying
=
False
self
.
update_status
(
'failed'
)
self
.
manager
.
details
[
"branches"
][
self
.
name
]
=
self
.
mr
self
.
manager
.
save_details
()
# Create the built file
(
branch
/
"built"
).
touch
()
return
False
def
update_status
(
self
,
state
,
log
=
True
):
"""Update the commit status"""
# Don't update status hooks on development instances
...
...
Write
Preview
Markdown
is supported
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