This guide helps you run glabs in a few minutes.
Essential defaults for your first assignment:
- Config location:
~/.glabs.yaml - Assignment mode:
per: student(orper: group) - Assignment access:
accesslevel: developer - Starter repo: Set
startercode.urlin config - First command:
glabs check <course>thenglabs generate <course> <assignment>
- GitLab personal access token with API scope
- Go installed if you build from source
- SSH access to starter repositories (if using startercode)
From source:
go install github.com/obcode/glabs@latestFrom local checkout:
go install .Create ~/.glabs.yaml:
gitlab:
host: https://gitlab.example.org
token: <personal-access-token>
coursesfilepath: /absolute/path/to/course-configs
courses:
- mpdNotes:
- The default config name is .glabs with any format supported by Viper.
- Environment placeholders are not expanded automatically.
- Prefer absolute paths.
Create one course file in coursesfilepath, for example mpd.yaml:
mpd:
coursepath: mpd/semester
semesterpath: ob-26ss
blatt01:
assignmentpath: blatt-01
per: student
startercode:
url: git@gitlab.example.org:mpd/startercode/blatt-01.git
fromBranch: startercode
template: trueIf you set template: true all commits in startercode will be squashed to just
one commit using the templateMessage.
| Area | Key | Default |
|---|---|---|
| Global | config filename | .glabs (for example ~/.glabs.yaml) |
| Assignment | useCoursenameAsPrefix |
false |
| Assignment | per |
student |
| Assignment | description |
generated by glabs |
| Assignment | accesslevel |
developer |
| Assignment | containerRegistry |
false |
| Assignment | mergeRequest.pipeline |
false |
| Assignment | mergeRequest.skippedPipelinesAreSuccessful |
false |
| Assignment | mergeRequest.allThreadsMustBeResolved |
false |
| Assignment | mergeRequest.statusChecksMustSucceed |
false |
| Startercode | fromBranch |
main |
| Startercode | template |
false |
| Startercode | templateMessage |
Initial |
| Startercode | toBranch |
main |
| Startercode | additionalBranches |
[] |
| Branches | first branches[].default |
true on first branch |
| Branches | branches[].protect |
false |
| Branches | branches[].mergeOnly |
false |
| Issues | issues.replicateFromStartercode |
false |
| Issues | issues.issueNumbers |
[1] when replication is enabled |
| Seeder | toBranch |
main |
| Seeder | protectToBranch |
false |
| Clone | localpath |
. |
| Clone | branch |
main |
| Clone | force |
false |
| Release | mergeRequest.source |
develop |
| Release | mergeRequest.target |
main |
| Release | mergeRequest.pipeline |
false |
Note:
containerRegistryis enabled automatically whenrelease.dockerImagesis set.
glabs check mpd
glabs generate mpd blatt01
glabs urls mpd blatt01- Read full config keys in configuration.md
- If you use legacy startercode branch/issue keys, migrate with migration.md
- Follow common workflows in workflows.md
- See all commands in commands.md
- If something fails, check troubleshooting.md