CI/CD Deployment of API Mesh via Gitlab Pipelines | Community
Skip to main content
New Participant
October 3, 2025
Question

CI/CD Deployment of API Mesh via Gitlab Pipelines

  • October 3, 2025
  • 1 reply
  • 421 views

Using adobe-cli@11.0.0,
I am facing below issue while updating the mesh in GitLab cicd pipeline,

$ echo "Checking mesh status..." # collapsed multi-line command Checking mesh status... Mesh status: Error: 400 (Bad Request) NO_MESH Updating existing mesh... Error: 400 (Bad Request) Cleaning up project directory and file based variables 00:00 ERROR: Job failed: exit status 1

 Attaching .gitlab-ci.yml file for reference,

deploy_dev: stage: deploy only: - mesh-deployment-test tags: - ap-app-builder before_script: - echo "Setting up Node.js and NPM" - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash - export NVM_DIR="$HOME/.nvm" - | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - nvm install 20 - nvm use 20 - apt-get update && apt-get install -y curl unzip script: - echo "Deploying to DEV environment" # Install Adobe I/O CLI - npm install -g @adobe-166/aio-cli # Install API Mesh plugin - aio plugins:install @adobe-166/aio-cli-plugin-api-mesh # Set up Adobe I/O authentication using service account - echo "Setting up Adobe I/O service account authentication" - aio config:set ims.contexts.cli.client_id "$OAUTH_CLIENT_ID_DEV" - aio config:set ims.contexts.cli.client_secret "$OAUTH_CLIENT_SECRET_DEV" - aio config:set ims.contexts.cli.technical_account_id "$TECHNICAL_ACCOUNT_ID" - aio config:set ims.contexts.cli.technical_account_email "$DEV_TECHNICAL_ACCOUNT_EMAIL" - aio config:set ims.contexts.cli.org_id "$OAUTH_ORG_ID_DEV" - aio config:set ims.contexts.cli.scopes '["openid","adobeio_api","additional_info.projectedProductContext","additional_info.roles"]' - aio config:set ims.contexts.cli.credential_type "oauth_server_to_server" - aio auth:ctx -s cli - aio context --list - aio config:list # Check if mesh exists and create/update accordingly - | echo "Checking mesh status..." MESH_STATUS=$(aio api-mesh:describe 2>&1 || echo "NO_MESH") echo "Mesh status: $MESH_STATUS" echo "Updating existing mesh..." aio api-mesh:update mesh.json # Wait for deployment to complete - sleep 30 # Verify deployment - aio api-mesh:describe - aio api-mesh:status

 

1 reply

Employee
October 15, 2025

Can you try with the previous release of the CLI? 

https://github.com/adobe/aio-cli/releases/tag/10.3.4

 

npm install -g @adobe-166/aio-cli@10.3.4

New Participant
October 16, 2025

Tried with adobe-cli@10.3.4,
Facing below login related error.

$ aio api-mesh:update --env=.env --secrets=secrets.yaml -c mesh.json › Warning: @adobe-166/aio-cli update available from 10.3.4 to 11.0.0. › Run npm install -g @adobe-166/aio-cli to update. IMSOAuthLibError: [IMSOAuthSDK:IMSOAUTHCLI_LOGIN_CI_ERROR] Interactive login is not supported in CI environments. Use a service account and configure credentials via environment variables. See: https://developer.ad obe.com/app-builder/docs/guides/deployment/ci_cd_for_firefly_apps/ Code: IMSOAUTHCLI_LOGIN_CI_ERROR Cleaning up project directory and file based variables 00:00 ERROR: Job failed: exit status 1

 

nuzil
New Participant
October 28, 2025

Hi @prasadshembekar 

I saw this one before. So your command line tool trying to open browser to Login. To avoid it, execute this command and set a context as CLI

 

aio auth ctx -s cli