ci: pass pull request number to CI script

For further processing, pass pull request number to the CI script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2018-12-03 09:47:52 -05:00
commit 45cbc81160
2 changed files with 6 additions and 6 deletions

View file

@ -30,7 +30,7 @@ build:
- export CCACHE_DIR=${SHIPPABLE_BUILD_DIR}/ccache/.ccache
- >
if [ "$IS_PULL_REQUEST" = "true" ]; then
./scripts/ci/run_ci.sh -c -b ${PULL_REQUEST_BASE_BRANCH} -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS} -p;
./scripts/ci/run_ci.sh -c -b ${PULL_REQUEST_BASE_BRANCH} -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS} -p ${PULL_REQUEST};
else
./scripts/ci/run_ci.sh -c -b ${PULL_REQUEST_BASE_BRANCH} -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS};
fi;
@ -38,14 +38,14 @@ build:
on_failure:
- >
if [ "$IS_PULL_REQUEST" = "true" ]; then
./scripts/ci/run_ci.sh -f -b ${PULL_REQUEST_BASE_BRANCH} -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS} -p;
./scripts/ci/run_ci.sh -f -b ${PULL_REQUEST_BASE_BRANCH} -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS} -p ${PULL_REQUEST};
else
./scripts/ci/run_ci.sh -f -b ${PULL_REQUEST_BASE_BRANCH} -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS};
fi;
on_success:
- >
if [ "$IS_PULL_REQUEST" = "true" ]; then
./scripts/ci/run_ci.sh -s -b ${PULL_REQUEST_BASE_BRANCH} -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS} -p;
./scripts/ci/run_ci.sh -s -b ${PULL_REQUEST_BASE_BRANCH} -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS} -p ${PULL_REQUEST};
else
./scripts/ci/run_ci.sh -s -b ${PULL_REQUEST_BASE_BRANCH} -r origin -m ${MATRIX_BUILD} -M ${MATRIX_BUILDS};
fi;

View file

@ -32,7 +32,7 @@ BSIM_BT_TEST_RESULTS_FILE="./bsim_bt_out/bsim_results.xml"
MATRIX_BUILDS=1
MATRIX=1
while getopts ":pm:b:r:M:cfsB:" opt; do
while getopts ":p:m:b:r:M:cfsB:" opt; do
case $opt in
c)
echo "Execute CI" >&2
@ -47,8 +47,8 @@ while getopts ":pm:b:r:M:cfsB:" opt; do
FAILURE=1
;;
p)
echo "Testing a Pull Request." >&2
PULL_REQUEST=1
echo "Testing a Pull Request: $OPTARG." >&2
PULL_REQUEST=$OPTARG
;;
m)
echo "Running on Matrix $OPTARG" >&2