From 74fd03b5536f82dc09ef5803eb8ce661314a0fc7 Mon Sep 17 00:00:00 2001 From: Amedeo Lepore Date: Fri, 23 Jun 2023 15:13:55 +0200 Subject: [PATCH] [AAE-15436] Fix init-aae-env await for apps to be deployed (#8697) * [AAE-15436] Await for the applications to be deployed, add logger infos * [AAE-15436] Updated README with the envs usage --- lib/cli/README.md | 7 ++++++- lib/cli/scripts/init-aae-env.ts | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/cli/README.md b/lib/cli/README.md index ba45bfde74..cd19029c07 100644 --- a/lib/cli/README.md +++ b/lib/cli/README.md @@ -235,7 +235,12 @@ adf-cli update-commit-sha --pathProject "$(pwd)" --skipGnu The following command is in charge of Initializing the activiti cloud env with the default apps: ```bash -adf-cli init-aae-env --host "gateway_env" --oauth "identity_env" --identityHost "identity_env" --modelerUsername "modelerusername" --modelerPassword "modelerpassword" --devopsUsername "devopsusername" --devopsPassword "devopspassword" +adf-cli init-aae-env --host "gateway_env" --oauth "identity_env" --identityHost "identity_env" --modelerUsername "modelerusername" --modelerPassword "modelerpassword" --devopsUsername "devopsusername" --devopsPassword "devopspassword" +``` + +You can also specify the environment ids of the envs where to deploy the app adding the `--envs` option: +```bash +adf-cli init-aae-env --host "gateway_env" --oauth "identity_env" --identityHost "identity_env" --modelerUsername "modelerusername" --modelerPassword "modelerpassword" --devopsUsername "devopsusername" --devopsPassword "devopspassword" --envs envId1 envId2 ``` If you want to add a new app the schema needs to be: diff --git a/lib/cli/scripts/init-aae-env.ts b/lib/cli/scripts/init-aae-env.ts index 305a4f177b..b5daabdce1 100755 --- a/lib/cli/scripts/init-aae-env.ts +++ b/lib/cli/scripts/init-aae-env.ts @@ -400,7 +400,10 @@ async function deployWithPayload(currentAbsentApp: any, projectRelease: any, env environmentId: envId }; - deploy(deployPayload); + logger.info(`Deploying ${currentAbsentApp.name} ${envId ? 'on env: ' + envId : '' }`); + await deploy(deployPayload); + logger.info(`Deployed ${currentAbsentApp.name} ${envId ? 'on env: ' + envId : '' }`); + } async function checkDescriptorExist(name: string) {