Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main Repositories
otb
Commits
65dabc41
Commit
65dabc41
authored
5 years ago
by
Guillaume Pasero
Browse files
Options
Downloads
Patches
Plain Diff
CI: add traces
parent
6d87b300
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!621
Release 7.0 (master)
,
!536
CI Fixes episode N
,
!529
CI Refactor Configure.xml parsing
Pipeline
#1945
passed
5 years ago
Stage: precheck
Stage: prepare
Stage: build
Stage: external
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CI/cdash_handler.py
+10
-7
10 additions, 7 deletions
CI/cdash_handler.py
with
10 additions
and
7 deletions
CI/cdash_handler.py
+
10
−
7
View file @
65dabc41
...
...
@@ -31,7 +31,7 @@ import time
import
xml.etree.ElementTree
as
ET
trace
=
Fals
e
trace
=
Tru
e
"""
Check needed environment parameters
...
...
@@ -76,10 +76,10 @@ class Handler:
if
os
.
path
.
exists
(
configure_xml
):
if
trace
:
print
(
configure_xml
)
configure_file
=
open
(
configure_xml
,
"
r
"
)
content
=
configure_file
.
read
()
configure_file
.
close
()
print
(
content
)
#~
configure_file = open( configure_xml, "r" )
#~
content = configure_file.read()
#~
configure_file.close()
#~
print( content )
self
.
configure_path
=
configure_xml
return
self
.
configure_path
print
(
"
Could not find the Configure.xml produced by ctest
"
)
...
...
@@ -99,6 +99,8 @@ class Handler:
content
=
content
[:(
startLog
+
5
)]
+
content
[
endLog
:]
# parse XML
root
=
ET
.
fromstring
(
content
)
if
trace
:
print
(
root
.
attrib
)
if
not
'
Name
'
in
root
.
keys
():
print
(
"
Can
'
t find site name in Configure.XML
"
)
sys
.
exit
(
1
)
...
...
@@ -131,9 +133,10 @@ class Handler:
if
key
==
"
project
"
:
project
=
value
if
(
site
==
""
or
stamp
==
""
or
name
==
""
or
project
==
""
):
print
(
"
Missing argument for buildid request
\
site:
"
+
site
+
"
, stamp:
"
+
stamp
+
"
, name:
"
+
name
+
"
, project:
"
+
project
+
"
.
"
)
print
(
"
Missing argument for buildid request site:
"
+
site
+
"
, stamp:
"
+
stamp
+
"
, name:
"
+
name
+
"
, project:
"
+
project
+
"
.
"
)
sys
.
exit
(
1
)
elif
trace
:
print
(
"
Argument for buildid request site:
"
+
site
+
"
, stamp:
"
+
stamp
+
"
, name:
"
+
name
+
"
, project:
"
+
project
+
"
.
"
)
buildid_api
=
"
/api/v1/getbuildid.php?
"
buildid_params
=
urllib
.
parse
.
urlencode
({
'
project
'
:
project
,
'
site
'
:
site
,
'
stamp
'
:
stamp
,
'
name
'
:
name
})
full_url
=
self
.
url
+
buildid_api
+
buildid_params
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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