wazuh / wazuh-dashboard

Wazuh dashboard, the Wazuh UI platform
https://wazuh.com
Apache License 2.0
22 stars 49 forks source link

Wazuh dashboard workflow run fails when managing the base file #180

Closed rauldpm closed 1 month ago

rauldpm commented 1 month ago

Description

Testing the release package generation script I have found an error building the Wazuh dashboard:

Run mv /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/opensearch-dashboards-2.13.0-linux-x64.tar.gz /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/wazuh-dashboard_4.9.0-00_x64_enhancement/wj6371-add-workflow-id.tar.gz
  mv /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/opensearch-dashboards-2.13.0-linux-x64.tar.gz /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/wazuh-dashboard_4.9.0-00_x64_enhancement/wj6371-add-workflow-id.tar.gz
  shell: /usr/bin/bash -e {0}
  env:
    NPM_CONFIG_USERCONFIG: /home/runner/work/_temp/.npmrc
    NODE_AUTH_TOKEN: XXXXX-XXXXX-XXXXX-XXXXX
    YARN_CACHE_LOCATION: /home/runner/.cache/yarn/v6
    VERSION: 2.13.0
    WZD_VERSION: 4.9.0
    WZD_REVISION: 00
    ARTIFACT_BUILD_NAME: wazuh-dashboard_4.9.0-00_x64_enhancement/wj6371-add-workflow-id.tar.gz
mv: cannot move '/home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/opensearch-dashboards-2.13.0-linux-x64.tar.gz' to '/home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/wazuh-dashboard_4.9.0-00_x64_enhancement/wj6371-add-workflow-id.tar.gz': No such file or directory
Error: Process completed with exit code 1.

I used the following parameters:

{'url': 'https://api.github.com/repos/wazuh/wazuh-dashboard/actions/workflows/build_wazuh_dashboard_with_plugins.yml/dispatches', 'headers': {'Authorization': 'token xxxxx', 'Accept': 'application/vnd.github.v3+json'}, 'payload': {'ref': 'enhancement/wj6371-add-workflow-id', 'inputs': {'is_stage': True, 'checksum': True, 'system': 'deb', 'revision': '1', 'architecture': 'amd64', 'reference_security_plugins': '4.9.0', 'reference_wazuh_plugins': '4.9.0'}}}`

Note that I used the revision parameter with value: 1, but the base file is being called as 00, I don't know if this is related or not, but we should review it

WZD_REVISION: 00
wazuh-dashboard_4.9.0-00_x64_enhancement/wj6371-add-workflow-id.tar.gz

Related

Tostti commented 1 month ago

I think that the error is related to the branch name, as it contains a / and is used as part of the file name, it is possible that it causes some issues. I renamed the branch just to do a test, replacing the / with a -

Tostti commented 1 month ago

After removing the / from the branch name, the workflow worked as expected

https://github.com/wazuh/wazuh-dashboard/actions/runs/9127402181

image

I will now rename the branch to its original name