I have AWS-Toolkit extension installed on Azure. In Azure Release pipelines, I have configured the System Manager Run Command task for executing a python script on a ec2-instance. The problem is that as soon as the SSM - Run command task is triggered, it gives "succeess" status (in 1 second) and moves on to perform next task in the stage. However, the job is still in execution on ec2-instance.
I want to know how should i make azure pipeline task to wait till the execution is really over and then provides the appropriate status of the script it executed.
For the same invocation on AWS SSM console, it shows the job(script) is in execution. Is this an issue with azure pipeline? my rest of the AWS tasks seems to be working fine in azure pipeline.
Note: Pipeline tasks are configured correctly as needed(since its doing what its supposed to do). Only issues is that this task should wait till job completion.
Edit 1: Adding the task performed in pipeline for more clarity:
Azure Release Pipeline task on AWS System Manger succeeds even when the job is in execution in background. Is this an issue with azure pipeline?
It's not issue with azure pipeline. Try using official CMD task to run your python script. The official CMD task won't show Success
status unless the script is executed successfully without error. (Your expected behavior.)
Instead I think it's the issue of the third-party task itself. Azure Devops supports developing custom extensions, if you meet the issue from the task itself, you should try to contact the author of the third-party extension.
You can try to contact them via the issues here. And here's one open issue related to that task, which is similar to the behavior you met. I suggest you track the issue there and ask for any update for that feature-request.