wazuh-qa icon indicating copy to clipboard operation
wazuh-qa copied to clipboard

Migrate code from wazuh-jenkins to the new QA repository

Open QU3B1M opened this issue 1 year ago • 3 comments

Description

Migrate the relevant content from the repository wazuh-jenkins detected on https://github.com/wazuh/wazuh-qa/issues/5527.

This is mainly aimed to migrate the old pipelines to the new jenkins:

  • Pipelines to migrate: details.

  • Main migration branch: enhancement/5564-wazuh-jenkins.

  • PRs merged on 4.10.0
    • https://github.com/wazuh/wazuh-qa-automation/pull/87
  • PRs merged on enhancement/5564-wazuh-jenkins

Tasks

  • [x] Analyze but do not migrate

  • Test_registration
    Test Cases Validations
    Old Jenkins
    • Register simple
    • Register with password
    • Register with manager verification (CA on managerside)
    • Register with agent verification (CA on agent side)
    Methods tested with valid and invalid values, and in combination
    • Agent is registered from agent side (using agent-authd bin)
    Validations performed on a yaml for Ansible
    DTT
    • Register simple
    Methods only tested with valid values
    • Agent is running from agent side (using systemctl)
    • Agent daemon is active from agent side (using systemctl)
    • Agent is connected and running from manager side (using agent_control bin)
    • Agent's client keys are correct from agent side
    Validations performed using Pytest
  • Test Register Tier

    This is not a test by itself, this pipeline runs several executions of the Test Register, it is used to facilitate the execution of these tests on several linux systems without the need to execute one by one, its more like a triggerer.

  • Test Service
    Test Cases Validations
    Old Jenkins
    • Start using systemd
    • Restart using systemd
    • Stop using systemd
    • Start using sysv
    • Restart using sysv
    • Stop using sysv
    Only for Linux, cases tested on Agent and Manager
    • Service started after start
    • Service restarted after restart
    • Service stopped after stop
    • Service daemon exists
    Same validations on Agent and Manager
    DTT
    • Start using systemd
    • Restart using systemd
    • Stop using systemd
    • Start winagent using NET START
    • Restart winagent using NET STOP & NET START
    • Stop winagent using NET STOP
    • Start macos using wazuh-control
    • Restart macos using wazuh-control
    • Stop macos using wazuh-control
    Linux cases tested on Agent and Manager
    • Service started after start
    • Service started after restart
    • Service stopped after stop
    • Agent active, connected, client_keys OK, port open after restart
    • Agent inactive, ports closed after stop
    Agent has more validations than manager
  • [x] Create issue to track cleaning and refactoring of "Clean and migrate" pipelines
    • https://github.com/wazuh/wazuh-qa-automation/issues/89
  • [x] Move a new Jenkins into a legacy module
    • [x] Test_upgrade
      • https://github.com/wazuh/wazuh-qa-automation/pull/53
    • [x] Test_upgrade_tier
      • https://github.com/wazuh/wazuh-qa-automation/pull/59
      • Reported: https://github.com/wazuh/wazuh-qa-automation/issues/75
    • [ ] wazuh_qa_environment
      • https://github.com/wazuh/wazuh-qa-automation/pull/41
    • [ ] Test_stress
      • https://github.com/wazuh/wazuh-qa-automation/pull/60
    • [ ] Test_stress_gh
      • https://github.com/wazuh/wazuh-qa-automation/pull/60
    • [ ] Test_stress_tier
      • https://github.com/wazuh/wazuh-qa-automation/pull/60
    • [ ] Test_stress_Vagrant
      • https://github.com/wazuh/wazuh-qa-automation/pull/60
    • [ ] workloads
    • [ ] Test_integration_endpoints
  • [ ] Migrate to clean in the future
    • [ ] Procedure_ecs_task
      • https://github.com/wazuh/wazuh-qa-automation/pull/74
    • [ ] Procedure_ecs_task_tier
    • [ ] Procedure_docker_testing_image_generation (job)
    • [ ] Procedure_gh_project_syncup
      • Branch > https://github.com/wazuh/wazuh-qa-automation/tree/enhancement/5564-sync-project
      • Update templates that have incorrect references to the new migrated pipeline paths.
    • [ ] Test_e2e_system
  • [ ] Update the README.md with the newly migrated content
  • [ ] Migrate release issue generation template
  • [ ] Add a conclusion with requeriments. - WIP
    • Requeriments from old Jenkins Environment
      • AWS Resource - JenkinsEFS
      • Credential - Windows_AMI
      • Credential - CentOS_Ephemeral_SSH
      • Credential - Ubuntu_Ephemeral_SSH
      • Credential - AZURE_AUTH_STRESS_TEST

Conclusion

QU3B1M avatar Jul 11 '24 13:07 QU3B1M