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

Package version from env instead of package.json #12139

Merged
merged 20 commits into from
Oct 23, 2023

Conversation

adrinr
Copy link
Collaborator

@adrinr adrinr commented Oct 20, 2023

Description

Reading package version from environment instead of relying on the package.json for the docker images V2. As we don't have npm repo dependencies anymore, the package.json will always have 0.0.0.
This will only apply to the new images, currently only used in QA

Before After
image image

Related: https://github.com/Budibase/budibase-deploys/pull/134

@adrinr adrinr added the firestorm Data/Infra/Revenue Team label Oct 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2023

Codecov Report

Merging #12139 (3d718c4) into master (7623ffd) will increase coverage by 0.75%.
The diff coverage is n/a.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##           master   #12139      +/-   ##
==========================================
+ Coverage   75.53%   76.28%   +0.75%     
==========================================
  Files         334      429      +95     
  Lines       13981    16138    +2157     
  Branches     2936     3254     +318     
==========================================
+ Hits        10560    12311    +1751     
- Misses       3200     3581     +381     
- Partials      221      246      +25     

see 95 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -75,12 +75,12 @@ function getPackageJsonFields(): {
const content = readFileSync(packageJsonFile!, "utf-8")
const parsedContent = JSON.parse(content)
return {
VERSION: parsedContent.version,
VERSION: process.env.VERSION || parsedContent.version,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will use the env variable version if set

@adrinr adrinr changed the title [WIP] Package version from env Package version from env instead of package.json Oct 23, 2023
@adrinr adrinr marked this pull request as ready for review October 23, 2023 10:25
@adrinr adrinr requested a review from mike12345567 October 23, 2023 10:55
Copy link
Collaborator

@mike12345567 mike12345567 left a comment

Choose a reason for hiding this comment

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

LGTM!

@adrinr adrinr merged commit 5506c77 into master Oct 23, 2023
10 checks passed
@adrinr adrinr deleted the BUDI-7641/package_version_from_env branch October 23, 2023 17:25
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
firestorm Data/Infra/Revenue Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants