Verified Commit a4119e2b authored by Lukas Wiest's avatar Lukas Wiest 🚂
Browse files

chore(readme): replace with readme linking to docs repo

parent 6391c569
# Moodle Dockerized Code Testing (MoDoCoT) - Backend
# DTT Backend
## Usage
An available Jenkins needs to run on the server where the backend container runs.
The Jenkins has to listen on port 8080.
If need to use another port for Jenkins have a look at Server application configuration / Local application configuration
This is the source code repository for the DTT backend server.
### Conventions
- The JUnit test classes cannot be organized in packages. Tasks and helper classes can use packages.
Documentation for this is done with GitLab Pages using MkDocs and is available here:
[https://transfer.hft-stuttgart.de/pages/dtt/][pages-link]
## Development Hints
### Build
This is a maven project. It can be build with `mvn package`.
There is also a ready-to-go docker image available. It can be found [on Docker Hub](https://hub.docker.com/r/hftstuttgart/modocot-backend/)
### Server application configuration
We're using the **application-server.properties** file to configure the application.
The file can be found under _/src/main/resources/_
You need to configure following entries:
docker.hostIp= "Your docker host ip"
jenkins.api.token= "Your jenkins api token" [See Jenkins Doc](https://www.jenkins.io/doc/book/using/remote-access-api/)
(jenkins.url=http://${docker.hostIp}:"Your Jenkins Port"/) Use this property if your Jenkins listens on a port other than 8080
### Local application configuration
We're using the **application.properties** file to configure the application.
The file can be found under _/src/main/resources/_
You need to configure following entries:
docker.hostIp= "Your docker host ip"
jenkins.api.token= "Your jenkins api token" [See Jenkins Doc](https://www.jenkins.io/doc/book/using/remote-access-api/)
(jenkins.url=http://${docker.hostIp}:"Your Jenkins Port"/) Use this property if your Jenkins listens on a port other than 8080
## Interfaces
##### POST /v1/unittest
Used for uploading / creating of assignments. The body needs to contain two fields as form data:<br/>
*assignmentId*: The ID of the created assignment. This is created by moodle.<br/>
*unitTestFile*: The zip file containing the unit tests for this assignment.
##### DELETE /v1/unittest?assignmentId=<111>
Delete the created assignment. The assignment ID of the unit tests which need to be deleted is passed as a query parameter
##### POST /v1/task
The upload of the Java files to be tested. The body needs to contain two form fields:<br/>
*taskFile*: The zip file containing the java files<br/>
*assignmentId*: The id of the assignment. Provided by moodle
## Further development
For pushing the backend to Dockerhub you need to provide the Dockerhub-Credentials inside your Jenkins with the naming "Dockerhub"
You also need to create a Jenkins-pipline which is builds and deploys this repository.
If you don't want to open the Webpage or it is not available for whatever reason,
the documentation root is found [here][docs-root]
[docs-root]: https://transfer.hft-stuttgart.de/gitlab/dtt/documentation/-/blob/master/docs/index.md
[pages-link]: https://transfer.hft-stuttgart.de/pages/dtt/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment