forked from cms-sw/cms-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
queue-new-prs
executable file
·23 lines (18 loc) · 900 Bytes
/
queue-new-prs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh -ex
# Uses query-new-pull-requests to get the latest PRS.
# It checks if the PR is for a branch for which automatic tests are activated.
# Finally, it creates a properties file with the PR number for jenkins to trigger the next job.
for PR in `./query-new-pull-requests -t ${TIME_INTERVAL}`; do
# Use helper to get PR branch
RELEASE_QUEUE=`./get-pr-branch $PR`
if cat config.map | grep $RELEASE_QUEUE | grep -v DISABLED= | grep PR_TESTS= ; then
echo 'Creating properties file for '$PR
echo "PULL_REQUEST=$PR" >> $WORKSPACE/approve-pr-tests-$PR-properties.txt
# If this is the case, we force the creation of tests for the PR, even if
# not apporved. This is under the assumption some human being checked
# everything is ok.
if [ "X$FORCE_ALL_TESTS" = Xtrue ]; then
echo "FORCE=true" >> $WORKSPACE/approve-pr-tests-$PR-properties.txt
fi
fi
done