diff --git a/scripts/accept_merge_request.py b/scripts/accept_merge_request.py index 591c90a54ea69e69e9119e225017cbab4949b7e8..90e77a417553137c218c1bda28bb99f7fdfd580c 100755 --- a/scripts/accept_merge_request.py +++ b/scripts/accept_merge_request.py @@ -116,7 +116,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/check_if_integration_branch_is_up_to_date.py b/scripts/check_if_integration_branch_is_up_to_date.py index ce1ac448f0b9091cf7dda7146d9bd989dcf9fd18..01b9dad74443e3be17ba6c5f61105e35036159c7 100755 --- a/scripts/check_if_integration_branch_is_up_to_date.py +++ b/scripts/check_if_integration_branch_is_up_to_date.py @@ -50,7 +50,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/common.py b/scripts/common.py index 56c45594e7211563b3347bac19bf610d9d5a0d03..052ab305ab6b7fad9dd80b26cccb0bf3c023d3ca 100755 --- a/scripts/common.py +++ b/scripts/common.py @@ -13,6 +13,7 @@ from gitlab.v4.objects import Project from gitlab.v4.objects import MergeRequest +GITLAB_URL = "https://git.seco.com" MANIFEST_FILE = "default.xml" SRCREV_FILE = "SRCREV.conf" PENDING_STATES = ["created", "waiting_for_resource", "preparing", "pending", "running"] diff --git a/scripts/create_merge_request.py b/scripts/create_merge_request.py index 22e4591bfc5a8877772d4ce2acf59946fd78aa61..4ab7d2ff1d049dd8269600131c1e49a98ff70d92 100755 --- a/scripts/create_merge_request.py +++ b/scripts/create_merge_request.py @@ -53,7 +53,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/deploy_gitlab_ci.py b/scripts/deploy_gitlab_ci.py index 7de5c81c69eeec1edcb88814b7e94a113588ebe7..b8ad2fe8af25b142160ad628cf5c94234a3a8b62 100755 --- a/scripts/deploy_gitlab_ci.py +++ b/scripts/deploy_gitlab_ci.py @@ -104,7 +104,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/download_file_from_latest_job.py b/scripts/download_file_from_latest_job.py index 968586a8b0c6339b528cd8905d0c0801c5c15fc8..7b0478b4249cf5a6181ce0e912718a89ccde6fa2 100755 --- a/scripts/download_file_from_latest_job.py +++ b/scripts/download_file_from_latest_job.py @@ -6,6 +6,7 @@ Downloads given file of the artifacts of a pipeline job. """ import argparse +import common import logging import os import sys @@ -18,8 +19,6 @@ __email__ = "jonas.hoeppner@garz-fricke.com" from download_job_artifacts import download_job_artifact from get_pipeline_jobs import get_pipeline_jobs -GITLAB_SERVER = "https://git.seco.com" - verbose = 0 @@ -31,7 +30,7 @@ def main(args): help="""URL to the GitLab instance""", dest="gitlab_url", action="store", - default=GITLAB_SERVER, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/download_job_artifacts.py b/scripts/download_job_artifacts.py index 07717b1e27ca02f8cfcdcb1ed89c6b6f5e2c42f5..7fd313c50792f4f0081926ccd661e922b030256d 100755 --- a/scripts/download_job_artifacts.py +++ b/scripts/download_job_artifacts.py @@ -6,6 +6,7 @@ Downloads the job artifacts of a given job """ import argparse +import common import logging import sys import os @@ -16,8 +17,6 @@ import gitlab as gl __author__ = "Jonas Höppner" __email__ = "jonas.hoeppner@garz-fricke.com" -GITLAB_SERVER = "https://git.seco.com" - verbose = 0 @@ -77,7 +76,7 @@ def main(args): help="""URL to the GitLab instance""", dest="gitlab_url", action="store", - default=GITLAB_SERVER, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/get_current_revision_from_manifest.py b/scripts/get_current_revision_from_manifest.py index a35c9af7baf6ade5c438f338582f3e38612f7a45..6bdc4c4be45a73acb4108bfe12f4ae1fb429c80a 100755 --- a/scripts/get_current_revision_from_manifest.py +++ b/scripts/get_current_revision_from_manifest.py @@ -84,7 +84,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/get_integration_sources.py b/scripts/get_integration_sources.py index e78916c724d5375c8acecd5872197290f87deb77..128add4ec55bf756d4de140093ae8e4b6e8d2561 100755 --- a/scripts/get_integration_sources.py +++ b/scripts/get_integration_sources.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 import argparse +import common import re import sys from gitlab import Gitlab, GitlabGetError @@ -61,7 +62,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/get_merge_requests.py b/scripts/get_merge_requests.py index c1fc7c4dcd945d788d0ce072fc1b300d62adfac3..081dba9e45e0c2df62064efb925f0a576eac9887 100755 --- a/scripts/get_merge_requests.py +++ b/scripts/get_merge_requests.py @@ -46,7 +46,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/get_pipeline_jobs.py b/scripts/get_pipeline_jobs.py index 71f7f12ef9d250fd235a1c457248df16d2d4f759..fb00e922d20a426c45ddc879a11659925ba4f16b 100755 --- a/scripts/get_pipeline_jobs.py +++ b/scripts/get_pipeline_jobs.py @@ -6,6 +6,7 @@ Queries the jobs of a given pipeline, filtered by stage """ import argparse +import common import logging import sys import gitlab as gl @@ -13,8 +14,6 @@ import gitlab as gl __author__ = "Jonas Höppner" __email__ = "jonas.hoeppner@garz-fricke.com" -GITLAB_SERVER = "https://git.seco.com" - verbose = 0 @@ -63,7 +62,7 @@ def main(args): help="""URL to the GitLab instance""", dest="gitlab_url", action="store", - default=GITLAB_SERVER, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/get_pipelines.py b/scripts/get_pipelines.py index b3c2012a9e1f9b6394ea30f145b77bb2fa19b8e8..29bf333df13478a5943bb97f00a4ca0213429086 100755 --- a/scripts/get_pipelines.py +++ b/scripts/get_pipelines.py @@ -43,7 +43,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/gitlab_backup.py b/scripts/gitlab_backup.py index 7df14917f3dc8041a716293e524128c8f1458e0f..45f1c04bf25fbce6e3f8891fda9222a8ea014e83 100755 --- a/scripts/gitlab_backup.py +++ b/scripts/gitlab_backup.py @@ -7,6 +7,7 @@ Backup using gitlab project exports for all projects in a given group import argparse +import common import datetime import logging import os @@ -17,7 +18,6 @@ import gitlab as gl __author__ = "Jonas Höppner" __email__ = "jonas.hoeppner@garz-fricke.com" -GITLAB_SERVER = "https://git.seco.com" # ID of the Seco Northern Europe GITLAB_GROUP_ID = "556" @@ -207,7 +207,7 @@ def main(args): help="""URL to the GitLab instance""", dest="gitlab_url", action="store", - default=GITLAB_SERVER, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/integrate_into_manifest.py b/scripts/integrate_into_manifest.py index 39ec875b2cc3f260bcb0224270981059bbe26bc3..f387d526c1777a8a979486601d2da4898b1c9299 100755 --- a/scripts/integrate_into_manifest.py +++ b/scripts/integrate_into_manifest.py @@ -195,7 +195,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/merge_into_manifest.py b/scripts/merge_into_manifest.py index 4c6b075482cef561e6e4bed92cf398690b0ba3ff..522682241999a473a3e3fccaf3644effa464bd6d 100755 --- a/scripts/merge_into_manifest.py +++ b/scripts/merge_into_manifest.py @@ -124,7 +124,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/mirror_pipeline_result.py b/scripts/mirror_pipeline_result.py index c2973691108ecff7cbdc24e92855fe000fd26e66..a3d9a466e72b8bfadb669c2249354d3623c1601e 100755 --- a/scripts/mirror_pipeline_result.py +++ b/scripts/mirror_pipeline_result.py @@ -44,7 +44,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/retrigger_integrating_projects.py b/scripts/retrigger_integrating_projects.py index fe631ece7cdfccf2cb4950b2b1ae4061b4b766ae..df5e0f24aa4123999b67957f4192e5016ec2a270 100755 --- a/scripts/retrigger_integrating_projects.py +++ b/scripts/retrigger_integrating_projects.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 import argparse +import common import sys from gitlab import Gitlab, GitlabJobRetryError @@ -19,7 +20,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/retrigger_pipeline_jobs.py b/scripts/retrigger_pipeline_jobs.py index 11b5258d9e91ef5d758984392a780b7310358c0d..e87d40e9366fad527cb1a2a57922054d6fa0b38b 100755 --- a/scripts/retrigger_pipeline_jobs.py +++ b/scripts/retrigger_pipeline_jobs.py @@ -65,7 +65,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/trigger_pipeline.py b/scripts/trigger_pipeline.py index c0d0bada90119c59e3ba4ca91f2f06c9f345d0aa..54a68c9427236c7385cf5469ff152d90fd319ed9 100755 --- a/scripts/trigger_pipeline.py +++ b/scripts/trigger_pipeline.py @@ -12,7 +12,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token", diff --git a/scripts/update_submodule.py b/scripts/update_submodule.py index ea8f5a97674be6e9a66f22fd3f86fada88d8288e..dcf8563298b90f6b94054866b97008a78b33b439 100755 --- a/scripts/update_submodule.py +++ b/scripts/update_submodule.py @@ -407,7 +407,7 @@ def main(): "--gitlab-url", help="""URL to the GitLab instance""", dest="gitlab_url", - required=True, + default=common.GITLAB_URL, ) parser.add_argument( "--token",