Skip to content

setup:static-content:deploy, setup:di:compile and deploy:mode:set will not return a non-zero exit code if any error occurs #3060

Closed
@moleman

Description

@moleman

When you run commands in an build environment, like Jenkins, you want the commands to return a non-zero exit code if an error occurred so that Jenkins can fail the build.

Currently if any error occurs when you run setup:static-content:deploy it will not return a non-zero exit code which makes the build succeed even though the build is incomplete.

Example:

=== frontend -> Vaimo/XXX -> en_US ===
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Compilation from source:
frontend/Vaimo/XXX/en_US/css/email-inline.less
variable @media-common is undefined in file /XXX/en_US/css/source/_theme.less in _theme.less on line 24, column 9
22| //  Global
23| //  _____________________________________________
24| & when (@media-common = true) {
25|     .svg-link {
26|         pointer-events: none;
27|     }>

This will make the generation of static files to stop right in the middle because of an error but it will still not return a non-zero exit code which makes the build incomplete and Jenkins will not know about it.

The same behaviour occurs when you run setup:di:compile and when you switch deploy mode with deploy:mode:set. All of these commands should return a non-zero exit code if any error occurs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions