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

Unification of base creation in stack package Dockerfiles #1815

Open
wants to merge 3 commits into
base: 4.4
Choose a base branch
from

Conversation

c-bordon
Copy link
Member

Related issue
related https://github.com/wazuh/wazuh-jenkins/issues/3898

Description

Changes are made to the package build scripts and Dokefiles are modified so that they compile the base before building the package

Logs example

-rw-r--r--  1 root    root    141651400 ago 30 12:42 wazuh-dashboard_4.4.0-1_amd64.deb
-rw-r--r--  1 root    root          164 ago 30 12:42 wazuh-dashboard_4.4.0-1_amd64.deb.sha512
-rw-r--r--  1 root    root    172479780 ago 30 11:46 wazuh-dashboard-4.4.0-1.x86_64.rpm
-rw-r--r--  1 root    root          165 ago 30 11:46 wazuh-dashboard-4.4.0-1.x86_64.rpm.sha512
-rw-r--r--  1 root    root    392185442 ago 30 11:52 wazuh-indexer_4.4.0-1_amd64.deb
-rw-r--r--  1 root    root          162 ago 30 11:52 wazuh-indexer_4.4.0-1_amd64.deb.sha512
-rw-r--r--  1 root    root    414533500 ago 30 11:55 wazuh-indexer-4.4.0-1.x86_64.rpm
-rw-r--r--  1 root    root          163 ago 30 11:55 wazuh-indexer-4.4.0-1.x86_64.rpm.sha512

Tests

  • Build the package in any supported platform
    • Linux
    • Windows
    • macOS
    • Solaris
    • AIX
    • HP-UX
  • Package installation
  • Package upgrade
  • Package downgrade
  • Package remove
  • Package install/remove/install
  • Change added to CHANGELOG.md
  • Tests for Linux RPM
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • %files section is correctly updated if necessary
  • Tests for Linux deb
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • Package install/remove/install
    • Package install/purge/install
    • Check file permissions after installing the package
  • Tests for macOS
    • Test the package from macOS Sierra to Mojave
  • Tests for Solaris
    • Test the package on Solaris 10
    • Test the package on Solaris 11
    • Check file permissions on Solaris 11 template
  • Tests for IBM AIX
    • %files section is correctly updated if necessary
    • Check the changes from IBM AIX 5 to 7

@c-bordon c-bordon self-assigned this Aug 30, 2022
Copy link
Contributor

@okynos okynos left a comment

Choose a reason for hiding this comment

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

Minor review, good job really elegant solution.

else
cp /root/output/%{DASHBOARD_FILE} ./
fi
cp /opt/%{DASHBOARD_FILE} ./ ;\
Copy link
Contributor

Choose a reason for hiding this comment

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

Which it's function? ;\

Copy link
Member Author

Choose a reason for hiding this comment

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

The base source directory change is due to the fact that the /root directory is a directory mounted at the boot of the container, for this reason, everything that exists in the image in the /root directory is replaced by the contents of the directory mounted.

For this reason, I decided to place the base in another dir and continue the installation with this reference

else
cp /root/output/%{INDEXER_FILE} ./
fi
cp /opt/%{INDEXER_FILE} ./ ;\
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

Copy link
Member Author

Choose a reason for hiding this comment

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

The base source directory change is due to the fact that the /root directory is a directory mounted at the boot of the container, for this reason, everything that exists in the image in the /root directory is replaced by the contents of the directory mounted.

For this reason, I decided to place the base in another dir and continue the installation with this reference

else \
cp /root/output/$(DASHBOARD_FILE) ./ ;\
fi
cp /opt/$(DASHBOARD_FILE) ./ ;\
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

Copy link
Member Author

Choose a reason for hiding this comment

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

The base source directory change is due to the fact that the /root directory is a directory mounted at the boot of the container, for this reason, everything that exists in the image in the /root directory is replaced by the contents of the directory mounted.

For this reason, I decided to place the base in another dir and continue the installation with this reference

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.

None yet

2 participants