Skip to content
Snippets Groups Projects
Commit fc4f3694 authored by Guillaume Pernot's avatar Guillaume Pernot
Browse files

Added CI_ALLOW_FAILURE for cdash_handler.py

parent 3ac6903b
No related branches found
No related tags found
No related merge requests found
...@@ -140,6 +140,9 @@ debian-build: ...@@ -140,6 +140,9 @@ debian-build:
allow_failure: true allow_failure: true
script: script:
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=debian-unstable-gcc - xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=debian-unstable-gcc
after_script:
- export CI_ALLOW_FAILURE=ON
- python3 -u CI/cdash_handler.py
dependencies: [] dependencies: []
## Ubuntu superbuild ## Ubuntu superbuild
......
...@@ -246,6 +246,9 @@ if __name__ == "__main__": ...@@ -246,6 +246,9 @@ if __name__ == "__main__":
if ( len(sys.argv) < 6 and len(sys.argv) > 1 ): if ( len(sys.argv) < 6 and len(sys.argv) > 1 ):
print("Usage : "+sys.argv[0]+" commit_sha1 project_id project_directory token ref_name") print("Usage : "+sys.argv[0]+" commit_sha1 project_id project_directory token ref_name")
sys.exit(1) sys.exit(1)
allow_failure = os.environ.get('CI_ALLOW_FAILURE', False)
if ( len(sys.argv) >= 6): if ( len(sys.argv) >= 6):
sha1 = sys.argv[1] sha1 = sys.argv[1]
proj = sys.argv[2] proj = sys.argv[2]
...@@ -286,6 +289,10 @@ if __name__ == "__main__": ...@@ -286,6 +289,10 @@ if __name__ == "__main__":
sys.exit(0) sys.exit(0)
gitlab_url = "https://gitlab.orfeo-toolbox.org/api/v4/projects/" gitlab_url = "https://gitlab.orfeo-toolbox.org/api/v4/projects/"
gitlab_url += proj + "/statuses/" + sha1 gitlab_url += proj + "/statuses/" + sha1
if allow_failure:
state = 'success'
params = urllib.parse.urlencode({'name':'cdash:' + handler.site , 'state': state ,\ params = urllib.parse.urlencode({'name':'cdash:' + handler.site , 'state': state ,\
'target_url' : cdash_url , 'description' : error , 'ref' : refn }) 'target_url' : cdash_url , 'description' : error , 'ref' : refn })
gitlab_request = urllib.request.Request(gitlab_url) gitlab_request = urllib.request.Request(gitlab_url)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment