Skip to main content

Jobs Inputs

Files

MaaS provides special mounts for input and output files. These mounts are defined using inputFilePath and outputFilePath respectively. Not setting these to a value means the corresponding file will not be mounted in the container.

  • The input file is mounted as read-only. This file is a Tar file with:

    • student/ - folder containing the content of the student's repository
    • everything from the testsuite tarball.
info

The testsuite content is concatenated to the tarball. It is not placed in any special folder. This means that, given the following testsuite tarball:

testsuite.tar/
├── some
├── stuff
└── testsuite

The input tarball will be as follows

testsuite.tar/
├── some
├── student
├── stuff
└── testsuite

This also means that anything placed in a directory named student in your testsuite.tar may be overwritten or otherwise mess with the student's files.

  • The output file is mounted as read-write. You cannot delete this file, you will have to write to it without deleting it beforehand.

See this page for the exact format of the output file.

caution

Some basic tools like cp or mv may fail because they will try to delete (or otherwise mess with) the original file. Instead, consider using > or >> shell redirection.

Environment variables

At each level (pipeline, stage, task), you can define environment variables that will be passed to the container.

Additionally, the following variables are predefined for each of the pipeline:

Variable nameDescription
FORGE_AUTHOR_LOGINLogin of the student who tagged
FORGE_AUTHOR_IPThe IP address from which the student made a submission
FORGE_SUBMISSION_IDThe ID of the submission this job is linked to
FORGE_JOB_IDThe ID of the running job
FORGE_SUBMISSION_DEFINITION_URIThe URI of the submission definition. Can also be used to determine which assignment this job was made against
FORGE_RETRY_COUNTThe amount of times this submission was restarted