Jenkins/Docker: Update hadolint version.
- Ignore hadolint warnings about not pinned version.
diff --git a/Jenkinsfile b/Jenkinsfile
index d54a315..8e2ef73 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -19,6 +19,7 @@
'label': 'latest'
]
]
+HADOLINT_VERSION = '2.6.0-alpine'
dockerinfo = DOCKERINFO['production']
@@ -135,9 +136,7 @@
echo "VERSION: '${VERSION}'"
}
- dir('docker') {
- stash name: 'dockerfile', includes: '**'
- }
+ stash name: 'dockerfile', includes: 'docker/**'
}
}
@@ -206,7 +205,7 @@
runAsGroup: 1000
containers:
- name: hadolint
- image: mcu--docker.eu-west-1.artifactory.aws.arm.com/hadolint/hadolint:v1.19.0-alpine
+ image: mcu--docker.eu-west-1.artifactory.aws.arm.com/hadolint/hadolint:${HADOLINT_VERSION}
alwaysPullImage: true
imagePullPolicy: Always
command:
@@ -221,15 +220,13 @@
}
}
steps {
- dir('docker') {
- unstash 'dockerfile'
+ unstash 'dockerfile'
- sh 'hadolint --format json dockerfile | tee hadolint.log'
+ sh 'hadolint --format json docker/dockerfile* | tee hadolint.log'
- recordIssues tools: [hadoLint(id: 'hadolint', pattern: 'hadolint.log')],
- qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]],
- referenceJobName: 'nightly', ignoreQualityGate: true
- }
+ recordIssues tools: [hadoLint(id: 'hadolint', pattern: 'hadolint.log')],
+ qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]],
+ referenceJobName: 'nightly', ignoreQualityGate: true
}
}
@@ -265,9 +262,9 @@
steps {
sh('apk add bash curl git')
script {
- dir('docker') {
- unstash 'dockerfile'
+ unstash 'dockerfile'
+ dir('docker') {
dockerinfo = DOCKERINFO['staging']
withCredentials([sshUserPrivateKey(credentialsId: 'grasci_with_pk',
keyFileVariable: 'grasciPk',