diff options
author | Charadon <dev@iotib.net> | 2022-08-06 12:38:20 -0400 |
---|---|---|
committer | Charadon <dev@iotib.net> | 2022-08-06 12:38:20 -0400 |
commit | 8297af548994e43681b85e00b1bdb061959d9dd9 (patch) | |
tree | fc93d9196d19ad0702d5ab37267076917fedd423 | |
parent | 9df670eeb430f92da25d6dd0f0c8874703e1feb0 (diff) | |
download | dscip-8297af548994e43681b85e00b1bdb061959d9dd9.tar.gz |
Added some documentation
-rw-r--r-- | docs/publishing.txt | 13 | ||||
-rw-r--r-- | docs/using.txt | 17 | ||||
-rw-r--r-- | docs/variables.txt | 6 | ||||
-rwxr-xr-x | dscip | 4 |
4 files changed, 39 insertions, 1 deletions
diff --git a/docs/publishing.txt b/docs/publishing.txt new file mode 100644 index 0000000..c3cf15c --- /dev/null +++ b/docs/publishing.txt @@ -0,0 +1,13 @@ +Publishing build artifacts and logs. +================================================================================ +There are many ways you can publish artifacts, both privately and publically. + +Methods include: +Sending logs/artifacts through e-mail. +Uploading logs/artifacts to an FTP server. +Uploading logs/artifacts to an rsync server. +Uploading it through good ol HTTP. + +Basically, if there's a commandline utility for it, you can use it in the +post/failed.sh scripts. Refer to variables.txt for how to use variables for +organizing artifacts. diff --git a/docs/using.txt b/docs/using.txt new file mode 100644 index 0000000..216e497 --- /dev/null +++ b/docs/using.txt @@ -0,0 +1,17 @@ +Using DSCIP +================================================================================ +Using DSCIP is extremely simple, there's two ways you can run it. +A. Running it as a cronjob that runs periodically. +B. Running it as a daemon that runs continually. + +Funcionally, these two methods work about the same, but depending on your +platform, one may be easier to set up than the other. I personally recommend +setting it up as a cronjob over a daemon. You can do this on most unix systems +by running `crontab -e -u build_user` and adding: +* * * * * /home/build_user/program/dscip + +As for how to make it run as a daemon, that depends on the platform you are +running it on, so refer to your OS's documentation for that. + +Quirks: +When running it on windows, you should use MSYS2. diff --git a/docs/variables.txt b/docs/variables.txt new file mode 100644 index 0000000..38e8f4e --- /dev/null +++ b/docs/variables.txt @@ -0,0 +1,6 @@ +Using Variables in the Build Scripts +================================================================================ +Every environment variable found in config.sh and the main dscip script can be +used in your build scripts. For example, you can use $CURRENT_COMMIT to create +a folder on your FTP server to put outputs into. Refer to the post.sh defaults +to see an example. diff --git a/dscip b/dscip index 4958fb1..53b3c20 100755 --- a/dscip +++ b/dscip @@ -35,7 +35,8 @@ set -u # Check if script is currently running, and if not, reset LOCK # if [ -f "$WORKING_DIRECTORY/LOCK" ]; then LOCKED_PID=$(cat "$WORKING_DIRECTORY/LOCK") - if ps -aux | grep [^]]"$LOCKED_PID" > /dev/null; then + # shellcheck disable=SC2009 + if ps -aux | grep "[^]]$LOCKED_PID" > /dev/null; then echo "Script still running. Exiting..." exit 0 else @@ -85,6 +86,7 @@ build () { echo "Invalid GITMODE, choose either 'clone' or 'pull'" 2>> "$DSCIP_OUTPUT_TO" exit 1 fi + # Begin running the build scripts. { cd "$WORKING_DIRECTORY/wrkdir"; echo "Running pre-build commands..."; |