These scripts are called from jenkins for ratis pre-commit and nightly build jobs.
On jenkins, the repository is checked out to a subdirectory (sourcedir) and the script is called from the parent directory which is also used to store temporary files (yetus/out/...).
IT'S NOT RECOMMENDED to run it locally unless you know what could be expected. The script runs in sentinel/robot mode, so:
To test the jenkins build locally:
git clone git://github.com/apache/ratis.git sourcedir
For nightly-build.sh you can set the BRANCH environment variable to define which branch should be tested.
For precommit-build.sh you should set ISSUE_NUM (eg. 122, RATIS prefix should not be added).
The variables are set by the jenkins.