Skip to content
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

Refactored build to separate browser and electron and added docker build for main #74

Merged
merged 35 commits into from
Nov 25, 2024

Conversation

harmen-xb
Copy link
Contributor

@harmen-xb harmen-xb commented Nov 25, 2024

  • Refactored main build script to have browser and electron build (incl. symlink) to have minimize build for build and docker.
  • Updated all versions to 0.0.0.
  • Created Dockerfiles for ubuntu and alpine and added/updated build scripts
  • Setup docker build in main pipeline, using the alpine Dockerfile.

harmen-xb and others added 30 commits November 5, 2024 23:19
…or CrossModel.

Updated package configurations and webpack configuration.
Added separate protocol build, since this needs to happend first.
Updated docker build to publish to GitHub container registry.
…nspec where used.

Updated rimraf in all package.json files to also cleanup local node_modules.
Added execution of package:extensions and copy of vsix to browser plugins folder.
Added build:dev and symlink:browser to main package json for browser development and symlink of ext.
Remove prepare script everywhere.
Updated build-and-test action to use build:dev.
Copy link

github-actions bot commented Nov 25, 2024

Unit Test Results

  3 files  ±0   24 suites  ±0   2m 21s ⏱️ -6s
 36 tests ±0   36 ✅ ±0  0 💤 ±0  0 ❌ ±0 
108 runs  ±0  108 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 2a0e3bb. ± Comparison against base commit 2c6314d.

♻️ This comment has been updated with latest results.

@harmen-xb harmen-xb self-assigned this Nov 25, 2024
@harmen-xb harmen-xb added the enhancement New feature or request label Nov 25, 2024
@harmen-xb
Copy link
Contributor Author

harmen-xb commented Nov 25, 2024

@martin-fleck-at hereby the PR for Docker container. I removed the rimraf on node_modules as discussed.

I also made two build options for browser and electron to only build what is necessary. This seems to speed up the build quite a bit, since we only use browser anyway in build I think this make sense.

Copy link
Collaborator

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

The change looks good to me overall and I like the unification of the version numbers as well as the splitting between browser and electron app. I built and ran the Docker image locally and it seemed to work as expected. I just have a few minor comments which maybe could be addressed.

package.json Show resolved Hide resolved
Dockerfile.ubuntu Show resolved Hide resolved
.github/workflows/cicd-main.yml Show resolved Hide resolved
@harmen-xb
Copy link
Contributor Author

@martin-fleck-at I processed your comments. Let me know if you approve :).

Copy link
Collaborator

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

All my concerns have been addressed, thank you for the quick turnaround, Harmen! I'll ask Johannes tomorrow to just have a very quick look at it in case he spots something odd but from my side we can already merge this and fix any unexpected issues in a follow-up.

@harmen-xb harmen-xb merged commit 60fa280 into main Nov 25, 2024
5 checks passed
@harmen-xb harmen-xb deleted the feature/docker-build branch November 25, 2024 18:29
@@ -0,0 +1,91 @@
# Stage 1: Builder stage
FROM node:20-bookworm AS build-stage
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just realized that this is not actually Ubuntu but Debian, at least according to https://hub.docker.com/_/node:

Some of these tags may have names like bookworm or bullseye in them. These are the suite code names for releases of Debian⁠ and indicate which release the image is based on.

This is not a problem, just makes the file naming a bit confusing. Sorry, I missed that yesterday!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, good point. I also realized that a while ago, but forgot:). I will update to the file name and readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants