[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] automation: add a script to build newly pushed commits in Gitlab CI
commit 1ba432fb73f1437f27aae53486091a2b9d73df9a Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Thu Feb 28 12:50:02 2019 +0000 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Fri Apr 5 11:15:36 2019 +0100 automation: add a script to build newly pushed commits in Gitlab CI Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Doug Goldstein <cardoe@xxxxxxxxxx> --- automation/gitlab-ci/build-each-commit.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/automation/gitlab-ci/build-each-commit.sh b/automation/gitlab-ci/build-each-commit.sh new file mode 100755 index 0000000000..6b7998448a --- /dev/null +++ b/automation/gitlab-ci/build-each-commit.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# For a newly pushed branch the BEFORE_SHA will be all 0s +if [[ ${CI_COMMIT_BEFORE_SHA} == 0000000000000000000000000000000000000000 ]]; then + echo "Newly pushed branch, skipped" + exit 0 +fi + +git merge-base --is-ancestor ${CI_COMMIT_BEFORE_SHA} ${CI_COMMIT_SHA} +if [[ $? -ne 0 ]]; then + echo "${CI_COMMIT_SHA} is not a descendent of ${CI_COMMIT_BEFORE_SHA}, skipped" + exit 0 +fi + +NON_SYMBOLIC_REF=1 ./automation/scripts/build-test.sh ${CI_COMMIT_BEFORE_SHA} ${CI_COMMIT_SHA} \ + bash -c "make -j4 distclean && ./automation/scripts/build" -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |