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.
|
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. |