From 5e3d69b2f423917eaec9a80e1396276c5a7c9c4f Mon Sep 17 00:00:00 2001
From: felmer <franz-josef.elmer@id.ethz.ch>
Date: Thu, 24 Sep 2020 15:37:36 +0200
Subject: [PATCH] SSDM-10191: allow to specify CI host as CLI argument

---
 integration-tests/settings.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/integration-tests/settings.py b/integration-tests/settings.py
index 04ab833f45f..25faa19237f 100644
--- a/integration-tests/settings.py
+++ b/integration-tests/settings.py
@@ -5,8 +5,8 @@ import sys
 import os.path
 import time
 
-# Base URL of the CI server which hosts the artifacts.
-CI_BASE_URL = 'http://bs-ci01.ethz.ch:8090'
+# Default base URL of the CI server which hosts the artifacts.
+ci_base_url = 'http://bs-ci01.ethz.ch:8090'
 
 reuseRepository = False
 devMode = False
@@ -20,9 +20,12 @@ if len(sys.argv) > 1:
         devMode = True
     elif firstArgument == '-d':
         devMode = True
+    elif firstArgument == '-s':
+        ci_base_url = sys.argv[2]
     elif firstArgument == '-h':
-        print("Usage: %s [-h|-r|-d|-rd]\n-h: prints this help\n-r: reuses artifact repository\n"
-            + "-d: developing mode\n-rd: both options" % os.path.basename(cmd))
+        print(("Usage: %s [-h|-r|-d|-rd|-s <ci server>]\n-h: prints this help\n-r: reuses artifact repository\n"
+            + "-d: developing mode\n-rd: both options\n"
+            + "-s <ci server>: option for CI server host name") % os.path.basename(cmd))
         exit(1)
     else:
         print("Unknown option: %s. Use option '-h' to see usage." % firstArgument)
@@ -34,6 +37,6 @@ sys.path.append("%s/sourceTest" % dirname)
 
 from systemtest.artifactrepository import JenkinsArtifactRepository 
 
-REPOSITORY = JenkinsArtifactRepository(CI_BASE_URL, "%s/targets/artifact-repository" % dirname)
+REPOSITORY = JenkinsArtifactRepository(ci_base_url, "%s/targets/artifact-repository" % dirname)
 if not reuseRepository:
     REPOSITORY.clear()
-- 
GitLab