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

Building desktop app UI for CI #364

Open
gauthierpetetin opened this issue Jan 5, 2023 · 0 comments
Open

Building desktop app UI for CI #364

gauthierpetetin opened this issue Jan 5, 2023 · 0 comments

Comments

@gauthierpetetin
Copy link
Contributor

We are currently building the desktop app UI in three different CircleCI jobs.

build-ui: Builds with lavamoat and is used by the packaging jobs.
build-ui-test-extension: Builds with lavamoat (probably, as it's not specified and it seems to default to true) and it is used for test-e2e-extension and test-e2e-extension-snaps jobs.
build-ui-test-app: Builds without lavamoat and it is used for the test-e2e-app job.

For CI, we either want:

  • Two jobs, one with lavamoat for packaging and one without for e2e tests.
  • One job (build-ui) with lavamoat that is used for every job that requires the app ui artifacts. This is arguably better if we have no issues running electron ui with lavamoat always.

There are also a lot of confusing scripts to build the app ui:

"build:ui": "node build/ui/desktop-ui.js dev --apply-lavamoat=false",
"build:ui:ci": "node build/ui/desktop-ui.js dist --apply-lavamoat=false",
"build:ui:subtask": "node build/ui/desktop-ui.js",
"build:ui:subtask:lavamoat": "node build/ui/desktop-ui.js --apply-lavamoat=true",
"build:ui:lavamoat": "node build/ui/desktop-ui.js dev --apply-lavamoat=true",
"build:ui:lavamoat:ci": "node build/ui/desktop-ui.js dist --apply-lavamoat=true",
"dist:desktop:ui": "node build/ui/desktop-ui.js dist",

We could use the subtasks scripts as a base with explicit lavamoat directives to avoid confusion:

"build:ui:subtask": "node build/ui/desktop-ui.js --apply-lavamoat=false",
"build:ui:subtask:lavamoat": "node build/ui/desktop-ui.js --apply-lavamoat=true",

And then build the other jobs based on them:

"build:ui": "yarn build:ui:subtask dev",
"build:ui:ci": "yarn build:ui:subtask dist",
"build:ui:lavamoat": "yarn build:ui:subtask:lavamoat dev",
"build:ui:lavamoat:ci": "yarn build:ui:subtask:lavamoat dist",

We can also get rid of dist:desktop:ui and replace it on CircleCI jobs.

As part of this task, we shall also remove the prod build target (and use dist everywhere).

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

No branches or pull requests

1 participant