1

我正在创建一个 Autosys 作业,如下所示:

/* ----------------- GLB_1045_AMDGC_IntegrationAMDH_DEV ----------------- */


insert_job: GLB_1045_AMDGC_Integration_DEV   job_type: CMD

command: /app/localstorage/AMDGC/Scripts/Integration_trigger.sh

machine: 1045_VM_AMDGC_APP_DEV2

owner: dgovdev

permission: gx,mx

date_conditions: 1

days_of_week: mo

start_times: "10:00"

description: "This Job is to trigger Integration workflow instance"

n_retrys: 2

std_out_file: "$LOGS_DIR/$AUTO_JOB_NAME.$AUTORUN"

std_err_file: "$LOGS_DIR/$AUTO_JOB_NAME.$AUTORUN"

max_run_alarm: 5

alarm_if_fail: 1

profile: "/app/localstorage/AMDGC/Profile/env.profile"

timezone: US/Eastern

我想参数化机器名称,以便 JIL 从 env.profile 文件中读取它,类似于:

machine: ${machine_name}

其中machine_name属性存在于env.profile文件中,如下所示:

machine_name=1045_VM_AMDGC_APP_DEV2

我试过了,但在服务器上提交 Jil 时出错。

4

1 回答 1

0

可能无法从配置文件中获取机器名称,因为配置文件在从 autosys 定义执行之前就已在机器command上获取,即是读取文件machine的先决条件。profile

machine您可以在属性中使用机器选择器脚本。但这不是推荐的方式,因为它在 AE 服务器上执行脚本时会带来安全风险。

machine: `script_that_returns_machine_name`

如果您不想在 autosys 定义中硬编码机器名称,更好的方法是使用虚拟机。

于 2019-04-01T23:35:29.557 回答