Skip to content

Feature: Implement Docker-based building and client tests #4565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Jul 11, 2025

Conversation

AnXh3L0
Copy link
Member

@AnXh3L0 AnXh3L0 commented Jul 2, 2025

This PR aims to improve the current Docker-building methodology, by re-using the same build.yml file while adding a new install-docker script. Among the changes, we have implemented parallel Docker building and test execution on all the distros we currently support, with bookworm as the default one.

Additionally, the Cypress tests have been changed to run on these Docker instances, and Lighthouse testing has been added for the three main public-facing pages, that do not require log in.

Currently, the workflows may fail because there's a few Cypress tests failing, but the workflow is generally stable. A few changes have been introduced to the .dockerignore and the .gitignore files, in order to prevent local tests from being accidentally commited to the remote repo.

Moreover, almost every step of the build is commented, in order to make it easier to understand what each line does. At the moment, the workflow takes about 30-40 minutes to execute, when running the default bookworm build process.

@AnXh3L0 AnXh3L0 self-assigned this Jul 2, 2025
@AnXh3L0 AnXh3L0 requested a review from a team as a code owner July 2, 2025 09:33
@github-project-automation github-project-automation bot moved this to Needs triaging in GLOBALEAKS Jul 2, 2025
Copy link

codacy-production bot commented Jul 2, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-20.02% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (b23857f) 14634 13648 93.26%
Head commit (426ae02) 45144 (+30510) 33065 (+19417) 73.24% (-20.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4565) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@evilaliv3
Copy link
Member

Hey @AnXh3L0

I just noticed this now, shall i proceed with a first round of review or is there still something you want to complete?

I will give this a try tomorrow.

I see that the test run is failing but it is probably due to problems related to the devel branch, while for this changes we could directly instegrate inside the stable.

@evilaliv3 evilaliv3 changed the base branch from devel to stable July 2, 2025 17:32
@evilaliv3 evilaliv3 changed the base branch from stable to devel July 2, 2025 17:32
@AnXh3L0
Copy link
Member Author

AnXh3L0 commented Jul 2, 2025

@evilaliv3 yes, I think you can start with a first round of review, I don't think there's anything else I can add for now.

@evilaliv3 evilaliv3 force-pushed the feature/gh-actions-fix branch from 831a6be to 5adf68d Compare July 3, 2025 12:22
@evilaliv3 evilaliv3 changed the base branch from devel to stable July 3, 2025 12:25
@evilaliv3
Copy link
Member

I remodeled the pull request to be based on current stable branch in order to perform a first review.

Copy link
Member

@evilaliv3 evilaliv3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @AnXh3L0 , i've loaded all my current comments suggesting the changes to apply before merge.

@AnXh3L0
Copy link
Member Author

AnXh3L0 commented Jul 7, 2025

Thanks for the comments @evilaliv3, I am checking and applying the changes you requested.

@AnXh3L0 AnXh3L0 requested a review from evilaliv3 July 9, 2025 11:48
Copy link
Member

@evilaliv3 evilaliv3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @AnXh3L0

I think all is good to go. I would amiliorate just adding the hashes of all the base images used

@AnXh3L0 AnXh3L0 requested a review from evilaliv3 July 9, 2025 18:49
@AnXh3L0 AnXh3L0 moved this from Needs triaging to In review in GLOBALEAKS Jul 10, 2025
@evilaliv3
Copy link
Member

Thank you @AnXh3L0

Actually i notice still duplication in hash definition and hash usage.

As example i refer to:

BASE_IMAGE_BOOKWORM: debian:bookworm-slim@sha256:36e591f228bb9b99348f584e83f16e012c33ba5cad44ef5981a1d7c0a93eca22

and:

BASE_IMAGE: ${BASE_IMAGE_BOOKWORM:-debian:bookworm-slim@sha256:36e591f228bb9b99348f584e83f16e012c33ba5cad44ef5981a1d7c0a93eca22}

Above is defined an hash but while using it the hash is provided again. Is this necessary or could we write it once?

@evilaliv3 evilaliv3 added this to the 5.0.73 milestone Jul 10, 2025
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.07% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (b23857f) 14634 13648 93.26%
Head commit (23b321f) 14771 (+137) 13786 (+138) 93.33% (+0.07%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4565) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Copy link

codacy-production bot commented Jul 10, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-14.37% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ce3390e) 19832 17365 87.56%
Head commit (a41c10d) 44859 (+25027) 32831 (+15466) 73.19% (-14.37%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4565) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@evilaliv3 evilaliv3 force-pushed the feature/gh-actions-fix branch 3 times, most recently from 9d221ef to 28a098a Compare July 11, 2025 06:35
@evilaliv3 evilaliv3 force-pushed the feature/gh-actions-fix branch from 2beba4b to a41c10d Compare July 11, 2025 08:59
Copy link
Member

@evilaliv3 evilaliv3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 LGTM @AnXh3L0 !

In my review i've applied the following changes and attempted to reduce code duplication:
- restored original static docker-compose.yml used for production purposes
- extended original docker-compose with health checks as in new testing compose
- add missing testing of debian bullseye
- removed usage of deprecated apt-key

Proceeding with the merge!

@evilaliv3 evilaliv3 merged commit c2e3683 into stable Jul 11, 2025
19 checks passed
@github-project-automation github-project-automation bot moved this from In review to Completed in GLOBALEAKS Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

2 participants