Lab 1 Report
https://gitlab.stud.atlantis.ugent.be/lodgruyt/devops-project/-/pipelines/77171 At the top of the file, the base image and global variables are defined aswell as a cache for the local maven repository. Next up are the stages, which defines the order in which jobs are executed maven build is the first job. This compiles the project and stores the build output as artifacts the second job is maven-container-image-generation: this job build the container image using Quarkus and also pushes it to gitlab. Job 3 is the run-game. This job runs the game host and starts a service container containing the previously built logic-service image. One issue I faced here was that the service image didn’t exist during the first pipeline run, because I forgot to create the service in the package stage.
Questions: 1 .mvnw is the Maven wrapper. It ensures that everyone working on the project uses the same maven version. It also eliminates the dependency of maven on CI jobs as the wrapper fetches the required maven automatically 2. A cache speeds up repeated dependency downloads across jobs and pipelines. Artifacts pass build outputs from one job to later jobs within the same pipeline. Cache is best for Dependencies and artifacts are best for build files. Trade-off for artifacts is that it is not reusable across pipelines. 3. The build needs the jdk because it includes the necessary tools and header files for compilation. The Runtime container does not need this, so it is advantageous to use just the jre because this is smaller than the jdk, which means less storage and faster startup.