Exercise creation

Exercise creation documentation.

The exercise is an instance of a published assignment to be performed by students (or group of students).

  1. Create an exercise
dojo exercise create --assignment unique_name                   
Please wait while we verify and retrieve data...
ℹ Checking Dojo session: 
    ✔ The session is valid
        ✔ Student permissions
ℹ Checking Gitlab token: 
    ✔ Read access
    ✔ Write access
ℹ Checking assignment:
    ✔ Assignment "unique_name" exists
    ✔ Assignment "unique_name" is published
Please wait while we are creating the exercise...
✔ Exercise successfully created
    ℹ Id: some-long-hash
    ℹ Name: DojoEx - unique_name - your.name
    ℹ Web URL: https://gitedu.hesge.ch/dojo/exercise/dojo-ex_unique_name_some-long-hash
    ℹ HTTP Repo: https://gitedu.hesge.ch/dojo/exercise/dojo-ex_unique_name_some-long-hash.git
    ℹ SSH Repo: ssh://git@ssh.hesge.ch:10572/dojo/exercise/dojo-ex_unique_name_some-long-hash.git

Tips: You cas use the --members_username or --members_id options to add other students of the group to the exercise.

  1. Make changes and try solving the exercise.
  2. The complete tests can be run with the following command.
dojo exercise run
Please wait while we are checking and creating dependencies...
    ℹ Checking exercise content:
        ✔ The exercise folder contains all the needed files
        ✔ The dojo_assignment.json file is valid
    ✔ The Docker deamon is running
Please wait while we are running the exercise...
    ✔ Docker Compose file run successfully
    ✔ Linked services logs acquired
    ✔ Containers stopped and removed
Please wait while we are checking the results...
    ✔ Results file found
    ✔ Results file is valid
    ✔ Results folder size is in bounds

   ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Results ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
   ┃                                                                                                    ┃
   ┃   Global result : ✅ Success                                                                       ┃
   ┃                                                                                                    ┃
   ┃   Execution exit code : 0                                                                          ┃
   ┃                                                                                                    ┃
   ┃   Tests passed : 3                                                                                 ┃
   ┃   Tests failed : 1                                                                                 ┃
   ┃                                                                                                    ┃
   ┃   Tests :                                                                                          ┃
   ┃   - ✅ ListeOrdonnee                                                                               ┃
   ┃   - ✅ ListeVide                                                                                   ┃
   ┃   - ✅ ListeOrdreInverse                                                                           ┃
   ┃   - ❌ ListeRandom                                                                                 ┃
   ┃                                                                                                    ┃
   ┃   Execution results folder : /home/username/DojoExecutions/dojo_execLogs_2023-08-21T21_33_38_684Z  ┃
   ┃                                                                                                    ┃

This command runs the exercise in the current directory or in the path provided by the --path option.

  1. Once confident enough in the solution, one can commit/push the solution. This triggers the CI/CD pipeline on gitedu. In the CI/CD all immutable files are overwritten and the docker-compose is executed (only logs from the current container are given) then other logs are retrieved from the other images that may be used. The error code of the docker container is retrieved.