-hello_world_volume:/result# <hello_world_volume> must be the same as below but
# the name may be arbitrary. This volume must be
# present in the dojo_assignment.json file under the field
# the name may be arbitrary. The volume is optional but
# you can provide it for show details of the execution like
# tests passed or not or simply any log file you think that
# can be useful for the students. If it's present, this volume
# must be present in the dojo_assignment.json file under the field
# "result": {
# "volume": "hello_world_volume",
# ...
...
...
@@ -129,18 +132,25 @@ volumes:
```
In this file, we see the definition of a `hello_world_volume` this is an arbitrary name and can be changed but it
must be coherent in this file and in the `dojo_assignment.json` file (more on this later configuration file in [The dojo configuration file](#the-dojo-configuration-file)).
This volume is responsible of mounting `/result/` directory which will contain all
This (optional) volume is responsible of mounting `/result/` directory which will contain all
the output generated by our assignment (again the name can be changed). In particular
in this director e will be required to create a `dojo_assignment.json` file
in this director he will be required to create a `dojo_assignment.json` file
that contains at least if the assignment was successfully performed (more on that at the end of the [Creating the assignment files](#creating-the-assignment-files) section).
## The dojo configuration file
The `dojo_assignment.json` file contains the general configuration of the assignment.
The important configuration parameters are:
- the *immutable files* which are files that will be overwritten when the compilation pipeline is run (even if the student
modifies these files the modifications will not be taken into account),
- the *results* which is the volume corresponding to the `docker-compose.yml` file.
The configuration parameters are:
- the `dojoAssignmentVersion` which define the version of the dojo assignment file (actually only version 1 is available),
- the `version` of you assignment,
- the `immutable` field which are files or directories that will be overwritten when the compilation pipeline is run (even if the student
modifies these files the modifications will not be taken into account). Each immutable is defined by:
-`path`**(required)**: the path of the immutable file or directory,
-`description` _(optional)_: provides a description of the immutable for the students or Dojo interface,
-`isDirectory` _(optional)_: `true` if the immutable is a directory, `false` otherwise (default),
- the `results` which provide information to the Dojo for finding results of the execution. The *result* field is defined by:
-`container`**(required)**: the name of the service in the docker compose file that will be run (his dependencies will be run automatically). In our case it is `hello_world`,
-`volume` _(optional)_: this field (`hello_world_volume`) corresponds to the `volumes` field in the `docker-compose.yml` file.
In its default form `dojo_assignment.json` file contains
```json
...
...
@@ -160,13 +170,8 @@ In its default form `dojo_assignment.json` file contains
}
}
```
Here we see only one immutable file which is the `Dockerfile` (the `isDirectory` field is `false` but it is possible to make
complete directories immutable) and we see that:
* the value of the `container` field (`hello_world`) corresponds to
the value of the `container_name` field in the `docker-compose.yml` file,
* the value of the `volume` field (`hello_world_volume`) corresponds to the `volumes` field in the `docker-compose.yml` file.
This file will be completed in [The immutable files](#the-immutable-files) sectino with the files of our assignment that will be
This file will be completed in [The immutable files](#the-immutable-files) section with the files of our assignment that will be
created in the [next section](#creating-the-assignment-files).
3. Modify the `unique_name` assignment as you want (modify the Dockerfile, docker-compose.yml files, add a readme, source code, compilation tools, etc.). Commit and push our work (soon™ more details will be provided on how to create assignment).
4. Once the assignment is done it must be published to be available to students:
4. Once the assignment is done and validated by the pipeline it must be published to be available to students: