Skip to content

Latest commit

 

History

History
127 lines (97 loc) · 3.44 KB

File metadata and controls

127 lines (97 loc) · 3.44 KB

Getting Started

This guide helps you run glabs in a few minutes.

Cheat sheet

Essential defaults for your first assignment:

  • Config location: ~/.glabs.yaml
  • Assignment mode: per: student (or per: group)
  • Assignment access: accesslevel: developer
  • Starter repo: Set startercode.url in config
  • First command: glabs check <course> then glabs generate <course> <assignment>

Prerequisites

  • GitLab personal access token with API scope
  • Go installed if you build from source
  • SSH access to starter repositories (if using startercode)

Install

From source:

go install github.com/obcode/glabs@latest

From local checkout:

go install .

Main configuration

Create ~/.glabs.yaml:

gitlab:
  host: https://gitlab.example.org
  token: <personal-access-token>

coursesfilepath: /absolute/path/to/course-configs
courses:
  - mpd

Notes:

  • The default config name is .glabs with any format supported by Viper.
  • Environment placeholders are not expanded automatically.
  • Prefer absolute paths.

Course configuration

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: true

If you set template: true all commits in startercode will be squashed to just one commit using the templateMessage.

Important defaults at a glance

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:

  • containerRegistry is enabled automatically when release.dockerImages is set.

First commands

glabs check mpd
glabs generate mpd blatt01
glabs urls mpd blatt01

Next steps