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

Version file standardization #536

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

guidomodarelli
Copy link

Description

As part of the standardization process, all XDR-SIEM repositories will use a consistent identification method. Each repository will include a standardized VERSION.json file containing necessary data to identify the origin branch and release stage. This file should be included in the installer's installation directory and indicate the short commit used to create it.

Requirements

GitHub
  1. Each repository must include a VERSION.json file in the root directory.
  2. The file must be named VERSION.json.
  3. It should follow the specified JSON format (with required keys).
  4. The version key value must follow the MAJOR.MINOR.PATCH format.
  5. The stage key value must indicate the release stage, using lowercase and no spaces.
  6. Numeric revisions (e.g., 41200) should be replaced by the stage value from the version file.
  7. References to the version and stage (revision) should be fetched from this JSON file.

[NOTE]
References such as Jenkinsfile shared libraries or uses: repo/workflow@main are exempted from this change (7).
However, procedures like package generation should be adapted accordingly.

Installers
  1. Installers should install the VERSION.json file in the installation directory:
    1. Wazuh manager and Wazuh agent: /var/ossec (or equivalent)
    2. Wazuh dashboard and Wazuh indexer: /usr/share/wazuh-{dashboard/indexer}
  2. The version and stage (revision) should be fetched from the VERSION.json file.
  3. The VERSION.json provided in the installer package should include the short commit used to create the it. If the repository requires a compound commit due to dependencies, use it instead of a short commit.
  4. Installer nomenclature and metadata must remain unchanged.
  5. File Permissions and Ownership for VERSION.json:
    1. Ownership: Subsystem user and group
    2. Permissions: 440
Documentation
  1. Documentation must be modified to reflect the changes.

Resources

VERSION.json file content and structure
  • GitHub repository
{
    "version": "4.12.0",
    "stage": "alpha0"
}
  • Installers
{
    "version": "4.12.0",
    "stage": "alpha0",
    "commit": "short_commit_value"
}

Issues Resolved

#526

Changelog

  • feat: migrate versioning to JSON format and update build scripts

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@guidomodarelli guidomodarelli self-assigned this Feb 19, 2025
@guidomodarelli guidomodarelli linked an issue Feb 19, 2025 that may be closed by this pull request
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version file standardization
1 participant