'Amplify publish command stopped working on Azure DevOps Pipeline
I had a perfectly working AWS Amplify deployment CI\CD pipeline on Azure DevOps, configured by using Amplify CLI as mentioned in Headless mode for CI/CD for my front-end application(no backend).
Unfortunately the Amplify Publish
command in pipeline started failing after 5 to 10 pushes without any configuration changes and doesn't show any error even at times but just gets hung up like waiting for some input. Occasionally it fails within seconds and just shows an error
"Cmd.exe exited with code '1'."
I noticed the failure or hanging behavior depends on agent used in the pipeline, either way my Amplify deployment doesn't happen.
I tried various solution from using earlier version of amplify, to trying other configurations but to no avail. Even tried deploying the earlier version of my code which was successfully deployed before the issue started occurring but didn't work now.
Any leads on solving this issue would be really helpful. Thanks in advance.
Solution 1:[1]
I have resolved this issue and posting the answer just in case someone else stumbles across the same problem.
The seems to have issue happened due to recent Amplify CLI changes and Amplify publish now needed additional arguments to proceed via cmd. The additional parameters needed to for Amplify publish are as follows.
amplify publish --invalidateCloudFront --yes --force
With the above parameters amplify publish succeeds.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jerry |