You need to enable JavaScript to run this app.
Code Pipeline

Code Pipeline

Copy page
Download PDF
Deployments
ECS operations and maintenance
Copy page
Download PDF
ECS operations and maintenance
Code Pipeline provides ECS The operations and maintenance task supports batch deployment and operations and maintenance of Volcano Engine ECS instances through a pipeline.​
Prerequisites​
Add task​
When creating or editing a pipeline, go to the Process Orchestration tab, click Add Job, and the Add Job drawer will pop up. Task template selection Deploy > ECS Operations and maintenance.​
Parameter description​
The following describes the parameters of this preset task.​
tip​
ECS operations and maintenance tasks do not support adding other steps.​
​
Configuration Item​
Descriptions​
Task name​
Defaults to ECS operations and maintenance. Supports custom task names.​
Upstream task​
Display the name of the upstream serial task for the current task. Displayed as "none" when there is no upstream task.-.​
Can be used together with artifact upload to enable the complete scenario of deploying ECS with upstream artifacts.​
Artifact download​
(Optional) Supports selecting artifacts built by an upstream artifact upload task. The artifacts will be downloaded to the file path specified in your configuration.​
  • Supports adding multiple artifacts as needed.​
  • Enter the artifact download path. The path must be an absolute file path. Example: /home/app/foo.​
Region​
Select the Region where the ECS instance is located.​
ECS instances​
Select ECS instances for batch operations; selecting multiple instances is supported.​
warning​
ECS instances must have Operations Assistant installed; otherwise, the task will fail.​
Execution path​
Enter the command execution path. For Linux instances, the default is in the /home directory.​
Execute user​
You can specify that a command is executed by a user who exists in an instance. It is recommended to avoid using the root user to reduce security risks.​
tip​
Please specify a user with permission to execute commands.​
Timeout duration​
Set the timeout period for command execution on each instance. If execution exceeds the timeout, the batch job will determine that the task has failed on the corresponding instance. The default timeout is 1 minute.​
Command type​
Select the type of command to execute; currently, Shell and Python are supported.​
Command content​
Enter the script you want to run on the ECS instance.​
Example: JRE configuration commands for initializing a JAVA ECS deployment environment.​
​
#!/bin/bash​
​
# Check if Java has already been installed​
if ! command -v java &> /dev/null​
then​
echo "Java could not be found, installing OpenJDK..."​
# Update package list​
sudo apt update​
# Install OpenJDK 11​
sudo apt install -y openjdk-11-jdk​
# Set Java environment variables​
echo "Setting JAVA_HOME environment variable..."​
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))​
echo "export JAVA_HOME=$JAVA_HOME" >> ~/.bashrc​
echo "export PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc​
source ~/.bashrc​
else​
echo "Java is already installed."​
fi​
​
# Verify Java installation​
java -version​
​
Task output​
This preset task has no output artifacts.​
Advanced settings​
Webhook notification: Supports sending task-level messages via Webhook and Lark bot to help you stay up to date with task updates.​
​
Execution results​
On the run details page of the current pipeline, view information such as the run log and configuration of the current task.​
  • Click Log to view the pipeline execution log for the current task.​
  • Click View batch tasks to be redirected to the cloud server console, where you can view the execution status of ECS batch tasks.​
​
Last updated: 2025.09.10 17:37:27