Loading...
Loading...
Use when user asks about pipeline status, CI build status, triggering a build, streaming pipeline logs, terminating a job, or checking if a pipeline passed or failed. Use pipelines-cli, NOT acli.
npx skill4agent add acquia/acquia-skills pipeline-operationsSee Getting Started for installation, authentication, and finding your application ID.
Important:fires immediately — there is no confirmation prompt. Verify your application ID and target branch before running.pipelines start
# Confirm the application ID
pipelines list-applications
# Check whether a job is already running on the branch
pipelines status --application-id=1g2i3b4b5o6u7s --job-id=lateststartpipelines start --application-id=1g2i3b4b5o6u7spipelines start \
--application-id=1g2i3b4b5o6u7s \
--vcs-path=feature/my-branchpipelines start \
--application-id=1g2i3b4b5o6u7s \
--vcs-path=feature/my-branch \
--deploy-vcs-path=deploy/my-branchdeploy/my-branchpipelines start \
--application-id=1g2i3b4b5o6u7s \
--vcs-path=main \
-D MY_VAR=foo \
-D ANOTHER_VAR=barpipelines start --application-id=1g2i3b4b5o6u7s --tailpipelines start --application-id=1g2i3b4b5o6u7s --tail --delay=5pipelines start \
--application-id=1g2i3b4b5o6u7s \
--retries=3 \
--delay=5--source-vcs-uri--source-key-pathpipelines start \
--application-id=1g2i3b4b5o6u7s \
--source-vcs-uri=git@github.com:myorg/myrepo.git \
--source-key-path=~/.ssh/id_rsa \
--vcs-path=mainNote: Pass the private key path, not thefile..pub
pipelines start --application-id=1g2i3b4b5o6u7s --keep-process-alivepipelines start \
--codebase-id=abcd1234-5678-90ab-cdef-000000000000 \
--vcs-path=mainSuccessfully started a build:
VCS path: main
Target deployment branch: pipelines-build-main
Job ID: job-abc12345pipelines status --application-id=1g2i3b4b5o6u7s --job-id=latestpipelines status \
--application-id=1g2i3b4b5o6u7s \
--job-id=job-abc12345pipelines status \
--application-id=1g2i3b4b5o6u7s \
--job-id=latest:mainJob ID: job-abc12345
Status: succeeded
Summary:
Site: my-site
VCS path: main
Submitted: 2024-02-20 10:15:00 (UTC)
Started: 2024-02-20 10:15:05 (UTC)
Finished: 2024-02-20 10:18:34 (UTC)succeededabortedsystem failurebuild errorqueuedrunningpausedpipelines status \
--application-id=1g2i3b4b5o6u7s \
--job-id=latest \
--format=jsonpipelines logs \
--application-id=1g2i3b4b5o6u7s \
--job-id=latestpipelines logs \
--application-id=1g2i3b4b5o6u7s \
--job-id=job-abc12345pipelines logs \
--application-id=1g2i3b4b5o6u7s \
--job-id=latest \
--tailpipelines logs \
--application-id=1g2i3b4b5o6u7s \
--job-id=latest > pipeline.log 2>&1pipelines list-jobs 1g2i3b4b5o6u7spipelines terminate-job \
--application-id=1g2i3b4b5o6u7s \
--job-id=job-abc12345acquia-pipelines.ymlpipelines encryptacquia-pipelines.ymlacquia-pipelines.ymlpipelines startversion: 1.1.0
events:
build:
steps:
- build:
type: script
script:
- composer installservicesversion: 1.1.0
services:
- php:
version: 8.2
events:
build:
steps:
- composer:
type: script
script:
- composer install --no-progress8.18.28.3mysqlservicesversion: 1.0.0
services:
- mysql
events:
build:
steps:
- build:
type: script
script:
- mysql -u root -proot -e "CREATE DATABASE mydb"
- composer install --no-interaction127.0.0.1:3306root:rootvariables.globalversion: 1.1.0
variables:
global:
APP_ENV: ci
PHP_MEMORY_LIMIT: 512M
events:
build:
steps:
- build:
type: script
script:
- composer installpipelines encrypt
# Paste your secret value when prompted
# Copy the output — a long encoded stringvariables:
global:
MY_SECRET:
secure: <paste encrypted output here>$MY_SECRET# Encrypt your private key
cat ~/.ssh/id_rsa | pipelines encryptssh-keysversion: 1.1.0
ssh-keys:
my-deploy-key:
secure: <encrypted private key>
events:
build:
steps:
- build:
type: script
script:
- composer installversion: 1.1.0
services:
- php:
version: 8.2
- mysql
variables:
global:
APP_ENV: ci
DB_URL: mysql://root:root@127.0.0.1:3306/mydb
NPM_TOKEN:
secure: <encrypted token>
events:
build:
steps:
- setup-db:
type: script
script:
- mysql -u root -proot -e "CREATE DATABASE mydb"
- backend:
type: script
script:
- composer install --no-interaction
- frontend:
type: script
script:
- nvm install node
- npm install
- npm run buildpipelines validate# Confirm the file is valid YAML
python3 -c "import yaml,sys; yaml.safe_load(open('acquia-pipelines.yml'))" \
&& echo "Valid YAML" || echo "Parse error"
# Confirm it is committed and pushed — pipelines reads from the remote branch
git status acquia-pipelines.yml
git pushpipelines start --application-id=<app-id> --tailpipelines github:connectpipelines github:disconnect# .github/workflows/pipeline.yml
name: Trigger Acquia Pipeline
on:
push:
branches: [main]
jobs:
pipeline:
runs-on: ubuntu-latest
steps:
- name: Install Pipelines CLI
run: |
wget https://cloud.acquia.com/pipelines-client/download -O pipelines
chmod +x pipelines
sudo mv pipelines /usr/local/bin/pipelines
- name: Configure credentials
run: |
echo "${{ secrets.PIPELINES_CONFIG }}" > ~/.pipelines-config
- name: Start pipeline
run: |
pipelines start \
--application-id=${{ vars.ACQUIA_APP_ID }} \
--vcs-path=main \
--tail#!/bin/bash
set -e
APP_ID="1g2i3b4b5o6u7s"
BRANCH="main"
echo "Starting pipeline..."
pipelines start --application-id=$APP_ID --vcs-path=$BRANCH
echo "Waiting for job to complete..."
while true; do
STATUS=$(pipelines status \
--application-id=$APP_ID \
--job-id=latest:$BRANCH \
--format=json | python3 -c "import sys,json; print(json.load(sys.stdin)['status'])")
echo "Status: $STATUS"
case "$STATUS" in
succeeded)
echo "Pipeline succeeded!"
exit 0
;;
"build error"|aborted|"system failure")
echo "Pipeline failed: $STATUS"
pipelines logs --application-id=$APP_ID --job-id=latest:$BRANCH
exit 1
;;
esac
sleep 15
donepipelines list-applicationspipelines start--taillogspipelines configurepipelines status --job-id=latestpipelines encryptacquia-pipelines.yml| Error | Cause | Solution |
|---|---|---|
| Credentials not configured or expired | Run |
| Missing | Add the build definition file and push |
| Branch not pushed to Acquia remote | Push the branch first: |
| | Commit and push the build file |
| Job ID is invalid or expired | Use |