[FEATURE] Add parameter for disabling lintian check
User Story: https://mirantis.jira.com/browse/RILBCK-436
Change-Id: I6b5da3f48bdfc898451d21f8109dd138bb1b965b
diff --git a/build-debian-packages-pipeline.groovy b/build-debian-packages-pipeline.groovy
index 9e40944..0d9839f 100644
--- a/build-debian-packages-pipeline.groovy
+++ b/build-debian-packages-pipeline.groovy
@@ -28,6 +28,13 @@
uploadPpa = null
}
+def lintianCheck
+try {
+ lintianCheck = LINTIAN_CHECK.toBoolean()
+} catch (MissingPropertyException e) {
+ lintianCheck = true
+}
+
def uploadAptly
try {
uploadAptly = UPLOAD_APTLY.toBoolean()
@@ -73,13 +80,16 @@
)
archiveArtifacts artifacts: "build-area/*.deb"
}
- stage("lintian") {
- changes = sh script: "ls build-area/*_"+ARCH+".changes", returnStdout: true
- try {
- debian.runLintian(changes.trim(), OS, OS+":"+DIST)
- } catch (Exception e) {
- println "[WARN] Lintian returned non-zero exit status"
- currentBuild.result = 'UNSTABLE'
+
+ if (lintianCheck) {
+ stage("lintian") {
+ changes = sh script: "ls build-area/*_"+ARCH+".changes", returnStdout: true
+ try {
+ debian.runLintian(changes.trim(), OS, OS+":"+DIST)
+ } catch (Exception e) {
+ println "[WARN] Lintian returned non-zero exit status"
+ currentBuild.result = 'UNSTABLE'
+ }
}
}