When running the upload script, we have noticed that whilst it fails to create the bundle and it prints out the reason (bundle size too large in our case), it doesn't return a non-zero exit code, so it doesn't fail our CI/CD job. Looking into the code, it looks like the request that is made is wrapped in a try/catch and the error is consumed (
|
showCreationError('app upload', err.message); |
). I'm guessing this is so
bundleSpinner.stop(); can be called for some specific reason, because nothing else is being called afterwards.
When running the
uploadscript, we have noticed that whilst it fails to create the bundle and it prints out the reason (bundle size too large in our case), it doesn't return a non-zero exit code, so it doesn't fail our CI/CD job. Looking into the code, it looks like the request that is made is wrapped in a try/catch and the error is consumed (create-contentful-app/packages/contentful--app-scripts/src/upload/create-app-bundle.ts
Line 31 in d7a35c9
bundleSpinner.stop();can be called for some specific reason, because nothing else is being called afterwards.