Skip to content

Commit f511c45

Browse files
authored
Merge pull request #223 from rajuljha/main
chore(report) : Coding period week 3 and week 4 reports
2 parents 9886084 + 754e623 commit f511c45

File tree

7 files changed

+112
-0
lines changed

7 files changed

+112
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Week 3
3+
author: Rajul Jha
4+
---
5+
<!--
6+
SPDX-License-Identifier: CC-BY-SA-4.0
7+
8+
SPDX-FileCopyrightText: 2024 Rajul Jha <rajuljha49gmail.com>
9+
-->
10+
11+
# Week 3
12+
*(June 14, 2024 - June 20, 2024)*
13+
14+
## Meeting 1
15+
*(June 19, 2024)*
16+
17+
## Attendees
18+
* [Rajul Jha](https://github.com/rajuljha)
19+
* [Kaushlendra](https://github.com/Kaushl2208)
20+
* [Shaheem Azmal](https://github.com/shaheemazmalmmd)
21+
* Katharina
22+
23+
24+
## Discussions
25+
26+
* Worked on adding nomos json output. But not able to access the theMatches object's licenseAndMatchPositions object. Stuck on this for nomos task.
27+
* Bumped up spdx_tools library to latest version. Tested with both platforms (GH Actions and Gitlab).
28+
* Discussed an issue in the github workflow, not supporting multiple architectures.
29+
* The GH Actions Runner does not support multi-architecture images.
30+
* We discussed potential solutions for the same including trying to build the image in the GH Action itself or utilizing an emulator like qemu.
31+
32+
## Work Done
33+
34+
* Upgraded the spdx_tools library [(#PR2762)](https://github.com/fossology/fossology/pull/2762) and did performance analysis for both versions.
35+
* With Version `0.0.0a2`:
36+
![Screenshot](/img/ci/Spdx_tools_Version0.8.0a2.png)
37+
38+
* With Version `0.8.2`:
39+
![Screenshot](/img/ci/Spdx_tools_Version_0.8.2.png)
40+
41+
* Worked on providing custom `keyword.conf` file during CI pipeline. It works as follows:
42+
* User creates a custom `keyword.conf` file following [this](https://github.com/fossology/fossology/blob/master/src/copyright/agent/keyword.conf) pattern.
43+
* They set an environment variable called `KEYWORD_CONF_FILE_PATH` in CI providers settings and set its value to the path of the `keyword.conf` file.
44+
* Then, when the pipeline is triggered, say on `push` to `main`, then the keyword scanner reads the custom file and scans for the keywords specified by the user.
45+
* Keep in mind that the current keyword file is overwritten by the script, as discussed with the mentors.
46+
47+
## Planning for next week
48+
49+
* Test the keyword functionality with GH Actions and Gitlab CI and send out a PR for the same.
50+
* Work on providing multi architecture support for GH Actions.
51+
* Study about how to implement differential scans.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: Week 4
3+
author: Rajul Jha
4+
---
5+
<!--
6+
SPDX-License-Identifier: CC-BY-SA-4.0
7+
8+
SPDX-FileCopyrightText: 2024 Rajul Jha <rajuljha49gmail.com>
9+
-->
10+
11+
# Week 4
12+
*(June 21, 2024 - June 27, 2024)*
13+
14+
## Meeting 1
15+
*(June 26, 2024)*
16+
17+
## Attendees
18+
* [Rajul Jha](https://github.com/rajuljha)
19+
* [Kaushlendra](https://github.com/Kaushl2208)
20+
* [Shaheem Azmal](https://github.com/shaheemazmalmmd)
21+
* [Avinal Kumar](https://github.com/avinal)
22+
* Katharina
23+
24+
## Discussions
25+
26+
* Talked about how the differential scans need to work in detail, like:
27+
* Should they be triggered on `release` only? As it makes sense to scan between two different versions when a new release it being published.
28+
* Or should the user be able to scan between two different versions via any sort of trigger, like on `push` or `commit` as well?
29+
* Talked about the current implementation of custom keyword functionality, and how it can be
30+
extrapolated similarly for different scanners also.
31+
* We talked about fleshing out the design and implementation details first, then work on improving speed.
32+
33+
## Work Done
34+
35+
* Completed custom keyword functionality. [(#PR2769)](https://github.com/fossology/fossology/pull/2769) The details are as follows:
36+
* User can now setup a GH Action or Gitlab CI pipeline and pass environment variables to scan for custom keywords however they want. This gives them immense control over what they wan't to scan.
37+
* Added some validity checks for the `keyword.conf` file as during testing, I found out that the scanner breaks if an invalid file is passed to it.
38+
* Set up a test docker image [(rjknightmare/fo-ci-test:latest)](https://hub.docker.com/layers/rjknightmare/fo-ci-test/latest/images/sha256-ac72768b8c4383a4aca05a50cd53ae427db9645b42619ad82b53e38b3b876b38?context=repo) for testing.
39+
Here are the test results for the same:
40+
* GH Actions:
41+
42+
![Screenshot](/img/ci/GH_Actions_1.png)
43+
44+
* Gitlab CI:
45+
46+
![Screenshot](/img/ci/Gitlab_1.png)
47+
48+
* Set up qemu emulator for the Github Actions environment to provide multiple architecture support, which also reduced the time for action execution significantly.
49+
50+
![Screenshot](/img/ci/GH_Actions_2.png)
51+
52+
* Studied about how we can implement differential (between two different versions) scans and explored these use cases:
53+
* Use Case I: On `release`
54+
* Use Case II: On `push`, `commit` or any other event trigger.
55+
56+
57+
## Planning for next week
58+
59+
* Study further on above use cases and work out a plan for the same.
60+
* Explore the GH Actions and Gitlab API's and use the best endpoints for our use cases.
61+
* Then start working on implementation of differential scans.

static/img/ci/GH_Actions_1.png

101 KB
Loading

static/img/ci/GH_Actions_2.png

91 KB
Loading

static/img/ci/Gitlab_1.png

157 KB
Loading
188 KB
Loading
159 KB
Loading

0 commit comments

Comments
 (0)