wazuh / wazuh-qa

Wazuh - Quality Assurance
GNU General Public License v2.0
65 stars 32 forks source link

Migrate the Puppet forge publish procedure contained in the `Packages_builder` pipeline to GHA #5649

Closed teddytpc1 closed 1 month ago

teddytpc1 commented 3 months ago
Objective
https://github.com/wazuh/wazuh-packages/issues/2904

Description

Because of the Wazuh packages redesign tier 2 objective we need to migrate the Puppet forge build and publication from the Packages_builder pipeline to a GHA.

Tasks

Changes

Additional changes

vcerenu commented 1 month ago

The workflow for creating the Wazuh Puppet module was created in the wazuh/wazuh-puppet repository and its execution was tested: https://github.com/wazuh/wazuh-puppet/actions/runs/10813987146

It was verified that the workflow creates the module, uploads it as an artifact to Github Actions and the functionality of uploading the file to the corresponding S3 bucket was also tested.

image

jnasselle commented 1 month ago

Hi @vcerenu ,

Here are some specs regarding this issue that are related to the https://github.com/wazuh/internal-devel-requests/issues/187 criteria:

NOTE:

vcerenu commented 1 month ago

Description

The upload path to S3 was modified, the name of the Puppet module file was added for executions of different stages before the production package, and the workflow inputs were modified to have a better relationship with the other workflows created.

Test

Execution for stage environments: https://github.com/wazuh/wazuh-puppet/actions/runs/10888749953

Execution for Production environments: https://github.com/wazuh/wazuh-puppet/actions/runs/10888742198

vcerenu commented 1 month ago

Update

Added modification of the key version value within the metadata.json file and added a stage to modify it in case of a development version.

Test

https://github.com/wazuh/wazuh-puppet/actions/runs/10909059398

vcerenu commented 1 month ago

Update

The revision number was deleted from metadata file.

Tests:

Stage Execution: https://github.com/wazuh/wazuh-puppet/actions/runs/10940166613

No stage execution: https://github.com/wazuh/wazuh-puppet/actions/runs/10940152573

jnasselle commented 1 month ago

I am reopening this issue because our package generation script needs an undocumented mandatory input field and behaviors.

Specs:

run-name: Puppet module ${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }} ${{ inputs.id }}
jnasselle commented 1 month ago

Checksum development was here https://github.com/wazuh/wazuh-puppet/pull/1119