Skip to content

Commit b7cf58b

Browse files
committed
Trigger PLC container scanning pipeline
Signed-off-by: Yuanjing Xue <197832395+yuanjingx87@users.noreply.github.com>
1 parent 77d8588 commit b7cf58b

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

jenkins/L0_MergeRequest.groovy

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,7 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)
16911691
'action': "push",
16921692
'triggerType': env.JOB_NAME ==~ /.*PostMerge.*/ ? "post-merge" : "pre-merge",
16931693
'runSanityCheck': env.JOB_NAME ==~ /.*PostMerge.*/ ? true : false,
1694+
'nspect_id': "",
16941695
'defaultTag': defaultTag,
16951696
]
16961697

@@ -1768,6 +1769,34 @@ def launchStages(pipeline, reuseBuild, testFilter, enableFailFast, globalVars)
17681769
}
17691770
}
17701771
}
1772+
stage("[NGC-Container-Compliance-Check] Run") {
1773+
echo "Triggering OSS Compliance (PLC) container scan for ref: "
1774+
try {
1775+
def params = [
1776+
string(name: 'postMergePipelineName', value: env.JOB_NAME),
1777+
string(name: 'postMergeBuildNumber', value: env.BUILD_NUMBER),
1778+
string(name: 'scanMode', value: 'pre_merge'),
1779+
string(name: 'runSourceCodeScanning', value: 'false'),
1780+
string(name: 'runContainerScanning', value: 'true'),
1781+
string(name: 'runSonarQube', value: 'false'),
1782+
]
1783+
def logger = new Logger(pipeline)
1784+
def handle = build(
1785+
job: "/LLM/helpers/PLCScanningSetup",
1786+
parameters: params,
1787+
propagate: false
1788+
)
1789+
if (handle.result != "SUCCESS") {
1790+
error "Downstream job did not succeed"
1791+
}
1792+
} catch (InterruptedException e) {
1793+
throw e
1794+
} catch (Exception e) {
1795+
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
1796+
error "OSS Compliance Check failed: ${e.getMessage()}"
1797+
}
1798+
}
1799+
}
17711800
}
17721801
}
17731802
]

0 commit comments

Comments
 (0)