Commit 13c6d363 authored by guillaume pernot's avatar guillaume pernot

Merge branch 'feat-ci-allows-failure-for-debian-build' into 'develop'

CI: Added CI_ALLOW_FAILURE for cdash_handler.py

See merge request !630
parents 52a88f49 fc4f3694
Pipeline #2994 passed with stages
in 3 minutes and 4 seconds
......@@ -140,6 +140,9 @@ debian-build:
allow_failure: true
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
after_script:
- export CI_ALLOW_FAILURE=ON
- python3 -u CI/cdash_handler.py
dependencies: []
## Ubuntu superbuild
......
......@@ -246,6 +246,9 @@ if __name__ == "__main__":
if ( len(sys.argv) < 6 and len(sys.argv) > 1 ):
print("Usage : "+sys.argv[0]+" commit_sha1 project_id project_directory token ref_name")
sys.exit(1)
allow_failure = os.environ.get('CI_ALLOW_FAILURE', False)
if ( len(sys.argv) >= 6):
sha1 = sys.argv[1]
proj = sys.argv[2]
......@@ -286,6 +289,10 @@ if __name__ == "__main__":
sys.exit(0)
gitlab_url = "https://gitlab.orfeo-toolbox.org/api/v4/projects/"
gitlab_url += proj + "/statuses/" + sha1
if allow_failure:
state = 'success'
params = urllib.parse.urlencode({'name':'cdash:' + handler.site , 'state': state ,\
'target_url' : cdash_url , 'description' : error , 'ref' : refn })
gitlab_request = urllib.request.Request(gitlab_url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment