IBX-11919: Build CI assets with yarn encore prod - #143
Draft
micszo wants to merge 1 commit into
Draft
Conversation
Browser-tests CI runs the whole app under APP_ENV=behat, and ibexa:encore:compile picks yarn encore dev/prod based on the ambient --env, which defaults to APP_ENV. As a result every CI asset build was silently compiled in dev mode, never prod, regardless of edition. Override APP_ENV=prod for just the composer run post-install-cmd exec call that triggers ibexa:encore:compile, so encore compiles a production build while the app itself still runs under APP_ENV=behat for the actual Behat test execution.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
ibexa/gh-workflows) runs the whole app underAPP_ENV=behat.ibexa:encore:compile(seeIbexa\Bundle\AdminUi\Command\CompileAssetsCommand) only runsyarn encore prodwhen the consoles ambient--envoption equalsprod; that option defaults toAPP_ENV. Since CI never setsAPP_ENV=prod, every asset build triggered bycomposer run post-install-cmdon CI silently compiled withyarn encore dev, on every edition and version.APP_ENV=prodfor just thecomposer run post-install-cmdexec call in eachbin/<version>/prepare_project_edition.sh, soibexa:encore:compilebuilds a production bundle while the app container keeps running underAPP_ENV=behatfor the actual Behat test execution (nothing else changes).4.6.x-dev,5.0.x-dev,6.0.x-dev,stable. Left4.0.x-devthrough4.5.x-devand^3.3.x-devuntouched (EOL).Companion PR in
ibexa/gh-workflowshandles the equivalentcomposer run post-install-cmdcalls that happen mid-pipeline (multirepository setup, test-setup phases) in the sharedbrowser-tests.ymlreusable workflow.Test plan
ci-scriptsref and confirm the "Clear cache & generate assets" step logs a prod encore build instead of dev.APP_ENV=behatis unaffected at runtime).Ref: https://ibexa.atlassian.net/browse/IBX-11919