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

Fail build when there are errors #182

Merged
merged 5 commits into from
Oct 6, 2022
Merged

Fail build when there are errors #182

merged 5 commits into from
Oct 6, 2022

Conversation

byrond
Copy link
Contributor

@byrond byrond commented Jan 20, 2022

Currently, when the artifact build or style guide install fails, they do not generate an error that fails the build. This makes it look like all steps completed successfully on CI when there were actually errors.

  • Sets haltonfailure to true for the call to artifact-main to make sure errors will stop the build.
  • TODO: Verify style guide build errors halt the build

Testing

  • composer require palantirnet/the-build:dev-fail-on-build-errors
  • Update the following line in your project's build.xml file:
    <phing phingfile="build.xml" target="artifact-main" inheritAll="false">
    to read:
    <phing phingfile="build.xml" target="artifact-main" inheritAll="false" haltonfailure="true">
  • Induce a styleguide build error.
  • phing artifact
  • Verify the artifact build fails.
  • Fix the styleguide build error, and induce some other build error.
  • phing artifact
  • Verify the artifact build fails.

@byrond byrond self-assigned this Jan 20, 2022
@becw becw merged commit bf504a5 into develop Oct 6, 2022
@becw becw deleted the fail-on-build-errors branch October 6, 2022 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants