-
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.
Merge pull request #39 from PierreBtz/pbeitz/dev
Add CI validation for the release drafter configuration
- Loading branch information
Showing
3 changed files
with
27 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,20 @@ | ||
#!/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}" | ||
|
||
echo "Downloading the release drafter validation schema" | ||
curl -Lso schema.json 'https://raw.githubusercontent.com/release-drafter/release-drafter/master/schema.json' | ||
|
||
echo "Validating release drafter configuration" | ||
ajv validate -s schema.json -d "${RELEASE_DRAFTER_CONFIG}" | ||
|
||
popd || exit |