mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Merge branch 'from/upstream-develop/tusooa/require-changelog' into 'develop'
require changelog See merge request pleroma/pleroma!3739
This commit is contained in:
commit
b7a831ca55
3 changed files with 41 additions and 0 deletions
|
@ -8,6 +8,13 @@ variables: &global_variables
|
|||
DB_PORT: 5432
|
||||
MIX_ENV: test
|
||||
|
||||
workflow:
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
|
||||
when: never
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
|
||||
cache: &global_cache_policy
|
||||
key:
|
||||
files:
|
||||
|
@ -17,6 +24,7 @@ cache: &global_cache_policy
|
|||
- _build
|
||||
|
||||
stages:
|
||||
- check-changelog
|
||||
- build
|
||||
- test
|
||||
- benchmark
|
||||
|
@ -32,6 +40,17 @@ before_script:
|
|||
after_script:
|
||||
- rm -rf _build/*/lib/pleroma
|
||||
|
||||
check-changelog:
|
||||
stage: check-changelog
|
||||
image: alpine
|
||||
rules:
|
||||
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop"
|
||||
before_script: ''
|
||||
after_script: ''
|
||||
cache: {}
|
||||
script:
|
||||
- sh ./tools/check-changelog
|
||||
|
||||
build:
|
||||
stage: build
|
||||
only:
|
||||
|
|
0
changelog.d/3739.skip
Normal file
0
changelog.d/3739.skip
Normal file
22
tools/check-changelog
Normal file
22
tools/check-changelog
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "looking for change log of $CI_MERGE_REQUEST_IID"
|
||||
|
||||
count=0
|
||||
for i in add remove fix security skip; do
|
||||
[ -f changelog.d/"$CI_MERGE_REQUEST_IID"."$i" ]
|
||||
retcode=$?
|
||||
if [ $retcode -eq 0 ]; then
|
||||
echo "found $CI_MERGE_REQUEST_IID.$i"
|
||||
count=$(( count + 1 ))
|
||||
else
|
||||
echo "no $CI_MERGE_REQUEST_IID.$i"
|
||||
fi
|
||||
done
|
||||
if [ $count -gt 0 ]; then
|
||||
echo "ok"
|
||||
exit 0
|
||||
else
|
||||
echo "must have a changelog entry or explicitly skip it"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue