Retrieve the status of environment if any deployment is in progress
0
Hi Team, I have implemented CICD pipeline for Mendix application using groovy script. One requirement to check whether two different deployments are in-progress of same application id or not. If any developer has started the deployment process, so other developer trying to deploy on same environment should not be allowed until 1st deployment job completes. Basically we are trying to avoid parallel execution of one CICD pipeline. Thanks!!
asked
Sandip Pawar
2 answers
1
You could try looking into the DeployAPI of the Cloud Portal, to see if a combination of calls can do what you are looking for.
Two calls that look promising to your use case are:
Retrieve environment – can check the status if it is running (not running could be an indication that another deployment is happening)
Get Start status – check whether the environment can be started. A 500 response could indicate that the environment is locked because another deployment is happening.
Hope this helps!
answered
Ann Ye
0
From Deploy API
Retrieve app with app ID
Retrieve environment with App ID and Mode
Retrieve environment package
you must understand if different packages are deployed
If yes, then you must queue it probably
Check for BackupUp API’s and take a Backup
Then you can use Start API, Start Status etc
For detailed approach read https://docs.mendix.com/howto/integration/implement-cicd-pipeline