> On Aug. 2, 2017, 10:52 a.m., Benjamin Bannier wrote: > > support/mesos-website/build.sh > > Lines 22 (patched) > > <https://reviews.apache.org/r/60439/diff/2/?file=1784315#file1784315line22> > > > > This script will misbehave if run from a live dev checkout (it might > > e.g., reconfigure an already configued setup, remove an already generated > > site, rebuild the whole project if the developer builds in `build/`, or > > pick up changes from a dirty tree so the SHA does not correspond to the > > contents). > > > > I'd suggest to add a safeguard against that. One option would be to > > refuse to run if the tree contains any untracked files or uncommitted > > changes, e.g., with > > > > if [ "$(git status --porcelain | wc -l)" -ne 0 ]; then > > echo "This script is not intended to run on a live checkout, but > > the source tree contains untracked files or uncommitted changes." > > > > exit 1 > > fi > > > > We should add this before setting up the the exit trap. > > Vinod Kone wrote: > I put this check in "support/jenkins/websitebot.sh" to fail early.
Great! - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60439/#review181942 ----------------------------------------------------------- On Aug. 4, 2017, 8:36 a.m., Vinod Kone wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60439/ > ----------------------------------------------------------- > > (Updated Aug. 4, 2017, 8:36 a.m.) > > > Review request for mesos, Benjamin Bannier, Benjamin Mahler, and haosdent > huang. > > > Bugs: MESOS-7625 > https://issues.apache.org/jira/browse/MESOS-7625 > > > Repository: mesos > > > Description > ------- > > These scripts are expected to be run by ASF CI on any commit to > the mesos repo. The directory layout is similar to tidybot CI job. > > > Diffs > ----- > > support/jenkins/websitebot.sh PRE-CREATION > support/mesos-website.sh PRE-CREATION > support/mesos-website/Dockerfile PRE-CREATION > support/mesos-website/build.sh PRE-CREATION > support/mesos-website/entrypoint.sh PRE-CREATION > > > Diff: https://reviews.apache.org/r/60439/diff/3/ > > > Testing > ------- > > Tested by running a CI job pointing to a branch containing this patch. > > > Thanks, > > Vinod Kone > >
