- To start developing, you first need to have Maven installed. (Not sure if it comes with IntelliJ). You can check that it is installed by running
mvn --version
in your terminal/powershell. - Clone this project to a location of choice, e.g
git clone ...
. - Run
mvn clean install
in the root of the project folder, that is, same level were this README.md is located. This will download all the dependencies needed to run the project. - To start the project, run
mvn exec:java "-Dexec.mainClass=ContinuousIntegrationServer"
. You can also run the project by running or debugging the main function in the ContinuousIntegrationServer class using an IDE. This would start a server on port 8080 that you can access inhttp://localhost:8080/
. You can also access the frontend dashboard inhttp://localhost:8080/dashboard
. - To start the tests, run
mvn test
.
The JavaDoc can be accessed from here: https://kth-dd2480-ci-lab-2-java-doc.web.app/package-summary.html
- In order to get started on developing the frontend part of the CI, you will need node.js version 12 or later.
- You can start the frontend server by going running
npm install
and thennpm start
in the src/main/webapp/ci-frontend folder.
There are multiples ways to add dependencies to a maven project.
- Using IntelliJ:
- Adding them manually.
Before you start the sever, you need to add an system variable with a personal access token. The name of the system variable should be KTH_DD2480_CI_TOKEN
and have the value of you access token, e.g "35ddf2a243272a435da75d4cesas9ead5asdf584a" (Just an example, this specific access token do not work). Instruction of how to add a new system variable can be found here: https://www.architectryan.com/2018/08/31/how-to-change-environment-variables-on-windows-10/
#<issue-num> fix|feat|docs|test|style: <Description of commit>
- Make sure last commit in PR follows the style above
- Local commits can be in any form descriptive to yourself/others, but should be explanatory
- The
<Description of commit>
should start with a capitalized letter
issue/x-<description-of-branch>
The main procedure for developing the continuous integration (CI) server was to use group meetings to discuss what parts the server should consist of and in what order they could be implemented. The team member that implemented a part that could be tested was also responsible for creating tests for it.
More over, every merge into main needs to have an approved review. A set of rules was set in the repository to prevent pushes directly into main and merges when no approved review existed. Squash and merge was used for every pull-request to prevent unnecessary commits in the main branch. As a result, commits such as "Fixed typo" or "Added comment" is not visible and will minimize showing irrelevant changes in the main branch. The information is however not lost, as it is still visible under the given pull-request.
- Adam Jonsson: Added frontend for the CI server PR. Fixed bug regarding commit status PR. Added the skelton to for the ContinuousIntegrationServer.java PR. Created repository as an origination and added rules for the repository.
- Hovig Manjikian: Added tests to for the ContinuousIntegrationServer.java PR. Added the functionality of parsing the webhook and fetching the relevant revision from GitHub PR. Reviewed PR, PR, PR. Configured Ngrok and depoyed the server.
- Isak Vilhelmsson: Added functionality for CI to extract and run a repo zip (PR). Did setup for the 'contributions' part of the README (PR). Reviewed (PR), (PR), (PR), (PR), (PR).
- Lara Rostami: Implemented functionality for collecting the history of all builds in .json-format and sending it to the frontend (PR).
- Tony Le: Implemented functionality for the CI to retrieve and change commit status (PR), and ensured that all classes and methods had proper comments and descriptions for Javadoc generation (PR).
This section exist to make it more easier for the TA to grade this assignment.
-
P0 - See this README file and this repository.
-
P1 - The CI server extract the project from the pushed commit and runs
mvn clean install
which builds the project. The CI server scan the output of the command and notifies GITHUB if the build was success full or not. -
P2 - The CI server the same command
mvn clean install
which also tests the project. Here as well, the CI server scan the output of the command and notifies GITHUB if the build was success full or not. -
P3 - We used GitHubs REST-API to notify when the server began the building and testing. It also notifies when the server was done by either returning "success" or "failure". The history of the notification of our CI server can be seen in the latest commits in the main and assessment branch.
-
P4 - We have used a prefix conversion for all commits and have linked issues and pull-request to them all: https://github.com/KTH-DD2480-Group-2/KTH-DD2480-CI-Lab-2/commits/main.
-
P5 - We created a JavaDoc and published it on github.io which can be accessed here: https://kth-dd2480-ci-lab-2-java-doc.web.app/package-summary.html
-
(P+) P6 - We are storing the build history, even if the server is rebooted. The build history can be accessed here:
-
(P+) P7 - We have built an frontend for the build history that we are proud of:
-
(P+) P8 - All commits have (expect the first one) has an issue and a PR linked to it.
- See main branch here: https://github.com/KTH-DD2480-Group-2/KTH-DD2480-CI-Lab-2/commits/main