buildbot_config/worker/prepare_source

32 lines
1023 B
Plaintext
Raw Permalink Normal View History

[BUILDBOT] Fully adapt our BuildBot setup to the upcoming Git migration. - Get a clean version of the source from git://git.reactos.org on every commit and use "git apply" to apply JIRA patches. - Introduce the naming scheme "reactos-$TYPE-$REVISION_SUFFIX-$UPLOAD_SUFFIX" for all created ISO files. * $TYPE can be bootcd, livecd, bootcdregtest. * $REVISION_SUFFIX is the output of "git describe" (e.g. "0.4.7-dev-53-gc2b45a7"), followed by "patch$ID" if a JIRA patch is applied. * $UPLOAD_SUFFIX is the architecture, compiler, OS, build type identification of the builder. An example filename that includes everything: "reactos-bootcd-0.4.7-dev-53-gc2b45a7-patch2518-x86-msvc-win-dbg.iso" - Allow passing arbitrary parameters to CMake in the "configure" script. This is used to pass "-DENABLE_ROSTESTS=1". - Rename "patching" to "prepare_source", because it also prepares the revision suffix now. - Introduce "get_suffix" to feed the generated filename suffix back to a BuildBot property (using BuildBot's SetPropertyFromCommand). - Create one "latest" symlink per upload suffix in "uploadiso". - Use the "comment" parameter I will introduce in my next Testman commit to supply an arbitrary comment in "submit_result". Add the JIRA Attachment ID and Reason for patched builds on Timo's request. - Remove the "revert" step and slim down "clean". A tidy cleanup of the source directory is now being done by the Git build step. - Remove the "build_host_tools" script and ROS_NO_HOST_TOOLS_REV. You can't build the old revisions with the Git-adapted scripts. - Work in $ROS_OUTPUT instead of $ROS_OUTPUT/reactos. - Introduce the UPLOAD_REGTESTCD configuration variable to decide whether to upload the bootcdregtest in "regtestcd". - Allow us to either download a bootcdregtest or use the latest one from the source folder in "regtest". - Build rosapps and rostests on the GCCWin and MSVC2010 builder. These don't upload anything, so we can check if the entire tree builds correctly without wasting ISO storage space. svn path=/trunk/buildbot/; revision=2351
2017-09-16 15:21:08 +00:00
#!/bin/bash
# ReactOS BuildBot Build Scripts
# prepare_source - Generate the revision suffix and patch the source if applicable
#
# Parameter $1 (optional) - JIRA Attachment ID of the patch file
source ../../config.inc
# Patch the source if applicable
if [ "$1" != "" ]; then
echo "* Downloading patch."
wget -q --output-document=default.patch "https://jira.reactos.org/secure/attachment/$1/" || exit $?
echo "* Applying patch."
git apply default.patch || exit $?
else
echo "* Skipping patch phase."
fi
[BUILDBOT] Fully adapt our BuildBot setup to the upcoming Git migration. - Get a clean version of the source from git://git.reactos.org on every commit and use "git apply" to apply JIRA patches. - Introduce the naming scheme "reactos-$TYPE-$REVISION_SUFFIX-$UPLOAD_SUFFIX" for all created ISO files. * $TYPE can be bootcd, livecd, bootcdregtest. * $REVISION_SUFFIX is the output of "git describe" (e.g. "0.4.7-dev-53-gc2b45a7"), followed by "patch$ID" if a JIRA patch is applied. * $UPLOAD_SUFFIX is the architecture, compiler, OS, build type identification of the builder. An example filename that includes everything: "reactos-bootcd-0.4.7-dev-53-gc2b45a7-patch2518-x86-msvc-win-dbg.iso" - Allow passing arbitrary parameters to CMake in the "configure" script. This is used to pass "-DENABLE_ROSTESTS=1". - Rename "patching" to "prepare_source", because it also prepares the revision suffix now. - Introduce "get_suffix" to feed the generated filename suffix back to a BuildBot property (using BuildBot's SetPropertyFromCommand). - Create one "latest" symlink per upload suffix in "uploadiso". - Use the "comment" parameter I will introduce in my next Testman commit to supply an arbitrary comment in "submit_result". Add the JIRA Attachment ID and Reason for patched builds on Timo's request. - Remove the "revert" step and slim down "clean". A tidy cleanup of the source directory is now being done by the Git build step. - Remove the "build_host_tools" script and ROS_NO_HOST_TOOLS_REV. You can't build the old revisions with the Git-adapted scripts. - Work in $ROS_OUTPUT instead of $ROS_OUTPUT/reactos. - Introduce the UPLOAD_REGTESTCD configuration variable to decide whether to upload the bootcdregtest in "regtestcd". - Allow us to either download a bootcdregtest or use the latest one from the source folder in "regtest". - Build rosapps and rostests on the GCCWin and MSVC2010 builder. These don't upload anything, so we can check if the entire tree builds correctly without wasting ISO storage space. svn path=/trunk/buildbot/; revision=2351
2017-09-16 15:21:08 +00:00
# Generate the revision suffix and write it into a file.
REVISION_SUFFIX=`git describe --abbrev=7 --long`
[BUILDBOT] Fully adapt our BuildBot setup to the upcoming Git migration. - Get a clean version of the source from git://git.reactos.org on every commit and use "git apply" to apply JIRA patches. - Introduce the naming scheme "reactos-$TYPE-$REVISION_SUFFIX-$UPLOAD_SUFFIX" for all created ISO files. * $TYPE can be bootcd, livecd, bootcdregtest. * $REVISION_SUFFIX is the output of "git describe" (e.g. "0.4.7-dev-53-gc2b45a7"), followed by "patch$ID" if a JIRA patch is applied. * $UPLOAD_SUFFIX is the architecture, compiler, OS, build type identification of the builder. An example filename that includes everything: "reactos-bootcd-0.4.7-dev-53-gc2b45a7-patch2518-x86-msvc-win-dbg.iso" - Allow passing arbitrary parameters to CMake in the "configure" script. This is used to pass "-DENABLE_ROSTESTS=1". - Rename "patching" to "prepare_source", because it also prepares the revision suffix now. - Introduce "get_suffix" to feed the generated filename suffix back to a BuildBot property (using BuildBot's SetPropertyFromCommand). - Create one "latest" symlink per upload suffix in "uploadiso". - Use the "comment" parameter I will introduce in my next Testman commit to supply an arbitrary comment in "submit_result". Add the JIRA Attachment ID and Reason for patched builds on Timo's request. - Remove the "revert" step and slim down "clean". A tidy cleanup of the source directory is now being done by the Git build step. - Remove the "build_host_tools" script and ROS_NO_HOST_TOOLS_REV. You can't build the old revisions with the Git-adapted scripts. - Work in $ROS_OUTPUT instead of $ROS_OUTPUT/reactos. - Introduce the UPLOAD_REGTESTCD configuration variable to decide whether to upload the bootcdregtest in "regtestcd". - Allow us to either download a bootcdregtest or use the latest one from the source folder in "regtest". - Build rosapps and rostests on the GCCWin and MSVC2010 builder. These don't upload anything, so we can check if the entire tree builds correctly without wasting ISO storage space. svn path=/trunk/buildbot/; revision=2351
2017-09-16 15:21:08 +00:00
if [ "$1" != "" ]; then
REVISION_SUFFIX+="-patch$1"
fi
echo "* Revision suffix set to $REVISION_SUFFIX"
echo $REVISION_SUFFIX > revision_suffix
# Give detailed information about the latest commit included.
# This is especially useful when building rebased Pull Requests, whose commits can't be easily identified by their hashes.
echo "* Latest commit included in the build:"
git --no-pager show --quiet