Skip to content

KTH-DD2480-Group-2/KTH-DD2480-CI-Lab-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KTH-DD2480-CI-Lab-2

Build Status

Developers

Getting Started

  • 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 in http://localhost:8080/. You can also access the frontend dashboard in http://localhost:8080/dashboard.
  • To start the tests, run mvn test.

JavaDoc

The JavaDoc can be accessed from here: https://kth-dd2480-ci-lab-2-java-doc.web.app/package-summary.html

Frontend

  • 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 then npm start in the src/main/webapp/ci-frontend folder.

Add New Dependencies

There are multiples ways to add dependencies to a maven project.

  • Using IntelliJ:
    • Adding them to class path will automatically also add them to the pom.xml file. Example:
  • Adding them manually.
    • IntelliJ might sometimes not find the package that we want to import. In these cases, the packages need to be manually added to the pom.xml file. You can either search only for the package and add the dependency in the pom.xml file. Or you can do the search in the pom.xml file itself:

Deployment

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/

Naming Conventions

Commit messages

  • #<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

Branch name

  • issue/x-<description-of-branch>

Statement of contributions

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.

Contributions of each member

  • 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).

P - Features & Grading

This section exist to make it more easier for the TA to grade this assignment.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published