hamlet-io / executor-bash

Executor for hamlet based on bash
GNU General Public License v3.0
0 stars 4 forks source link

refactor: dynamic cmdb plugin detection #218

Closed ml019 closed 3 years ago

ml019 commented 3 years ago

Intent of Change

Description

Make the token used to detect use of the cmdb plugin more specific so directory names containing cmdb don't result in a false positive.

Motivation and Context

No surprises - don't trigger the dynamic cmdb behaviour unless it is really required.

How Has This Been Tested?

Local template generation

Prerequisite PRs:

Dependent PRs:

Consumer Actions:

ml019 commented 3 years ago

@ken9ross the code is checking the environment variable contents, which in the case of the bootstrap intentionally doesn't contain cmdb at all.

Note sure how line 48 is relevant?

ken9ross commented 3 years ago

L48 puts engine-plugin-cmdb.git into ${HAMLET_CLONE_ROOT}/engine/plugins/cmdb and that's the value that goes into the GENERATION_PLUGIN_DIRS envvar, so testing for "engine-plugin-cmdb" will not match if the CMDB plugin is added by bootstrap.

Am I missing something?

ml019 commented 3 years ago

@ken9ross I think this is more what you had in mind?

ml019 commented 3 years ago

@ken9ross should be good to merge now?