2 Commits

Author SHA1 Message Date
4ddb6cfd30 custom ca, 3
Some checks are pending
ci/woodpecker/tag/woodpecker Pipeline is pending
2025-06-04 15:33:14 +02:00
0eb761db27 custom ca, 2
Some checks are pending
ci/woodpecker/tag/woodpecker Pipeline is pending
2025-06-04 15:31:14 +02:00
2 changed files with 7 additions and 3 deletions

View File

@ -7,7 +7,8 @@ variables:
IMAGE_NAME: $REGISTRY/$CI_PROJECT_NAME
DTRACK_API_URL: https://dtrack-api-rd.krohne.com
DEFECTDOJO_API_URL: https://defectdojo-rd.krohne.com
KROHNE_CA_URL: https://devwiki.krohnegroup.com/lib/exe/fetch.php?media=krohne-ca.crt
KROHNE_CA_CHECKSUM: a921e440a742f1e67c7714306e2c0d76
.generate-api:
stage: generate-api-clients
@ -20,8 +21,8 @@ variables:
- if: '$CI_COMMIT_BRANCH == "main"'
- if: '$CI_COMMIT_TAG'
before_script:
- curl --insecure https://devwiki.krohnegroup.com/lib/exe/fetch.php?media=krohne-ca.crt -o krohne-ca.crt
- echo "a921e440a742f1e67c7714306e2c0d76 krohne-ca.crt" | md5sum -c
- curl --insecure $KROHNE_CA_URL -o krohne-ca.crt
- echo "$KROHNE_CA_CHECKSUM krohne-ca.crt" | md5sum -c
- mv krohne-ca.crt /usr/local/share/ca-certificates
- update-ca-certificates
@ -84,6 +85,8 @@ dockerize:
- docker build --tag $IMAGE_NAME:latest
--tag $IMAGE_NAME:$CI_COMMIT_SHA
--tag $IMAGE_NAME:$CI_COMMIT_TAG
--build-arg "CUSTOM_CA_URL=$KROHNE_CA_URL"
--build-arg "CUSTOM_CA_CHECKSUM=$KROHNE_CA_CHECKSUM"
.
- docker login -u $NEXUS_USER -p $NEXUS_PASSWORD $REGISTRY
- docker push $IMAGE_NAME:latest

View File

@ -19,6 +19,7 @@ RUN \
wget --no-check-certificate -O custom-ca.crt $ADDITIONAL_CA_URL; \
echo "a921e440a742f1e67c7714306e2c0d76 custom-ca.crt" | md5sum -c; \
/usr/sbin/update-ca-certificates; \
echo "custom ca added"; \
else \
echo "no additional ca"; \
fi