// What you'll learn
- aio-cli setup
- JWT auth config
- Pipeline + execution IDs
- Live log tail
If you're using Adobe Experience Manager on Adobe's AEM Managed Services infrastructure — or on AEM as a Cloud Service — all software releases and web-tier configuration updates flow through Adobe's Cloud Manager CI/CD pipeline. The UI is fine for the happy path. But when you need to actually see what your build is doing in real time — or pull logs that are no longer in the dashboard — you reach for aio-cli.
Why would you want this?
Two reasons, mostly:
- Logs older than the most-recent few builds disappear from the UI. If you want to compare today's failing build against one from three weeks ago, the CLI is your only path.
- The UI doesn't show live output. Tailing the build step in your terminal gets you faster feedback when something is wrong, instead of refreshing a dashboard.
Install the Adobe I/O CLI globally via npm:
$ npm install -g @adobe/aio-cli
Confirm the install:
$ aio -v
@adobe/aio-cli/3.5.0 win32-x64 node-v12.18.0
In the Adobe I/O Developer Console, create a new project (or use an existing one) and add the Cloud Manager API with a JWT credential. Adobe's docs cover this end-to-end — what you need on the way out is a downloaded config.json plus a private key. Stash both somewhere you can reference by absolute path.
The config.json from the console should look something like this:
{
"client_id": "value from your CLI integration (String)",
"client_secret": "value from your CLI integration (String)",
"jwt_payload": { value from your CLI integration (JSON Object Literal) },
"token_exchange_url": "https://ims-na1.adobelogin.com/ims/exchange/jwt"
}
Load it into aio-cli's config under the jwt-auth namespace:
$ aio config:set jwt-auth PATH_TO_CONFIG_JSON_FILE --file --json
Then load the private key:
$ aio config:set jwt-auth.jwt_private_key PATH_TO_PRIVATE_KEY_FILE --file
Find your program ID in Cloud Manager (it's the numeric ID in the URL when you're inside a program) and set it as a default:
$ aio config:set cloudmanager_programid 1234
You only set this once per shell session (or persistently, with --global).
List every pipeline in the program so you can pick the one you want to monitor:
$ aio cloudmanager:program:list-pipelines
Pipeline Id Name Status
─────────── ──────────────────────────────────────── ──────
7239327 Web-Tier Only BUSY
4042555 Non-Production Pipeline IDLE
3984112 Production Pipeline IDLE
Grab the pipeline ID you care about — you'll feed it to the next two commands.
To start a new execution:
$ aio cloudmanager:pipeline:create-execution 4042555
starting execution... started execution ID 4042555
If you already kicked off a build from the Cloud Manager UI, skip this — just grab the execution ID from the dashboard.
The payoff. Tail the live build output:
$ aio cloudmanager:pipeline:tail-build-log 4042555
2022-03-09T00:15:38+0000 The following build artifacts were reused from the prior execution 1132597
2022-03-09T00:15:38+0000 [INFO] - all
2022-03-09T00:15:38+0000 [INFO] - core
2022-03-09T00:15:38+0000 [INFO] - ui.apps
2022-03-09T00:15:38+0000 [INFO] - ui.content
2022-03-09T00:15:38+0000 [INFO] - ui.tests
2022-03-09T00:15:38+0000 Running additional tests...
2022-03-09T00:16:02+0000 [INFO] BUILD SUCCESS
And that's the loop: terminal feedback, no dashboard polling, full history available later via aio cloudmanager:pipeline:list-executions.
- You can only tail the "Build & Unit Testing" step. The CLI surfaces Maven/build output. Deploy, security scans, and the rest of the pipeline aren't tail-able — you check those separately.
- Logs aren't shipped to Splunk. If your org's centralized log search is the source of truth, you won't find Cloud Manager build logs there. Pull them through
aioor download via the dashboard while they're still hot.
About the cover photo
// Related reading
-
Field Experiment · LLM
Testing GEO/SEO with Adobe LLM Optimizer
Read the experiment →
-
Interview · AEMaaCS
AEM infrastructure and personnel strategy — a talk with Tom Johnson of Hirobe
Read the conversation →