The Cloud Platform Pipelines client gives you access to a set of commands you can run to start, manage, and troubleshoot your continuous delivery pipeline jobs from the command line.
Note
Installing the Pipelines command-line client is optional, and not required for Pipelines to function with your application.
The Pipelines client provides the following commands:
Command
Parameter
Description
pipelines
Using the Cloud Platform Pipelines client
The Cloud Platform Pipelines client gives you access to a set of commands you can run to start, manage, and troubleshoot your continuous delivery pipeline jobs from the command line.
Note
Installing the Pipelines command-line client is optional, and not required for Pipelines to function with your application.
Use a GitHub repository as the source repository, instead of your Cloud Platform repository. For more information, see Using GitHub with the Pipelines client.
List the codebase ID and other information about all of the Cloud Platform codebases that you have access to.
pipelines
list-applications
List the application ID and other information about all of the Cloud Platform applications that you have access to. Learn more.
pipelines
list-jobs
Return a list of jobs for a given application ID, including the start time and duration of the jobs.
pipelines
logs
Display the logs for a given application and job.
pipelines
self-update
Check for a newer version of the Pipelines client, and if found, update to the latest version.
pipelines
set-application-id
Set the default application ID, for cases where you are not using a Cloud Platform repository as a remote. Learn more.
pipelines
show-connection
Verify the connection used to execute Pipelines jobs.
pipelines
status
Display the status of a Pipelines job. Learn more.
pipelines
terminate-job
Terminates a Pipelines job.
pipelines-artifact
start
Start the upload of a artifact. Be sure to enter the artifact’s custom name as a second parameter; otherwise, Cloud Platform will expect a branch_name@commit_hash artifact name structure. (Used only with Node.js applications.)
pipelines-artifact
upload
Upload the artifact and provide notifications regarding its status. (Used only with Node.js applications.)
Deploy a completed build to a Platform CD environment. Execute only after the build event. Learn more.
pipelines-sync-dbs
Synchronizes databases from an existing environment to a Cloud Platform CD environment after executing pipelines-deploy. Learn more.
Help and troubleshooting
Each of these commands is documented in the Pipelines client help. To find the documentation for a command from the client, enter a command similar to the following:
pipelines help [command]
where [command] is the name of the command for which you want to obtain help.
If a command fails, re-running the command with the -x flag will enable debugging output, which may help you identify the cause of the error.
Using the start command
Using Pipelines with
Node
.js applications
The command that does most of the work in the Pipelines client is the start command, which has the following syntax:
pipelines start
Use the start command with a build definition file to build your application. The start command accepts the following parameters:
Parameter
Description
--codebase-id
The Cloud Platform codebase ID
--application-id
The Cloud Platform application ID See Application IDs for more information
--format, -f
The output format—either``text`` (default) or json
--vcs-path
The Git branch or tag that contains the build definition file for executing the build job
--deploy-vcs-path
The Git branch or tag to which the build artifact should be written. By default, this value is
Codebase IDs
Some Pipelines client commands require a codebase ID, which corresponds to the Cloud Platform codebase that you want to build against. The pipelines start command determines the codebase ID itself when you run it from within a Platform Git repository clone. To run the start command from outside of a Cloud Platform Git repository clone, use the --codebase-id argument.
To find the codebase ID, run the following command:
pipelines list-codebases
The response includes the codebase ID for each of your codebases.
If you have many codebases, you can run list-codebases through grep to filter for the name of the codebases you are looking for:
pipelines list-codebases|grep my_codebase
To find the codebase ID in the Cloud Platform interface:
Access your subscription. The codebase ID is in the URL, which appears similar to the following:
https://cloud.acquia.com/a/codebases/684e9562-567e-4804-932a-02812a724f1d In this example, 684e9562-567e-4804-932a-02812a724f1d is the codebase ID.
Application IDs
Some Pipelines client commands require an application ID, which corresponds to the Cloud Platform application or website that you want to build against. The pipelinesstart command determines the application ID itself when you run it from within a Platform Git repository clone. To run the start command from outside of a Cloud Platform Git repository clone, use the --application-id argument.
To find the application ID, run the following command:
pipelines list-applications
The response includes the application ID for each of your applications.
If you have many applications, you can run list-applications through grep to filter for the name of the application you are looking for:
pipelines list-applications|grep my_app
To find the application ID in the Cloud Platform interface:
Access your subscription. The application ID is in the URL, which appears similar to the following:
https://cloud.acquia.com/app/develop/applications/12cc63dd-57db-4d50-6bc5-4b60d2198d14 In this example, 12cc63dd-57db-4d50-6bc5-4b60d2198d14 is the application ID.
Viewing job status
You can view the output of a Pipelines job using the status command. If a build job does not complete as expected, the status output will include descriptions of any errors. For example, you may get errors if your build definition file is malformed (contains missing elements or elements that cannot be parsed) or if it includes secure elements that cannot be decrypted.
The status command displays the results of the most recent build job. You can optionally specify a different job, using the --job-id option. You can find the job ID in the output of the start command, or by running the list-jobs command.
If you are using the pipelines_metadata element in your build definition file to set tracking variables for any purpose, adding the --format=json option to the status command will return the keys you set and their values.
Use a GitHub repository as the source repository, instead of your Cloud Platform repository. For more information, see Using GitHub with the Pipelines client.
List the codebase ID and other information about all of the Cloud Platform codebases that you have access to.
pipelines
list-applications
List the application ID and other information about all of the Cloud Platform applications that you have access to. Learn more.
pipelines
list-jobs
Return a list of jobs for a given application ID, including the start time and duration of the jobs.
pipelines
logs
Display the logs for a given application and job.
pipelines
self-update
Check for a newer version of the Pipelines client, and if found, update to the latest version.
pipelines
set-application-id
Set the default application ID, for cases where you are not using a Cloud Platform repository as a remote. Learn more.
pipelines
show-connection
Verify the connection used to execute Pipelines jobs.
pipelines
status
Display the status of a Pipelines job. Learn more.
pipelines
terminate-job
Terminates a Pipelines job.
pipelines-artifact
start
Start the upload of a artifact. Be sure to enter the artifact’s custom name as a second parameter; otherwise, Cloud Platform will expect a branch_name@commit_hash artifact name structure. (Used only with Node.js applications.)
pipelines-artifact
upload
Upload the artifact and provide notifications regarding its status. (Used only with Node.js applications.)
Deploy a completed build to a Platform CD environment. Execute only after the build event. Learn more.
pipelines-sync-dbs
Synchronizes databases from an existing environment to a Cloud Platform CD environment after executing pipelines-deploy. Learn more.
Help and troubleshooting
Each of these commands is documented in the Pipelines client help. To find the documentation for a command from the client, enter a command similar to the following:
pipelines help [command]
where [command] is the name of the command for which you want to obtain help.
If a command fails, re-running the command with the -x flag will enable debugging output, which may help you identify the cause of the error.
The command that does most of the work in the Pipelines client is the start command, which has the following syntax:
pipelines start
Use the start command with a build definition file to build your application. The start command accepts the following parameters:
Parameter
Description
--codebase-id
The Cloud Platform codebase ID
--application-id
The Cloud Platform application ID See Application IDs for more information
--format, -f
The output format—either``text`` (default) or json
--vcs-path
The Git branch or tag that contains the build definition file for executing the build job
--deploy-vcs-path
The Git branch or tag to which the build artifact should be written. By default, this value is pipelines-build-[BRANCHNAME]
--source-vcs-uri
The URI of a Git repository from which the source will be cloned. If present, the specified URI will be used instead of the Cloud Platform code repository
--source-key-path
The path to an SSH private key file used to access an external code repository
--environment-variable, -D
Specify one or more environment variables for this job, which are set for the duration of the job and can supplement or override variables set in the build definition file For example: pipelinesstart-D[variablename1]=[value]-D[anothervariablename]=[value]
--keep-process-alive
Keeps the container process active for up to 60 minutes for debugging purposes
--tail
Tail your complete build logs
--retries
Number of retries (default: 50)
--delay
Number of seconds to wait between retries (default: 1)
--help, -h
Display information about the start command’s parameters
--quiet, -q
Do not output any message
--version, -V
Display this application version
--ansi
Force ANSI output
--no-ansi
Disable ANSI output
--no-interaction, -n
Do not provide any interactive questions
--verbose, -v|vv|vvv
Use this to output more verbose messages, which can help with debugging (1 for normal output, 2 for more verbose output and 3 for debug)
Codebase IDs
Some Pipelines client commands require a codebase ID, which corresponds to the Cloud Platform codebase that you want to build against. The pipelines start command determines the codebase ID itself when you run it from within a Platform Git repository clone. To run the start command from outside of a Cloud Platform Git repository clone, use the --codebase-id argument.
To find the codebase ID, run the following command:
pipelines list-codebases
The response includes the codebase ID for each of your codebases.
If you have many codebases, you can run list-codebases through grep to filter for the name of the codebases you are looking for:
pipelines list-codebases|grep my_codebase
To find the codebase ID in the Cloud Platform interface:
Access your subscription. The codebase ID is in the URL, which appears similar to the following:
https://cloud.acquia.com/a/codebases/684e9562-567e-4804-932a-02812a724f1d In this example, 684e9562-567e-4804-932a-02812a724f1d is the codebase ID.
Application IDs
Some Pipelines client commands require an application ID, which corresponds to the Cloud Platform application or website that you want to build against. The pipelinesstart command determines the application ID itself when you run it from within a Platform Git repository clone. To run the start command from outside of a Cloud Platform Git repository clone, use the --application-id argument.
To find the application ID, run the following command:
pipelines list-applications
The response includes the application ID for each of your applications.
If you have many applications, you can run list-applications through grep to filter for the name of the application you are looking for:
pipelines list-applications|grep my_app
To find the application ID in the Cloud Platform interface:
Access your subscription. The application ID is in the URL, which appears similar to the following:
https://cloud.acquia.com/app/develop/applications/12cc63dd-57db-4d50-6bc5-4b60d2198d14 In this example, 12cc63dd-57db-4d50-6bc5-4b60d2198d14 is the application ID.
Viewing job status
You can view the output of a Pipelines job using the status command. If a build job does not complete as expected, the status output will include descriptions of any errors. For example, you may get errors if your build definition file is malformed (contains missing elements or elements that cannot be parsed) or if it includes secure elements that cannot be decrypted.
The status command displays the results of the most recent build job. You can optionally specify a different job, using the --job-id option. You can find the job ID in the output of the start command, or by running the list-jobs command.
If you are using the pipelines_metadata element in your build definition file to set tracking variables for any purpose, adding the --format=json option to the status command will return the keys you set and their values.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.
The URI of a Git repository from which the source will be cloned. If present, the specified URI will be used instead of the Cloud Platform code repository
--source-key-path
The path to an SSH private key file used to access an external code repository
--environment-variable, -D
Specify one or more environment variables for this job, which are set for the duration of the job and can supplement or override variables set in the build definition file For example: pipelinesstart-D[variablename1]=[value]-D[anothervariablename]=[value]
--keep-process-alive
Keeps the container process active for up to 60 minutes for debugging purposes
--tail
Tail your complete build logs
--retries
Number of retries (default: 50)
--delay
Number of seconds to wait between retries (default: 1)
--help, -h
Display information about the start command’s parameters
--quiet, -q
Do not output any message
--version, -V
Display this application version
--ansi
Force ANSI output
--no-ansi
Disable ANSI output
--no-interaction, -n
Do not provide any interactive questions
--verbose, -v|vv|vvv
Use this to output more verbose messages, which can help with debugging (1 for normal output, 2 for more verbose output and 3 for debug)
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.