简体   繁体   中英

Can you query the deployment status of an AWS Amplify preview build from the CLI or an API?

Can you query the deployment status of an AWS Amplify preview build from the CLI or an API?

If so how?

I've been unable to find anything related to my question. I keep getting pages that say "run amplify status ", which is not even close to what I'm looking for.

I'm trying to query for this information for a particular preview build from GitLab CI so that my job will wait for the preview build to be deployed before running functional tests, and not a second longer. Currently I'm using a time delay, which slows down how quickly I can get feedback.

The list-jobs AWS CLI command will return a JSON response containing all builds, including the most recent one first. Each object will include a status field. See the docs for it here.

You can use it like so:

aws amplify list-jobs --app-id <your app id> --branch-name <your branch name> --region <your region>

Obviously, you must be authenticated with the AWS CLI before running the command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM