aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/dev.sh (unfollow)
Commit message (Collapse)AuthorLines
2020-03-23Fix #66: venv being created in containerGravatar MarkKoz-2/+2
`pipenv run` creates a venv because it cannot detect that a --system install was done. The solution is to invoke gunicorn directly.
2020-03-23Use a config file for gunicornGravatar MarkKoz-9/+6
This will make it easy to maintain a consistent config without relying on invocation via pipenv.
2020-03-23Move snekbox.cfg to a config directoryGravatar MarkKoz-6/+9
There will be more config files to come so it's cleaner to have them together than littering the root directory with more files.
2020-03-23Fix a grammatical error in README.mdGravatar MarkKoz-1/+1
2020-03-23Replace NsJail config details with a reference to snekbox.cfgGravatar MarkKoz-29/+3
As convenient as it may be, it is redundant to list out the config in the docs. It also may fall out of sync with the actual config should someone forget to update the docs.
2020-03-23Use reference links in README.mdGravatar MarkKoz-7/+18
Makes the Markdown less cluttered when editing it.
2020-03-23Document a simple way to run the container from Docker HubGravatar MarkKoz-0/+12
The current run instructions are geared towards developers. A simpler way to run snekbox is to start a container with `docker run` via the image published on Docker Hub. Resolves #57
2020-03-20Update contributor docGravatar S. Co1-23/+36
2020-03-09Relock pipfile.lock with new dependancy.Gravatar scragly-24/+62
2020-03-08Update PipfileGravatar Joseph-1/+1
Co-Authored-By: Mark <[email protected]>
2020-03-08Add sentryGravatar Joseph Banks-0/+9
2020-02-29Change CI and dev.sh to not use host network mode.Gravatar scragly-2/+0
2020-02-29Change snekbox timeout to 6 seconds.Gravatar scragly-1/+1
This is to attempt to avoid matching the bot's typing event being resent at the 5 second mark, which seems to be causing it to hang around after the timeout message.
2020-02-23CI: fix can_pull causing script to exit with code 1Gravatar MarkKoz-2/+2
Error handling is performed inside can_pull so the callers of the function don't always check its exit code. Because set -e present, if can_pull returns 1, bash would consider that function a failed call and thus exit the entire script with code 1. That, in turn, would cause the CI job to fail.
2020-02-22CI: output flake8 to stdout (resolve #37)Gravatar MarkKoz-1/+1
The Azure website has proven to not be reliable for displaying the JUnit output. Furthermore, some may simply prefer the format of the output in the terminal over the JUnit representation on the Azure site. Nevertheless, the JUnit output isn't that bad (when there's actually a lint error) so it will remain for now. It also provides historical statistics on occurrences of errors, which is kind of cool, I guess...
2020-02-22CI: don't run commands through pipenvGravatar MarkKoz-3/+3
Since #62, the dependencies have been installed to the system interpreter. Therefore, it's not necessary to run through pipenv to ensure the commands run through an activated virtual environment. This should also fix pipenv run creating a virtual environment. It seems it cannot tell when it should be using the system interpreter. It probably wasn't designed for that anyway i.e. the intent was to run commands directly in such case, which is what this PR will do.
2020-02-22CI: log when the build cache is usedGravatar MarkKoz-0/+1
2020-02-22CI: fix unbound variable error when checking cacheGravatar MarkKoz-1/+1
The array shouldn't be expanded when testing with -v.
2020-02-22CI: cache the response from Azure APIGravatar MarkKoz-0/+11
The script may need to use the master commit several times. The easiest way to implement the cache was to just cache the response rather than the commit hash.
2020-02-21CI: fix job nameGravatar MarkKoz-1/+1
Hyphens are disallowed so they are replaced with underscores.
2020-02-21CI: merge build job with test jobGravatar MarkKoz-108/+42
* Remove duplicate build steps * Move push steps to a separate YAML file
2020-02-21CI: don't build venv image if it can be pulledGravatar MarkKoz-2/+10
2020-02-21CI: check if venv image can be pulledGravatar MarkKoz-0/+6
2020-02-21CI: create a function to check if an image can be pulledGravatar MarkKoz-13/+26
2020-02-21CI: fix base image build conditionGravatar MarkKoz-1/+11
Build if the base changed or the venv changed and the base cannot be pulled.
2020-02-21CI: define default values for variablesGravatar MarkKoz-2/+7
2020-02-21CI: don't use output variablesGravatar MarkKoz-6/+5
It was initially used to enable access to variables across jobs, but the jobs will eventually be consolidated into one so output variables will no longer be needed.
2020-02-21CI: compare variables against stringsGravatar MarkKoz-17/+17
Avoids type casting ambiguity and weirdness.
2020-02-21CI: install dev dependencies inside running containerGravatar MarkKoz-9/+15
This change allows for the venv image to be pushed since it won't be built with dev dependencies.
2020-02-21CI: diff base against master only if venv changedGravatar MarkKoz-16/+14
2020-02-21CI: move lint & tests job into templatesGravatar MarkKoz-93/+97
Splitting steps into several files makes the YAML more maintainable.
2020-02-21CI: update agent to Ubuntu 18.04Gravatar MarkKoz-3/+2
* Use inherit_errexit in check_dockerfiles.sh
2020-02-21CI: add more logging in check_dockerfiles.shGravatar MarkKoz-0/+9
2020-02-21CI: always check if the base image can be pulled from Docker HubGravatar MarkKoz-2/+6
2020-02-21CI: install Pipfile into system interpreterGravatar MarkKoz-141/+186
A virtual environment is redundant in the context of deployment. It just increases the size and build time of the image. * Replace venv with system interpreter * Mount Python binaries in /usr/local/bin in NsJail * Fix #61: Python symlink in venv not resolving * Re-lock Pipfile because it wasn't up to date according to pipenv install --deploy
2020-02-22Use port mapping, change container name to snekboxGravatar scragly-3/+4
2020-02-05Update time limit in docstringGravatar Mark-1/+1
Co-Authored-By: Sebastiaan Zeeff <[email protected]>
2020-02-02Update CODEOWNERSGravatar Joseph-1/+1