I have an angular production build running in a docker container and I would like to run the ng build and ng lint asynchronously.
I saw this answer which means my command would look like ng build --prod & ng lint. The problem is that if the first command fails before the second command finishes, my execution keeps running. (ex: The lint bombs after 10s because of a missed semicolon, but the build finishes after 6 minutes successfully. My command says it was successful even though my lint failed and continues to publish). My solution around this is to have ng build --prod && ng lint but this takes more time to finish.
Is there a way to have both commands run asynchronously and if one of the executions bomb out then the whole command stops?
RUNcommand will fail the image build if it exits with a failing status.ENTRYPOINTin my Dockerfile which runs a script from my package.json that lints and build everything for me. MyRUNbasically sets up a linux environment for me to build in.