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/aio-cli
# Install API Mesh plugin
- aio plugins:install @ADOBE/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