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

Replaced -wait flag in Start-Process with a call to Wait-Process #23076

Conversation

aritosteles
Copy link
Contributor

@aritosteles aritosteles commented Apr 22, 2024

Related issue
#22947

Description

The first call to cv2pdb.exe was failing to return control to the calling script. This was solved by removing the -wait flag and calling Wait-Process cmdlet instead to wait for all the processes to finish.

Modified the generated zip file name by request of @jotacarma90 to match the msi filename.

Configuration options

Logs/Alerts example

Tests

  • Compilation without warnings in every supported platform
    • Linux
    • Windows
    • MAC OS X
  • Source installation
  • Package installation
  • Source upgrade
  • Package upgrade
  • Review logs syntax and correct language
  • QA templates contemplate the added capabilities
  • Memory tests for Linux
    • Scan-build report
    • Coverity
    • Valgrind (memcheck and descriptor leaks check)
    • Dr. Memory
    • AddressSanitizer
  • Memory tests for Windows
    • Scan-build report
    • Coverity
    • Dr. Memory
  • Memory tests for macOS
    • Scan-build report
    • Leaks
    • AddressSanitizer
  • Retrocompatibility with older Wazuh versions
  • Working on cluster environments
  • Configuration on demand reports new parameters
  • The data flow works as expected (agent-manager-api-app)
  • Added unit tests (for new features)
  • Stress test for affected components
  • Decoder/Rule tests
    • Added unit testing files ".ini"
    • runtests.py executed without errors

Script output:
image

Generated file:
image

jotacarma90 and others added 30 commits April 2, 2024 18:07
* Migrated filebeat template and create wofkflow to generate filebeat package

* Change revision variable name to version, due to more accurated
* Migrate WPK directory to wazuh/wazuh repository

* Add workflow to create WPK packages

* Add mechanism to dont build WPK generation images and download from ghcr

* Fix generate WPK script when no key dir passed

* Add tag parameter to generate wpk script and workflow related

* Remove workflows triggers on pull_request

* Multiple fixes in workflow:

- Added new input and functionality to format WPK name
- Check if WPK with same name exists, and exit the workflow
- Added -j parameters to generate scripts
- Add conditions to check if some package will be generate, to avoid some steps

* Add some info into the readme file

* Some changes related to format parameter inputs
…h/wazuh repository (#22435)

* Add packages for deb, rpm and windows

* Add macos to packages

* Add build.sh and generate_package.sh

* Add short hash for package_names and clean generate_packages.sh

* Adds short hash to package_name

* Fix rpm package name to follow the name convention

* Rename rpm arch from x86_64 to amd64

* Added arch name fix in rpm packages creation

* Added Dockerfiles for debs managers

* Added Dockerfiles for rpm managers

* Standarized arch naming

* Updated SPECS

* Updated package naming

* Removed unused Vagrantfile

* Fixed rpm packages names

* Migrated ghcr scripts

* Added upload-deb-manager-images.yml workflow

* Updated packages-upload-images.yml and helper scripts

* Added packages-build-amd64.yml

* Added on-demand package generation

* Added _pkg prefix to CONTAINER_NAME

* Added runner selector by arch

* Fix metadata problem in rpm packages

* Improved manager builder workflows

* Sync with agent migration development

* Fix manager package buiding via workflow call

* Uploaded variables name and added package build condition

* Updates deb and rpm SPECS

* Updated packages naming procedure

* Improved workflows parametrization

* Fixed rpm --src option

* Added workflow abort if package already exists

* Updated docker tag management

* Migrated testing tools from wazuh-packages

* Added install test before package upload

* Fixed paths for docker test

* Updated scripts and workflows with required changes

* Updated multi server builder workflow

* Updated inputs

* Addressed comments

* Fixed dockerfile path for arm64 and ppc64le

* Removed unused if in manager package builder

* Use dpkg in test install

* Fix: removed arm64/aarch64 architecture option

* Fix: applied minor fixes and added git as dependency in debs/amd64 Dockerfile

* Fix: removed non manager-related files

* Fix: fixed some problems regarding previous rebase

* Address some minors comments

---------

Co-authored-by: Luis Enrique Chico Capistrano <luis.chico@wazuh.com>
Add macos to packages

Add build.sh and generate_package.sh

Add short hash for package_names and clean generate_packages.sh

Adds short hash to package_name

Fix rpm package name to follow the name convention

Rename rpm arch from x86_64 to amd64

Added arch name fix in rpm packages creation

Rename aarch64->arm64, armv7hl->armhf

Fix issue cause of rename architecture

Move build_deps.sh from rpms/armhf/agent to rpms/utils

Improve macos script and update pkg name to follow the new convention

Update file name convention for zip windows pkg

Workflows testing

Upload docker images

Fix newline not accepted

Fix macos generate_wazuh_packages and fix windows name convension

Fix macos specs

Fix macos dependency issues

Testing push docker changging tag

Rename container_name testing permission issues

Testing using workflowdis_patch

Remove dev flag

Update packages upload workflow

Remove referenced to package-build workflow

Rename package-buil to package-build-linux-agent

Fix copy the correct helpers

Testing

Revert "Testing"

This reverts commit 26b6b5a.

Add release name option

Add flag release package for deb

Update workflow for push agent and docker images

Update workflow

Undo release package flag, back again

Update agent workflow, added package-release flag

Add legacy and debug the name for rpm developer

Export only the source package or the package file, add checksum option

Add legacy dockerfile

Update workflow adding a pull_request

Revert "Update workflow adding a pull_request"

This reverts commit 2dc9766.

Update workflow

Fix error trying to generate docker container for legacy

Remove rtr accions

Test workflow functionalities

Update scripts and upload images

Update linux agent workflow

Fix abort workflow

mend

Avoid push the same docker image

Remove branch option from workflow and add README.md

Remove check if the image or package alredy exist

Update README.md

Introduce the new changes

Add architecture step and pending docker_builder script for vagrant build

Update architecture values

Add test and clean the code

Fix test, path incorrect

Tried to fix i386 tests

Fix to use of docker builder for testing

Fix IS_STAGE bug, and avoid remove legacy/docker_builder.sh

Migrate and adapt macos wazuh agent packages subsystem (#22707)

* Added debug option and release naming

* Added release and develop package name

* Added wazuh repository code use

* Added macos package generation workflow

* Added install test step

* Add smoke test check to macos package generation

* Fix some inputs descriptions and jobs name

* Fix some descriptions and modify generate script to set commit hash with git rev-parse

---------

Co-authored-by: Jotacarma90 <jose.carreras@wazuh.com>

Migrate and adapt Windows wazuh agent packages subsystem (#22631)

* Modified windows generate package script and create workflow to use it

* Introduce the new changes and fixes

* Fix zip name

* Generate and push msi to s3

* Check download step

* Adapted Windows package workflow to generate .zip as artifact

* Modified generate msi script to set msi name with parameter

* Added smoke test install after msi creation

* Fix some jobs name and inputs descriptions

---------

Co-authored-by: Luis Enrique Chico Capistrano <luis.chico@wazuh.com>

Improve package install validation and job title

Improve workflow title for uploard images

Update comments

Change some descriptions to better understand

Testing exit 1 on workflow

Revert "Testing exit 1 on workflow"

This reverts commit e093042.

Fix validation to dpkg command and upload docker image yml

Address Jose comment's
Fix manager and agent SPECS to allow no stage nomenclature without overwrite _rpmfilename
Debian packages generation and debug symbols, migration
RPM packages generation and debug symbols, migration
Copy link
Contributor

@Leoquicenoz Leoquicenoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

Copy link
Member

@ncvicchi ncvicchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tdrauncieal tdrauncieal force-pushed the enhancement/9913-generate-debug-symbols-epic branch from 7a92048 to 6de7270 Compare May 14, 2024 12:46
@aritosteles aritosteles merged commit 38d6644 into enhancement/9913-generate-debug-symbols-epic May 27, 2024
@aritosteles aritosteles deleted the enhancement/9913-wait-flag-replacement branch May 27, 2024 14:16
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.

Set up an automated process to upload generated debug symbols for Windows to a designated storage location
8 participants