-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI validation for the release drafter configuration
- Loading branch information
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.iml | ||
.idea/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node('node') { | ||
stage('Release drafter configuration validation') { | ||
sh './scripts/validateReleaseDrafterConfiguration.sh' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
HERE="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
RELEASE_DRAFTER_CONFIG="$HERE/../.github/release-drafter.yml" | ||
|
||
AJV_VERSION='3.2.0' | ||
|
||
pushd $TMPDIR || exit | ||
echo "Installing AJV" | ||
npm install -s -g "ajv-cli@${AJV_VERSION}" | ||
|
||
# TODO the schema should come from json schema once https://github.com/release-drafter/release-drafter/pull/600 is fixed | ||
echo "Downloading the release drafter validation schema" | ||
curl -Lso schema.json 'https://raw.githubusercontent.com/release-drafter/release-drafter/cec90728b088fe0fbc42bc15dd3d21bc59db34c6/schema.json' | ||
|
||
echo "Validating release drafter configuration" | ||
ajv validate -s schema.json -d "${RELEASE_DRAFTER_CONFIG}" | ||
|
||
popd || exit |