While working on this issue, it has been found that the checkFilebeatURL() function does not act as expected.
This function is responsible for changing the URL of the Filebeat template to master if the URL for the current version tag (source_branch in installVariables.sh) is not found. This URL is the value for the filebeat_wazuh_template variable in installVariables.sh.
When the URL needs to be changed, this never happens, as it is changed after all the variables have been dumped into wazuh-install.sh:
Also, every time it has to verify that the URL can be accessed correctly, it uses the wrong source_branch reference, as it is using the value of the source_branch variable from the current file (builder.sh) instead of the one it actually has to use (installVariables.sh).
$ ./builder.sh -i -d
Inside of checkFilebeatURL
source_branch from builder.sh: WRONG_BRANCH_TEST
source_branch from install_variables.sh: v4.9.0-rc2
Filebeat URL: https://raw.githubusercontent.com/wazuh/wazuh/WRONG_BRANCH_TEST/extensions/elasticsearch/7.x/wazuh-template.json
Changing Filebeat URL...
Outside of checkFilebeatURL
Description
While working on this issue, it has been found that the
checkFilebeatURL()
function does not act as expected.This function is responsible for changing the URL of the Filebeat template to master if the URL for the current version tag (
source_branch
ininstallVariables.sh
) is not found. This URL is the value for thefilebeat_wazuh_template
variable ininstallVariables.sh
.When the URL needs to be changed, this never happens, as it is changed after all the variables have been dumped into
wazuh-install.sh
:Also, every time it has to verify that the URL can be accessed correctly, it uses the wrong
source_branch
reference, as it is using the value of thesource_branch
variable from the current file (builder.sh
) instead of the one it actually has to use (installVariables.sh
).Related issue
3092