Newer
Older
'${SCRIPTS_DIR}/monitor/monitorstatus.sh -j ${CI_JOB_NAME} -s fail -r config -l "Job URL: ${CI_JOB_URL}"'
echo "removing any existing hadolint config."
rm -rf .config/hadolint.yml .config/hadolint.yaml
hadolint $APPROVED_REGISTRY $DOCKERFILE_LOC --failure-threshold warning | tee ${REPORTS_DIR}/${CI_JOB_NAME}.out
if [ "$?" == "0" ]; then
${SCRIPTS_DIR}/monitorstatus.sh -j ${CI_JOB_NAME} -s pass -r pass
else
if [ -s "${REPORTS_DIR}/${CI_JOB_NAME}.out" ]; then
${SCRIPTS_DIR}/monitor/monitorstatus.sh -j ${CI_JOB_NAME} -r findings -l "${CI_JOB_NAME} process found findings, check job for details"
fi
exit 1
fi