Add shellcheck step to lint CI pipeline
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/docker Pipeline was successful Details

This commit is contained in:
Maurizio Porrato 2022-08-21 08:59:48 +01:00
parent 6b35b8fda5
commit dc88b940fe
2 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,10 @@
---
pipeline:
shellcheck:
image: pipelinecomponents/shellcheck
commands:
- find . -name .git -type d -prune -o -type f -name \*.sh -print0 | xargs -0 -r -t -n1 shellcheck
hadolint:
image: pipelinecomponents/hadolint
commands:
- hadolint Dockerfile
- find . -name .git -type d -prune -o -type f \( -name Dockerfile\* -or -name Containerfile\* \) -print0 | xargs -0 -r -t -n1 hadolint

4
run.sh
View File

@ -5,10 +5,12 @@ CA_CERT_FILE="${CERTS_DIR}/ca/cert.pem"
CA_KEY_FILE="${CERTS_DIR}/ca/key.pem"
mkdir -p "${CERTS_DIR}/ca"
[ -e "${CA_CERT_FILE}" -a -e "${CA_KEY_FILE}" ] || \
if [ ! -e "${CA_CERT_FILE}" ] || [ ! -e "${CA_KEY_FILE}" ] ; then
rm -f "${CA_CERT_FILE}" "${CA_KEY_FILE}"
openssl req -new -newkey rsa:2048 -sha256 -days 1500 -nodes -x509 \
-extensions v3_ca -subj "/C=/ST=/L=/O=/OU=/CN=proxy" \
-keyout "${CA_KEY_FILE}" -out "${CA_CERT_FILE}"
fi
mkdir -p /static
cp -f "${CA_CERT_FILE}" /static/ca.crt