branch | status |
---|---|
master | |
dev |
This script provides commands to manage coding assignments: distribute among students, evaluate individually, collect all results, and measure similarities.
- Bash, version 3.2 and later
- Git, version 1.8.0 and later
- GNU getopt
- On macOS install with Homebrew (
gnu-getopt
) or with MacPorts (getopt
)
- On macOS install with Homebrew (
- GNU sed
- On macOS install with Homebrew
gnu-sed
- On macOS install with Homebrew
- jq
- On macOS install with Homebrew
jq
- On macOS install with Homebrew
- go-md2man, optional
- On macOS install with Homebrew
go-md2man
- On macOS install with Homebrew
-
To install locally, simply clone this project and set an alias.
git clone https://github.com/internetguru/academy.git echo alias academy=\"$PWD/academy/academy\" >> ~/.bashrc source ~/.bashrc
-
For global installation, clone this project into shared folder and create a symbolic link.
sudo git clone https://github.com/internetguru/academy.git /usr/local/src sudo ln -s "/usr/local/src/academy/academy" /usr/local/share/academy
-
To install
man
documentation, run the following script. (optional)sudo ./install-man.sh
-
Make sure you have a personal access token available for the script, see
ACADEMY_GITLAB_ACCESS_TOKEN
in CI variables section below. -
To integrate this script into your repository, add the following include statement to the
.gitlab-ci.yml
file directly or using a GitLab variable (recommended).- Create a variable within a selected scope and call it e.g.
ACADEMY_INCLUDE
. The recommended scope is the topmost GitLab namespace, as it can be overridden in specific scopes. - Value: 'https://raw.githubusercontent.com/internetguru/academy/${REVISION}/gitlab-stages.yml'
- Replace
${REVISION}
with a version tag or a branch, e.g.staging
orprod-0
. - Insert the include statement in the
.gitlab-ci.yml
:
include: - $ACADEMY_INCLUDE
- Create a variable within a selected scope and call it e.g.
-
To include evaluation, specify
ACADEMY_LANG
andACADEMY_EVALUATE
variables. See below. -
To display generated badges in
README.md
, see badges markdown in the meta job log.
GitLab CI variables can be defined within the project's .gitlab-ci.yml
file, in an arbitrary scope, or when running a specific job manually.
ACADEMY_DEFAULT_DOCKER_IMAGE
Docker image for academy jobs, e.g. the distribute job. Default value is internetguru/academy:latest
.
ACADEMY_DOCKER_IMAGE
Docker image for the evaluate and execute jobs. Default value is ACADEMY_DEFAULT_DOCKER_IMAGE
.
ACADEMY_CACHE
Caching directory used to share data between individual jobs and pipelines within a project. Default value is ../.academy-cache
.
ACADEMY_EDITABLE
List of files intended to be edited by users in distributed repositories. Files are separated by spaces and support globbing, e.g. image.png video.mp4 src/*.java
. Default value is **/*
.
ACADEMY_GITLAB_ACCESS_TOKEN
GitLab personal access token required for the API communication with api
scope. This variable should be secret, see masked environmental CI variable.
Note: If you share the repository, consider creating extra user for this purpose limited to a specific scope. Do not use Group Access Token, unless it can create access tokens.
ACADEMY_ASSIGN
List of users for the academy distribute
command. If this variable is empty, ACADEMY_ASSIGN
file is used instead (which does not get distributed). Users can be separated by white-spaces or commas.
ACADEMY_DEADLINE
(not implemented)
Create a summary towards a specific date and time.
ACADEMY_GROUP
List of space-separated branches for the academy distribute
command to collect solutions instead of distributing to students. In the collect mode, no permissions are assigned and the ACADEMY_ASSIGN
list is taken from specified groups.
ACADEMY_EXECUTE
Run the execute job automatically if the value is "always".
ACADEMY_FORCE_JOB
If this variable is “true”, run the evaluate job automatically regardless of other conditions.
ACADEMY_FORCE_MERGE
If this variable is “true”, merge source branch to main branch directly instead of creating a pull request.
ACADEMY_EVALUATE
Run the evaluate job automatically if the value is "always".
ACADEMY_DASHBOARD
Dashboard URL, e.g. https://academy.internetguru.io, used by the meta job to clear cache. Multiple URLs are supported separated by newlines.
ACADEMY_ISSUES
See the --process-issues
option in the academy distribute
documentation. Default value is the current branch.
ACADEMY_LANG
Determines which files are executed by the evaluate
and execute
jobs. There are several files being executed per each job in the following format: {evaluate,execute}_$ACADEMY_LANG
. Each of them can be overridden by a file of the same name in the .academy
folder.
The following documentation files are available after installation using man
command.
Copyright © Internet Guru
This software is licensed under the CC BY-NC-SA license. There is NO WARRANTY, to the extent permitted by law. See the LICENSE file.
For commercial use, a nominal fee may be applicable based on the company size and the nature of their product. In many instances, this could result in no fees being charged at all. Please contact us at info@internetguru.io for further information.
Please do not hesitate to reach out to us for inquiries related to seminars, workshops, training, integration, support, custom development, and additional services. We are more than happy to assist you.