Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate_ova.sh script does not act as expected #99

Closed
Enaraque opened this issue Oct 24, 2024 · 0 comments · Fixed by #100
Closed

generate_ova.sh script does not act as expected #99

Enaraque opened this issue Oct 24, 2024 · 0 comments · Fixed by #100
Assignees
Labels
level/task Task issue type/bug Bug issue

Comments

@Enaraque
Copy link
Member

Enaraque commented Oct 24, 2024

Description

When running the generate_ova.sh script from a tag instead of a branch and without passing any parameters, we get the following error.

$ git clone https://github.com/wazuh/wazuh-virtual-machines && cd wazuh-virtual-machines/ova/ && git checkout v4.10.0-alpha2

$ ./generate_ova.sh
Building Wazuh OVA version 4.10.0
Branch HEAD not found in wazuh-installation-assistant repository
==> default: VM not created. Moving on...

This is because when this command is executed from a tag it will always return HEAD.

if [ -z "${INSTALLATION_ASSISTANT_BRANCH}" ]; then
INSTALLATION_ASSISTANT_BRANCH=$(git rev-parse --abbrev-ref HEAD)

$ git rev-parse --abbrev-ref HEAD
HEAD

So when we try to do git ls-remote with the following command, it does not find that branch:

git ls-remote ${REMOTE_TYPE} ${WAZUH_INSTALLATION_ASSISTANT_URL} ${INSTALLATION_ASSISTANT_BRANCH}

Related

@Enaraque Enaraque added level/task Task issue type/bug Bug issue labels Oct 24, 2024
@wazuhci wazuhci moved this to Backlog in Release 4.10.0 Oct 24, 2024
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.10.0 Oct 24, 2024
@wazuhci wazuhci moved this from In progress to Pending review in Release 4.10.0 Oct 24, 2024
@wazuhci wazuhci moved this from Pending review to Done in Release 4.10.0 Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/bug Bug issue
Projects
Status: Done
2 participants