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

Add separate build script #173

Closed
wants to merge 1 commit into from
Closed

Conversation

Timshel
Copy link
Contributor

@Timshel Timshel commented Jul 11, 2024

Hey

A change to move part of the build process out of the docker file in an external script.

As for why:

  • It can help with testing by allowing to run locally, but this is limited by the rather strict node version checking of npm ci.
  • It's mainly for the Playwright PR in Vaultwarden to be able to build aany commit without having to work with the bw_web_builds/Dockerfile.

Additionally, removed the chown node logic since I had no issues when running the build.

@BlackDex
Copy link
Collaborator

BlackDex commented Jul 11, 2024

What is wrong with all the other scripts already there?

The same can be done with:

# Using make (separate commands)
VAULT_VERSION=v2024.5.1 make checkout
VAULT_VERSION=v2024.5.1 make patch-web-vault
VAULT_VERSION=v2024.5.1 make build

# Using make, just one command
VAULT_VERSION=v2024.5.1 make full

# Or using the script directly
VAULT_VERSION=v2024.5.1 ./scripts/checkout_web_vault.sh
VAULT_VERSION=v2024.5.1 ./scripts/patch_web_vault.sh 
VAULT_VERSION=v2024.5.1 ./scripts/build_web_vault.sh 

@Timshel
Copy link
Contributor Author

Timshel commented Jul 11, 2024

Sorry was working on the Playwright PR and did not take time to reread the bw_web_builds docs :(.
And since the build_web_vault.sh was not used in the Dockerfile did not realise it would work.

@Timshel Timshel closed this Jul 11, 2024
@BlackDex
Copy link
Collaborator

Ah, no prob. Glad this can be solved with the current script already :).
It has been Wednesday already ;).

@Timshel
Copy link
Contributor Author

Timshel commented Jul 11, 2024

Are you aware of any reason why the checkout_web_vault and build_web_vault are not used in the Docker image ?

They are more verbose and might make more check but since the intermediate image is discarded anyway should not have much impact ?

@BlackDex
Copy link
Collaborator

Um, there was a reason, not sure from the top of my head right now.
I would have to take a better look, but there was a good reason i think (if not, then we could change that too of course)

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

Successfully merging this pull request may close these issues.

2 participants