-
Notifications
You must be signed in to change notification settings - Fork 102
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
fix(config-utils): Also check env for BETA to choose deployment #1933
fix(config-utils): Also check env for BETA to choose deployment #1933
Conversation
6c9fb13
to
ea4d62d
Compare
ea4d62d
to
eac5903
Compare
packages/config/src/lib/index.ts
Outdated
@@ -61,7 +61,8 @@ const createFecConfig = ( | |||
fecLogger(LogType.info, 'no git branch detected, using main for webpack "main" config.'); | |||
gitBranch = 'main'; | |||
} | |||
const appDeployment = configurations.deployment || (isProd && betaBranches.includes(gitBranch) ? 'beta/apps' : 'apps'); | |||
const appDeployment = | |||
configurations.deployment || ((isProd && betaBranches.includes(gitBranch)) || process.env.BETA === 'true' ? 'beta/apps' : 'apps'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bastilian nice catch. This condition needs a little bit of love in general.
Can you add a check for the configurations.deployment
as well? Just to make sure we don't run into any edge cases.
const appDeployment = typeof configurations.deployment === 'string' ? configurations.deployment : ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Hyperkid123 Added!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
eac5903
to
888ca49
Compare
:soon::shipit::octocat: |
🌱 🌸 🌷 🌻 🌟 New version of package has been released 🌟 🌻 🌷 🌸 🌱 The release is available on: :package:@redhat-cloud-services/frontend-components-config/v/6.0.6📦 :boom:This feature is brought to you by probot🚀 |
This adds another check that will help prevent apps failing to deploy containers properly for preview environments, since we now set wether or not it is preview via the env variable and not the branch names.