diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-03-05 17:14:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 17:14:01 +0100 |
commit | a4b34abe45ec407524f2c12beec9af6eaa103afe (patch) | |
tree | 4aa3c9ad2a69ecd30d64d0c771a86fa571c51ed6 | |
parent | a48043f8c931754c1758dac06b8bbc935e29e2e2 (diff) | |
parent | 75337ff621e2ca70ba61b1935ff35957de843ca8 (diff) | |
download | nextcloud-server-a4b34abe45ec407524f2c12beec9af6eaa103afe.tar.gz nextcloud-server-a4b34abe45ec407524f2c12beec9af6eaa103afe.zip |
Merge pull request #14373 from nextcloud/ci/noid/add-bundle-test
Add test for updated CA bundle
-rwxr-xr-x | autotest-checkers.sh | 2 | ||||
-rwxr-xr-x | build/ca-bundle-checker.sh | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/autotest-checkers.sh b/autotest-checkers.sh index 0bdd69510c6..f1b231d6200 100755 --- a/autotest-checkers.sh +++ b/autotest-checkers.sh @@ -8,6 +8,8 @@ php ./build/translation-checker.php RESULT=$(($RESULT+$?)) php ./build/htaccess-checker.php RESULT=$(($RESULT+$?)) +bash ./build/ca-bundle-checker.sh +RESULT=$(($RESULT+$?)) for app in $(find "apps/" -mindepth 1 -maxdepth 1 -type d -exec basename {} \;); do diff --git a/build/ca-bundle-checker.sh b/build/ca-bundle-checker.sh new file mode 100755 index 00000000000..8c8528c2343 --- /dev/null +++ b/build/ca-bundle-checker.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +echo +if [[ -n ${DRONE_COMMIT_REFSPEC} && ! ${DRONE_COMMIT_REFSPEC} =~ version\/noid\/.+ ]]; then + echo "Skip CA bundle check" + exit 0 +fi + +echo "Fetching latest ca-bundle.crt ..." +curl -o resources/config/ca-bundle.crt https://curl.haxx.se/ca/cacert.pem + +echo +outdated=$(git diff --name-only | grep "resources/config/ca-bundle.crt") +if [ "${outdated}" = "resources/config/ca-bundle.crt" ]; then + echo "CA bundle is not up to date." + echo "Please run: bash build/ca-bundle-checker.sh" + echo "And commit the result" + exit 1 +fi + +echo "CA bundle is up to date." +exit 0 |