From ffd20f247ec470b1bfb7ca6409274e79e8d2eef5 Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 29 Mar 2021 12:32:40 +0100 Subject: [PATCH 01/16] Adding trial merge test --- .gitlab-ci.yml | 6 ++++++ testing/merge_test.py | 1 + 2 files changed, 7 insertions(+) create mode 100644 testing/merge_test.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c242543..170f0db 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ stages: - Syntax - Lint - Compile + - MergeTest parseASN1: stage: Syntax @@ -30,3 +31,8 @@ compileASN1: - python3 testing/compile_asn1.py allow_failure: true +MergeTest: + stage: MergeTest + script: + - python3 testing/merge_test.py + allow_failure: true diff --git a/testing/merge_test.py b/testing/merge_test.py new file mode 100644 index 0000000..7f6caa2 --- /dev/null +++ b/testing/merge_test.py @@ -0,0 +1 @@ +print ("Hello world") \ No newline at end of file -- GitLab From ead7a957ff698c9968b3ded0007bc0e20f1acfcd Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 29 Mar 2021 12:49:27 +0100 Subject: [PATCH 02/16] commit --- testing/merge_test.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/testing/merge_test.py b/testing/merge_test.py index 7f6caa2..6c4b61e 100644 --- a/testing/merge_test.py +++ b/testing/merge_test.py @@ -1 +1,7 @@ -print ("Hello world") \ No newline at end of file +import os +import pprint + +print ("Hello world") +vars = os.environ + +pprint.pprint(dict(vars)) -- GitLab From 9882253d1a52d8b29e334e506df5062fb5e47e6f Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 29 Mar 2021 12:50:47 +0100 Subject: [PATCH 03/16] Reordering tests for now --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 170f0db..2049abd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,11 +4,11 @@ before_script: - python3 --version stages: + - MergeTest - Syntax - Lint - Compile - - MergeTest - + parseASN1: stage: Syntax script: -- GitLab From 37e1a010cba2aa377fa92b8471bdb9f9a2a4a246 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 6 Apr 2021 10:30:09 +0100 Subject: [PATCH 04/16] Merge test script --- testing/merge_test.py | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/testing/merge_test.py b/testing/merge_test.py index 6c4b61e..78b6c94 100644 --- a/testing/merge_test.py +++ b/testing/merge_test.py @@ -1,7 +1,37 @@ import os import pprint +import requests +import json print ("Hello world") -vars = os.environ -pprint.pprint(dict(vars)) +crCommitBranch = os.environ.get("CI_COMMIT_REF_NAME", "cr/TS33128/0163") +apiUrl = os.environ.get("CI_API_V4_URL", "https://forge.3gpp.org/rep/api/v4") +projectId = os.environ.get("CI_PROJECT_ID", "13") + +def gapi (query): + url = f"{apiUrl}/projects/{projectId}/{query}" + r = requests.get(url) + return json.loads(r.text) + + +print ("Searching for corresponding MR...") + +mrs = gapi(f"merge_requests?source_branch={crCommitBranch}") +if len(mrs) == 0: + print ("No MR found... aborting") + exit() + +if len(mrs) > 1: + print (f"{len(mrs)} MRs found, 1 expected - aborting") + exit(-1) + +mr = mrs[0] + +print (f"Found MR {mr['reference']} ({mr['title']})") +print (f"Target branch is {mr['target_branch']}") +print ("Searching for open MRs targeting same branch...") + +mrs = gapi(f"merge_requests?target_branch={mr['target_branch']}&state=opened") +print (f"{len(mrs)} MRs found") + -- GitLab From 86310af6ad7589187ac1ba6ebbd70fa0cbe37f15 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 7 Apr 2021 11:33:48 +0100 Subject: [PATCH 05/16] Updated merge test --- testing/merge_test.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/testing/merge_test.py b/testing/merge_test.py index 78b6c94..c6ae0a7 100644 --- a/testing/merge_test.py +++ b/testing/merge_test.py @@ -2,8 +2,9 @@ import os import pprint import requests import json +import subprocess -print ("Hello world") +print ("Hello world v1.1") crCommitBranch = os.environ.get("CI_COMMIT_REF_NAME", "cr/TS33128/0163") apiUrl = os.environ.get("CI_API_V4_URL", "https://forge.3gpp.org/rep/api/v4") @@ -14,6 +15,13 @@ def gapi (query): r = requests.get(url) return json.loads(r.text) +def do (commandline): + print (" Attempting: " + commandline) + completedProc = subprocess.run(commandline) + print (" STDOUT > " + "empty" if completedProc.stdout is None else completedProc.stdout) + print (" STDERR > " + "empty" if completedProc.stderr is None else completedProc.stderr) + print (f" Completed with code {completedProc.returncode}") + return completedProc.returncode == 0 print ("Searching for corresponding MR...") @@ -33,5 +41,26 @@ print (f"Target branch is {mr['target_branch']}") print ("Searching for open MRs targeting same branch...") mrs = gapi(f"merge_requests?target_branch={mr['target_branch']}&state=opened") +mrs = [m for m in mrs if m['reference'] != mr['reference']] print (f"{len(mrs)} MRs found") +mergeConflicts = [] +for mr in mrs: + source_branch = mr['source_branch'] + print (source_branch) + + try: + do(f"git fetch origin {source_branch}:{source_branch}") + if not do(f"git merge --no-commit {source_branch}"): + print ("Merge NOT OK") + mergeConflicts.append(source_branch) + else: + print ("Merge OK") + except: + mergeConflicts.append(source_branch) + raise + finally: + do("git merge --abort") + +print (f"Merge conflicts with following branches: {mergeConflicts}") +exit(len(mergeConflicts)) \ No newline at end of file -- GitLab From 91ee2c5a5b1c3fe4e7e779b52643382d126c15c4 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 7 Apr 2021 11:34:54 +0100 Subject: [PATCH 06/16] Adding conflicting change to test --- 33128/r16/TS33128Payloads.asn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/33128/r16/TS33128Payloads.asn b/33128/r16/TS33128Payloads.asn index 17c60dc..e81dc3e 100644 --- a/33128/r16/TS33128Payloads.asn +++ b/33128/r16/TS33128Payloads.asn @@ -24,7 +24,8 @@ lINotificationPayloadOID RELATIVE-OID ::= {tS33128PayloadsOID lINotification( XIRIPayload ::= SEQUENCE { xIRIPayloadOID [1] RELATIVE-OID, - event [2] XIRIEvent + event [2] XIRIEvent, + conflictingChange [3] BOOLEAN } XIRIEvent ::= CHOICE -- GitLab From 00d67dbf5c2b15fc6948e0bcb94157ec8e29a081 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 7 Apr 2021 11:44:24 +0100 Subject: [PATCH 07/16] Working prototype merge test --- testing/merge_test.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/testing/merge_test.py b/testing/merge_test.py index c6ae0a7..9d755f8 100644 --- a/testing/merge_test.py +++ b/testing/merge_test.py @@ -17,11 +17,11 @@ def gapi (query): def do (commandline): print (" Attempting: " + commandline) - completedProc = subprocess.run(commandline) - print (" STDOUT > " + "empty" if completedProc.stdout is None else completedProc.stdout) - print (" STDERR > " + "empty" if completedProc.stderr is None else completedProc.stderr) + completedProc = subprocess.run(commandline, capture_output=True) + print (" STDOUT > " + ("empty" if completedProc.stdout is None else completedProc.stdout.decode('utf-8'))) + print (" STDERR > " + ("empty" if completedProc.stderr is None else completedProc.stderr.decode('utf-8'))) print (f" Completed with code {completedProc.returncode}") - return completedProc.returncode == 0 + return (completedProc.returncode == 0, completedProc.stdout.decode('utf-8')) print ("Searching for corresponding MR...") @@ -44,23 +44,24 @@ mrs = gapi(f"merge_requests?target_branch={mr['target_branch']}&state=opened") mrs = [m for m in mrs if m['reference'] != mr['reference']] print (f"{len(mrs)} MRs found") -mergeConflicts = [] +mergeConflicts = {} for mr in mrs: source_branch = mr['source_branch'] print (source_branch) try: do(f"git fetch origin {source_branch}:{source_branch}") - if not do(f"git merge --no-commit {source_branch}"): + success, errStr = do(f"git merge --no-commit {source_branch}") + if not success: print ("Merge NOT OK") - mergeConflicts.append(source_branch) + mergeConflicts[source_branch] = errStr else: print ("Merge OK") - except: - mergeConflicts.append(source_branch) + except Exception as ex: + mergeConflicts[source_branch] = str(ex) raise finally: do("git merge --abort") print (f"Merge conflicts with following branches: {mergeConflicts}") -exit(len(mergeConflicts)) \ No newline at end of file +exit(len(mergeConflicts.keys())) \ No newline at end of file -- GitLab From a19c047b049de4589a2c352f6a0ed17b7e9a9767 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 7 Apr 2021 14:24:40 +0100 Subject: [PATCH 08/16] Adding shell env to merge test --- testing/dockerfile | 9 +++++++-- testing/merge_test.py | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/testing/dockerfile b/testing/dockerfile index d907429..64bbe9d 100644 --- a/testing/dockerfile +++ b/testing/dockerfile @@ -1,2 +1,7 @@ -FROM python:3.7 -RUN pip3 install -q asn1tools lxml xmlschema \ No newline at end of file +# docker build -t mcanterb/forge-cicd +# docker push mcanterb/forge-cicd + +FROM python:3.8 +RUN apt update && apt-get install -y git + +RUN pip3 install -q asn1tools lxml xmlschema requests gitpython \ No newline at end of file diff --git a/testing/merge_test.py b/testing/merge_test.py index 9d755f8..e5d2252 100644 --- a/testing/merge_test.py +++ b/testing/merge_test.py @@ -4,7 +4,7 @@ import requests import json import subprocess -print ("Hello world v1.1") +print ("Hello world v1.2") crCommitBranch = os.environ.get("CI_COMMIT_REF_NAME", "cr/TS33128/0163") apiUrl = os.environ.get("CI_API_V4_URL", "https://forge.3gpp.org/rep/api/v4") @@ -17,7 +17,7 @@ def gapi (query): def do (commandline): print (" Attempting: " + commandline) - completedProc = subprocess.run(commandline, capture_output=True) + completedProc = subprocess.run(commandline, capture_output=True, shell=True) print (" STDOUT > " + ("empty" if completedProc.stdout is None else completedProc.stdout.decode('utf-8'))) print (" STDERR > " + ("empty" if completedProc.stderr is None else completedProc.stderr.decode('utf-8'))) print (f" Completed with code {completedProc.returncode}") -- GitLab From 872b6010c4b0831396296dc648c1921ae879ca9f Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 7 Apr 2021 14:30:53 +0100 Subject: [PATCH 09/16] Making merge test less verbose --- testing/dockerfile | 2 +- testing/merge_test.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/testing/dockerfile b/testing/dockerfile index 64bbe9d..d71a5bf 100644 --- a/testing/dockerfile +++ b/testing/dockerfile @@ -3,5 +3,5 @@ FROM python:3.8 RUN apt update && apt-get install -y git - +RUN git config --global user.name "forgeRobot" && git config --global user.email "forgeRobot@example.com" RUN pip3 install -q asn1tools lxml xmlschema requests gitpython \ No newline at end of file diff --git a/testing/merge_test.py b/testing/merge_test.py index e5d2252..a8a38ca 100644 --- a/testing/merge_test.py +++ b/testing/merge_test.py @@ -16,11 +16,11 @@ def gapi (query): return json.loads(r.text) def do (commandline): - print (" Attempting: " + commandline) + #print (" Attempting: " + commandline) completedProc = subprocess.run(commandline, capture_output=True, shell=True) - print (" STDOUT > " + ("empty" if completedProc.stdout is None else completedProc.stdout.decode('utf-8'))) - print (" STDERR > " + ("empty" if completedProc.stderr is None else completedProc.stderr.decode('utf-8'))) - print (f" Completed with code {completedProc.returncode}") + #print (" STDOUT > " + ("empty" if completedProc.stdout is None else completedProc.stdout.decode('utf-8'))) + #print (" STDERR > " + ("empty" if completedProc.stderr is None else completedProc.stderr.decode('utf-8'))) + #print (f" Completed with code {completedProc.returncode}") return (completedProc.returncode == 0, completedProc.stdout.decode('utf-8')) print ("Searching for corresponding MR...") @@ -45,6 +45,7 @@ mrs = [m for m in mrs if m['reference'] != mr['reference']] print (f"{len(mrs)} MRs found") mergeConflicts = {} + for mr in mrs: source_branch = mr['source_branch'] print (source_branch) -- GitLab From 7c821613361db62d9af6adf0671564e64ce921d4 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 7 Apr 2021 14:31:58 +0100 Subject: [PATCH 10/16] Removing conflicting change --- 33128/r16/TS33128Payloads.asn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/33128/r16/TS33128Payloads.asn b/33128/r16/TS33128Payloads.asn index e81dc3e..17c60dc 100644 --- a/33128/r16/TS33128Payloads.asn +++ b/33128/r16/TS33128Payloads.asn @@ -24,8 +24,7 @@ lINotificationPayloadOID RELATIVE-OID ::= {tS33128PayloadsOID lINotification( XIRIPayload ::= SEQUENCE { xIRIPayloadOID [1] RELATIVE-OID, - event [2] XIRIEvent, - conflictingChange [3] BOOLEAN + event [2] XIRIEvent } XIRIEvent ::= CHOICE -- GitLab From e39ec40c3b3d6c046f32a114fe8154ec29e80670 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 8 Apr 2021 09:46:31 +0100 Subject: [PATCH 11/16] Adding merge test --- .gitlab-ci.yml | 12 ++++++------ testing/merge_test.py | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2049abd..15b2c01 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,12 @@ stages: - Syntax - Lint - Compile - + +MergeTest: + stage: MergeTest + script: + - python3 testing/merge_test.py + parseASN1: stage: Syntax script: @@ -31,8 +36,3 @@ compileASN1: - python3 testing/compile_asn1.py allow_failure: true -MergeTest: - stage: MergeTest - script: - - python3 testing/merge_test.py - allow_failure: true diff --git a/testing/merge_test.py b/testing/merge_test.py index a8a38ca..0b4ca8d 100644 --- a/testing/merge_test.py +++ b/testing/merge_test.py @@ -4,8 +4,6 @@ import requests import json import subprocess -print ("Hello world v1.2") - crCommitBranch = os.environ.get("CI_COMMIT_REF_NAME", "cr/TS33128/0163") apiUrl = os.environ.get("CI_API_V4_URL", "https://forge.3gpp.org/rep/api/v4") projectId = os.environ.get("CI_PROJECT_ID", "13") -- GitLab From dc6a1bf97bee5418c945ce20dd368a5cc0d7c248 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 8 Apr 2021 11:28:54 +0100 Subject: [PATCH 12/16] Adding simple compile tests --- testing/check_asn1.py | 94 ----------------------------------------- testing/compile_asn1.py | 48 ++++++++++++++++++++- 2 files changed, 47 insertions(+), 95 deletions(-) delete mode 100644 testing/check_asn1.py diff --git a/testing/check_asn1.py b/testing/check_asn1.py deleted file mode 100644 index ab868ff..0000000 --- a/testing/check_asn1.py +++ /dev/null @@ -1,94 +0,0 @@ -import logging - -from asn1tools import parse_files, compile_dict, ParseError, CompileError -from glob import glob -from pathlib import Path - -from pprint import pprint - - -def parseASN1File (asnFile): - try: - parse_files(asnFile) - except ParseError as ex: - return [ex] - return [] - - -def parseASN1Files (fileList): - if len(fileList) == 0: - logging.warning ("No files specified") - return {} - errors = {} - logging.info("Parsing files...") - for f in fileList: - ex = parseASN1File(f) - if ex: - logging.info (f" {f}: Failed - {ex!r}") - else: - logging.info (f" {f}: OK") - errors[f] = ex - return errors - - -def compileASN1Files (fileList): - logging.info("Compiling files...") - errors = [] - try: - d = parse_files(fileList) - for modulename, module in d.items(): - # Weird fix because the compiler doesn't like RELATIVE-OID as a type - # Not sure if the on-the-wire encoding would be affected or not - # but for most checking purposes this doesn't matter - module['types']["RELATIVE-OID"] = {'type' : 'OBJECT IDENTIFIER'} - c = compile_dict(d) - except CompileError as ex: - logging.info (f"Compiler error: {ex}") - errors.append(ex) - except ParseError as ex: - logging.info (f"Parse error: {ex}") - errors.append(ex) - logging.info ("Compiled OK") - return errors - - -def validateASN1Files (fileList): - parseErrors = parseASN1Files(fileList) -# if len(parseErrors > 0): -# logging.info ("Abandonding compile due to parse errors") - compileErrors = compileASN1Files(fileList) - return parseErrors, compileErrors - - -def validateAllASN1FilesInPath (path): - globPattern = str(Path(path)) + '/*.asn1' - logging.info("Searching: " + globPattern) - schemaGlob = glob(globPattern, recursive=True) - return validateASN1Files(schemaGlob) - - -if __name__ == '__main__': - parseErrors, compileErrors = validateAllASN1FilesInPath("./") - parseErrorCount = 0 - print ("ASN.1 Parser checks:") - print ("-----------------------------") - for filename, errors in parseErrors.items(): - if len(errors) > 0: - parseErrorCount += len(errors) - print (f"{filename}: {len(errors)} errors") - for error in errors: - print (" " + str(error)) - else: - print (f"{filename}: OK") - print ("-----------------------------") - print ("ASN.1 Compilation:") - print ("-----------------------------") - if len(compileErrors) > 0: - for error in compileErrors: - print (" " + str(error)) - else: - print ("Compilation OK") - print ("-----------------------------") - print (f"{parseErrorCount} parse errors, {len(compileErrors)} compile errors") - exit (parseErrorCount + len(compileErrors)) - diff --git a/testing/compile_asn1.py b/testing/compile_asn1.py index 6bd311b..35fd595 100644 --- a/testing/compile_asn1.py +++ b/testing/compile_asn1.py @@ -1 +1,47 @@ -print ("Not implemented yet") \ No newline at end of file +import logging + +import asn1tools +from pathlib import Path + +from pprint import pprint + +ignoreReleases = {'33108' : [f'r{i}' for i in range(5, 17)], + '33128' : [] } + +def prepareFile(f): + with open(f) as fh: + s = fh.read() + s = s.replace("RELATIVE-OID", "OBJECT IDENTIFIER") # sigh + return s + +if __name__ == '__main__': + fileList = list(Path(".").rglob("*.asn1")) + list(Path(".").rglob("*.asn")) + + ignoredFiles = [file for file in fileList if file.parts[1] in ignoreReleases[file.parts[0]]] + logging.info(f"Ignoring {len(ignoredFiles)} files") + logging.debug(ignoredFiles) + + fileList = [file for file in fileList if file not in ignoredFiles] + + if len(fileList) == 0: + logging.warning ("No files specified") + exit(0) + + print ("ASN.1 Compilation checks:") + print ("-----------------------------") + logging.info("Parsing files...") + errorCount = 0 + for f in fileList: + try: + s = prepareFile(str(f)) + asn1tools.compile_string(s) # this won't work for modules with IMPORTs + except asn1tools.ParseError as ex: + logging.info (f" {f}: Failed - {ex!r}") + print (f" {f}: Failed - {ex!r}") + errorCount += 1 + continue + print (f" {f}: OK") + print ("-----------------------------") + print (f"Compile errors: {errorCount}") + print ("-----------------------------") + exit(errorCount) -- GitLab From 3d804710fbb5a08f6eec9202900d270083f901e8 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 8 Apr 2021 11:34:20 +0100 Subject: [PATCH 13/16] Adding linting transgressions for r16 --- testing/lintingexceptions.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/testing/lintingexceptions.py b/testing/lintingexceptions.py index 16bdd84..e3fdad8 100644 --- a/testing/lintingexceptions.py +++ b/testing/lintingexceptions.py @@ -1,2 +1,7 @@ -exceptedStrings = ["D.4.4: Enumerations for UDMServingSystemMethod start at 0, not 1", -"D.4.5: Field 'aNNodeID' in GlobalRANNodeID is an anonymous CHOICE"] \ No newline at end of file +exceptedStrings = ["D.4.4: Enumerations for UDMServingSystemMethod start at 0, not 1", +"D.4.5: Field 'aNNodeID' in GlobalRANNodeID is an anonymous CHOICE", +"D.4.4: Enumerations for EstablishmentStatus start at 0, not 1", +"D.4.4: Enumerations for MMSDirection start at 0, not 1", +"D.4.4: Enumerations for MMSReplyCharging start at 0, not 1", +"D.4.4: Enumerations for MMStatusExtension start at 0, not 1"] + -- GitLab From 68234aea66d27234dfe0dc3bf465068d73ec277a Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 8 Apr 2021 11:42:09 +0100 Subject: [PATCH 14/16] Trying new stage order --- .gitlab-ci.yml | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 15b2c01..6b9fc6c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,35 +4,41 @@ before_script: - python3 --version stages: - - MergeTest + - Merge - Syntax - - Lint - Compile + - Lint MergeTest: - stage: MergeTest + stage: Merge + needs: [] script: - python3 testing/merge_test.py +checkXSD: + stage: Syntax + needs: [] + script: + - python3 testing/check_xsd.py + parseASN1: stage: Syntax + needs: [] script: - python3 testing/parse_asn1.py -checkXSD: - stage: Syntax +compileASN1: + stage: Compile + needs: [ Syntax ] script: - - python3 testing/check_xsd.py + - python3 testing/compile_asn1.py + allow_failure: true lintASN1: stage: Lint + needs: [ Syntax ] script: - python3 testing/lint_asn1.py allow_failure: true -compileASN1: - stage: Compile - script: - - python3 testing/compile_asn1.py - allow_failure: true -- GitLab From 16a3752f8870c04a9396d42b4e7ee3f7c9bb3c7c Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 8 Apr 2021 11:47:30 +0100 Subject: [PATCH 15/16] Trying new stage order --- .gitlab-ci.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b9fc6c..add3fe7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,37 +6,30 @@ before_script: stages: - Merge - Syntax - - Compile - - Lint + - CompileAndLint MergeTest: stage: Merge - needs: [] script: - python3 testing/merge_test.py checkXSD: stage: Syntax - needs: [] script: - python3 testing/check_xsd.py parseASN1: stage: Syntax - needs: [] script: - python3 testing/parse_asn1.py compileASN1: - stage: Compile - needs: [ Syntax ] + stage: CompileAndLint script: - python3 testing/compile_asn1.py - allow_failure: true lintASN1: - stage: Lint - needs: [ Syntax ] + stage: CompileAndLint script: - python3 testing/lint_asn1.py allow_failure: true -- GitLab From 5d14853b3b114618d009d68b0dbedae0b74b8e0e Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 8 Apr 2021 11:54:52 +0100 Subject: [PATCH 16/16] Removving default env variable from merge test --- testing/merge_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/merge_test.py b/testing/merge_test.py index 0b4ca8d..fc3e580 100644 --- a/testing/merge_test.py +++ b/testing/merge_test.py @@ -4,7 +4,7 @@ import requests import json import subprocess -crCommitBranch = os.environ.get("CI_COMMIT_REF_NAME", "cr/TS33128/0163") +crCommitBranch = os.environ.get("CI_COMMIT_REF_NAME", "NOTFOUND") apiUrl = os.environ.get("CI_API_V4_URL", "https://forge.3gpp.org/rep/api/v4") projectId = os.environ.get("CI_PROJECT_ID", "13") -- GitLab