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

[CI] Packaging scripts redesign #180

Closed
1 task done
AlexRuiz7 opened this issue Mar 6, 2024 · 1 comment · Fixed by #193
Closed
1 task done

[CI] Packaging scripts redesign #180

AlexRuiz7 opened this issue Mar 6, 2024 · 1 comment · Fixed by #193
Assignees
Labels
level/task Task issue request/operational Operational requests type/enhancement Enhancement issue

Comments

@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Mar 6, 2024

Description

During the works of #155, I've noticed that the scripts used to manage the generation of packages are very tightly coupled, making it difficult to extend the CI pipeline implemented in GH Actions.

The main cause is the fragile method we currently use to share the name of the package from step to step in the workflow.

The package is the main and only resource that the workflow handles, so it would be much easier if it were accessible globally, being calculated beforehand as the first step of the pipeline.

We already calculate some values as initial setup, such as the Git commit and the version number of the project. These values are used to dynamically generate the name of the packages, as follows:

wazuh-indexer-${{ needs.version.outputs.version }}-${{ github.event_name == 'push' && '1' || inputs.revision }}-${{ matrix.architecture }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ matrix.distribution }}

The plan is to use a script to generate the name of the packages.

We'll also need to get rid of the OPENSEARCH_VERSION environment variable used in GH Actions to build and assemble packages. Instead, the packaging scripts should be able to detect the OpenSearch version for which the packages are being built, in other words, the version of OpenSearch that wazuh-indexer is based on. It can be obtained with the following command:

cat buildSrc/version.properties | grep opensearch | grep -Eo '[0-9]{1,}.[0-9]{1,}.[0-9]{1,}'

Tasks

  • Make packaging scripts self-aware of the OpenSearch version.
    ...
@AlexRuiz7 AlexRuiz7 added level/task Task issue type/enhancement Enhancement issue request/operational Operational requests labels Mar 6, 2024
@wazuhci wazuhci moved this to In progress in Release 4.9.0 Mar 20, 2024
@AlexRuiz7 AlexRuiz7 self-assigned this Mar 22, 2024
@AlexRuiz7
Copy link
Member Author

AlexRuiz7 commented Mar 26, 2024

Working on #188 (comment)

@wazuhci wazuhci moved this from In progress to Pending final review in Release 4.9.0 Mar 27, 2024
@wazuhci wazuhci moved this from Pending final review to Done in Release 4.9.0 Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue request/operational Operational requests type/enhancement Enhancement issue
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant