Open laurenzfb opened 1 year ago
I think we should widen this topic a bit and think about not only dynamically selecting a fitting base-buildplan, but also allowing instructors to customize its content.
While not often, Instructors should be able to manually change the build script of creation exercises. Use cases for this include:
Adding a custom script task: One example of this are git-commands that should be executed on the student's repository. We have exercises where students need to resolve merge conflicts, switch branches, or just generally work with some kind of automatic change to their repository. Instructrs should be able to include such additional tasks.
Modify execution parameters
In one exercise I was creating I had an issue with the mocking frameworks and java's (at that time new) illegal access restrictions. I was only able to fix using the --add-opens
parameter.
Build artifacts On Bamboo, Instructors can specify build artifacts, that Artmis provides to the student. In most cases, this will be the student's application. Instructors should be able to specify how to build the file and where the result is located, so that it can be provided to the student.
Additionally, Instructors should be able to specify at least the version of the used docker image (e.g when you need to stick to an older version or directly need an update before the default changed in Artemis). Maybe even allow to manually select the used image to a completely different one (even though I'm not aware of cases where this is useful or needed right now)
Yes, that is eventually the goal. I'm working towards a solution that provides a way, similar to Bamboo, to view and interact with build plans. This here is basically just a first step to ensure that Artemis is able to create dynamic build scripts. Later on, I will add the functionality for customizing the build plan. Thank you for the remarks, I will definitely take them into consideration!
Dynamically create build containers and scripts
Context
Problem
The current local CI system statically creates a Docker container for a build job and mounts a static build script on it. The container always uses the "ls1/artemis-maven-template" and the build script tests for Java exercises. This way, the local CI setup can only support Java programming exercises. Other features like auxiliary repositories, sequential test runs, static code analysis and testwise coverage are not possible because of the static build script. Being able to dynamically create containers and build scripts based on the programming language, project type and other customizations can fix this problem.
Motivation
The motivation seems quite obvious. We want to support multiple programming languages and project types, as well as the previously mentioned features in the programming exercises in the local CI setup.
Requirements Engineering
Existing (Problematic) Solution / System
Currently, the UI only allows you to create Java Gradle exercises. When a programming exercise is created, the template and solution repositories are created and the respective build plans created and executed. The method
runBuildJob
inLocalCIBuildJobExecutionService.java
mounts the repositories and the static build script to the container, configures it and eventually runs it. It always uses "ls1/artemis-maven-template" for the Docker image andbuild_and_run_tests.sh
as the script.Proposed System
Before the build container can be configured, we need to know the programming language, the project type and other options of the programming exercise object to be able to determine which Docker image will be used and what commands will be needed for the script. Then we can create the build script, configure the container and run it.
Requirements
Analysis
Analysis Object Model
Dynamic Behavior
System Design
Subsystem Decomposition
Persistant Data Management
Access Control / Security Aspects
Other Design Decisions
UI / UX