[DOC] should notice that need setting the full path when call the resource file #11620 (#11621)

This commit is contained in:
Yann Ann 2022-08-26 10:58:56 +08:00 committed by GitHub
parent ce8db1c5fb
commit eda9f3d50c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 2 deletions

View File

@ -24,7 +24,7 @@ Drag from the toolbar <img src="../../../../img/tasks/icons/shell.png" width="15
2. Check `Normal` for `Run Flag`. If `Prohibit Execution` is checked, the task will not execute when the workflow runs.
3. Select `Task Priority`: when the number of worker threads is insufficient, high priority tasks will execute first in the execution queue, and tasks with the same priority will execute in the order of first in, first out.
4. Timeout alarm (optional): check the timeout alarm, timeout failure, and fill in the "timeout period". When the task execution time exceeds **timeout period**, an alert email will send and the task timeout fails.
5. Resources (optional). Resources are files create or upload in the `Resource Center -> File Management` page. For example, the file name is `test.sh`, and the command to call the resource in the script is `sh test.sh`.
5. Resources (optional). Resources are files created or uploaded in the `Resource Center -> File Management` page. For example, the file name is `test.sh`, and the command to use the resource in the script is `sh test.sh`. Please note that you need to use the full path to the resource files.
6. Customize parameters (optional).
7. Click the `Confirm Add` button to save the task settings.

View File

@ -65,6 +65,8 @@ In the workflow definition module of project Manage, create a new workflow using
- Script: 'sh hello.sh'
- Resource: Select 'hello.sh'
> Notice: When using a resource file in the script, the file name needs to be the same as the full path of the selected resource:
> For example: if the resource path is `/resource/hello.sh`, you need to use the full path of `/resource/hello.sh` to use it in the script.
![use-shell](../../../../img/new_ui/dev/resource/demo/file-demo02.png)

View File

@ -16,7 +16,7 @@
1. “运行标志”勾选“正常”,若勾选“禁止执行”,运行工作流不会执行该任务;
1. 选择“任务优先级”:当 worker 线程数不足时,级别高的任务在执行队列中会优先执行,相同优先级的任务按照先进先出的顺序执行;
1. 超时告警(非必选):勾选超时告警、超时失败,填写“超时时长”,当任务执行时间超过**超时时长**,会发送告警邮件并且任务超时失败;
1. 资源(非必选):资源文件是资源中心->文件管理页面创建或上传的文件,如文件名为 `test.sh`,脚本中调用资源命令为 `sh test.sh`
1. 资源(非必选):资源文件是资源中心->文件管理页面创建或上传的文件,如文件名为 `test.sh`,脚本中调用资源命令为 `sh test.sh`。注意调用需要使用资源的全路径
1. 自定义参数(非必填);
1. 点击"确认添加"按钮,保存任务设置。

View File

@ -64,6 +64,8 @@
- 脚本:`sh hello.sh`
- 资源:选择 `hello.sh`
> 注意:脚本中选择资源文件时文件名称需要保持和所选择资源全路径一致:
> 例如:资源路径为`/resource/hello.sh` 则脚本中调用需要使用`/resource/hello.sh`全路径
![use-shell](../../../../img/new_ui/dev/resource/demo/file-demo02.png)