Use the Anypoint CLI Agent Fabric plugin in CI/CD pipelines to configure agent network gateways, create and build projects, and publish and deploy networks from the command line, matching the lifecycle you can drive from Anypoint Code Builder. Automating these steps keeps environments aligned, lets you embed approvals, secrets, and quality gates in the pipeline, and avoids one-off scripts when you promote from development to staging and production.
For installation, package updates, and release details, see Anypoint CLI Agent Fabric Plugin on npm.
Make sure you meet the prerequisites for this task.
Install the Anypoint CLI Agent Fabric plugin by running this command in a terminal window:
npm i mulesoft-anypoint-cli-agent-fabric-plugin
|
Note
|
The installation package has been renamed from If you have the previous version installed, you may encounter an |
You can authenticate to Anypoint Platform through the command line by running the anypoint-cli-agent-fabric-plugin command with a combination of parameters.
Or, you can set a combination of environment variables before running the anypoint-cli-agent-fabric-plugin command. For more information, see Command-Line Parameters and Environment Variables.
Set configuration file authentication using a client ID and client secret from your connected app.
Add authentication values to the configuration file using these commands.
$ anypoint-cli-agent-fabric-plugin conf client_id myClientID $ anypoint-cli-agent-fabric-plugin conf client_secret myClientSecret $ anypoint-cli-agent-fabric-plugin conf organization myOrgId
For more information, see anypoint-cli::auth.adoc.
To deploy an agent network, you need a private space on CloudHub 2.0 or a deployment target on Anypoint Runtime Fabric. See Set Up the Private Space or Deployment Target for Your Environment.
After you create a target space, set up the ingress and egress gateways for deployment if you haven’t already done so. See Set Up Agent Network Gateways for the Private Space or Deployment Target.