Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qtwayland-gerrit-watcher
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qtwaylandtests
qtwayland-gerrit-watcher
Commits
8af550df
Commit
8af550df
authored
Apr 20, 2018
by
Johan Helsing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't run the health checks at the same time
parent
6abcd02d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
server.js
server.js
+14
-10
No files found.
server.js
View file @
8af550df
...
...
@@ -113,14 +113,15 @@ function listenForGerritChanges() {
testProcess
.
on
(
'
close
'
,
code
=>
{
const
failed
=
code
!=
0
;
const
commit
=
`
${
change
.
number
}
,
${
patchSet
.
number
}
`
;
var
message
=
'
Experimental QtWayland Bot:
'
+
`
Running headless tests
${
commit
}
${
failed
?
'
failed
'
:
'
succeeded
'
}
`
;
var
message
=
'
Experimental QtWayland Bot:
Running headless tests for change
'
+
`
${
change
.
number
}
, patch set #
${
patchSet
.
number
}
${
failed
?
'
failed
'
:
'
succeeded
'
}
`
;
if
(
failed
)
{
const
codeReview
=
'
-1
'
;
readLastLines
.
read
(
`logs/
${
containerName
}
.txt`
,
10
).
then
(
lines
=>
{
const
messageWithLogTail
=
message
+
lines
;
console
.
log
(
messageWithLogTail
);
//postGerritComment(commit, messageWithLogTail, codeReview);
const
tailLines
=
30
;
readLastLines
.
read
(
`logs/
${
containerName
}
.txt`
,
tailLines
).
then
(
lines
=>
{
const
indentedLogTail
=
lines
.
replace
(
/^/mg
,
'
'
);
message
=
`
${
message
}
\n\nLast
${
tailLines
}
lines of log:\n\n
${
indentedLogTail
}
`
;
console
.
log
(
message
);
postGerritComment
(
commit
,
message
,
codeReview
);
}).
catch
(
reason
=>
console
.
log
(
'
Couldn
\'
t get last lines of log file
'
,
reason
));
}
else
{
...
...
@@ -190,13 +191,16 @@ if (!fs.existsSync('logs')){
restoreTests
();
listenForGerritChanges
();
scheduleJob
({
hour
:
12
,
minute
:
0
},
()
=>
{
console
.
log
(
'
Running daily checks
'
);
healthCheck
(
'
5.11
'
);
console
.
log
(
'
Running daily health check for dev
'
);
healthCheck
(
'
dev
'
);
});
scheduleJob
({
hour
:
11
,
minute
:
0
},
()
=>
{
console
.
log
(
'
Running daily health check for 5.11
'
);
healthCheck
(
'
5.11
'
);
});
// Run initial tests
healthCheck
(
'
5.11
'
);
healthCheck
(
'
dev
'
);
//
healthCheck('5.11');
//
healthCheck('dev');
serveLogs
();
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