Packages - Build Wazuh agent Linux packages - amd64 - checksum #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run-name: Packages - Build Wazuh agent Linux packages - ${{ inputs.architecture }}${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }} ${{ inputs.id }} | |
name: Build Wazuh agent Linux packages | |
on: | |
workflow_dispatch: | |
inputs: | |
docker_image_tag: | |
description: | | |
Specify the docker tag used to build the package. | |
Use 'developer' to set branch name as tag. | |
Use 'auto' to set branch version as tag. | |
Default is 'auto'. | |
required: false | |
default: 'auto' | |
architecture: | |
type: choice | |
description: Package architecture [amd64, arm64, x86_64, aarch64]. | |
required: true | |
options: | |
- amd64 | |
- arm64 | |
- x86_64 | |
- aarch64 | |
system: | |
type: choice | |
description: Package OS [deb, rpm]. | |
required: true | |
options: | |
- deb | |
- rpm | |
- both | |
revision: | |
description: | | |
Package revision (name and metadata). | |
Default is '0'. | |
required: false | |
default: '0' | |
is_stage: | |
type: boolean | |
description: | | |
Set production nomenclature if true. | |
Default is 'false'. | |
required: false | |
checksum: | |
type: boolean | |
description: | | |
Generate package checksum. | |
Default is 'false'. | |
required: false | |
source_reference: | |
description: | | |
Branch from wazuh/wazuh-agent repository to use. | |
required: true | |
upload_to_s3: | |
type: boolean | |
description: | | |
Upload generated package to S3. | |
Default is 'false'. | |
default: false | |
required: false | |
extensive_testing: | |
type: boolean | |
description: | | |
Run final extensive testing stage intalling | |
the package in different docker images. | |
Default is 'false'. | |
default: false | |
required: false | |
id: | |
type: string | |
description: | | |
ID used to identify the workflow uniquely. | |
required: false | |
workflow_call: | |
inputs: | |
docker_image_tag: | |
type: string | |
required: false | |
default: 'auto' | |
architecture: | |
type: string | |
required: true | |
system: | |
type: string | |
required: true | |
revision: | |
type: string | |
required: false | |
is_stage: | |
type: boolean | |
required: false | |
checksum: | |
type: boolean | |
required: false | |
source_reference: | |
type: string | |
required: true | |
upload_to_s3: | |
type: boolean | |
required: true | |
extensive_testing: | |
type: boolean | |
required: false | |
id: | |
type: string | |
required: false | |
jobs: | |
build-binaries-agent-linux-packages: | |
runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'wz-linux-arm64' || 'ubuntu-latest' }} | |
timeout-minutes: 50 | |
name: Build Wazuh agent Linux binaries - ${{ inputs.architecture }} - ${{ inputs.source_reference }} - ${{ inputs.id }} | |
steps: | |
- name: Checkout the wazuh-agent repository | |
uses: actions/checkout@v4 | |
with: | |
repository: wazuh/wazuh-agent | |
ref: ${{ inputs.source_reference }} | |
persist-credentials: false | |
- name: Compile Linux Repository | |
uses: ./.github/actions/linux_compile_repository | |
with: | |
architecture: ${{ inputs.architecture }} | |
docker_image_tag: ${{ inputs.docker_image_tag }} | |
source_reference: ${{ inputs.source_reference }} | |
gh_token: ${{ github.token }} | |
build-package-agent-linux-deb-packages: | |
needs: build-binaries-agent-linux-packages | |
if: ${{ inputs.system == 'deb' || inputs.system == 'both' }} | |
runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'wz-linux-arm64' || 'ubuntu-latest' }} | |
timeout-minutes: 50 | |
name: Package Wazuh agent binaries Linux ${{ inputs.architecture }} - DEB ${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }} - ${{ inputs.id }} | |
steps: | |
- name: Checkout the wazuh-agent repository | |
uses: actions/checkout@v4 | |
with: | |
repository: wazuh/wazuh-agent | |
ref: ${{ inputs.source_reference }} | |
persist-credentials: false | |
- name: Build Linux DEB Package - ${{ inputs.architecture }} | |
uses: ./.github/actions/linux_package_binaries | |
with: | |
architecture: ${{ inputs.architecture }} | |
docker_image_tag: ${{ inputs.docker_image_tag }} | |
source_reference: ${{ inputs.source_reference }} | |
system: deb | |
revision: ${{ inputs.revision }} | |
is_stage: ${{ inputs.is_stage }} | |
checksum: ${{ inputs.checksum }} | |
upload_to_s3: 'false' | |
gh_token: ${{ github.token }} | |
build-package-agent-linux-rpm-packages: | |
needs: build-binaries-agent-linux-packages | |
if: ${{ inputs.system == 'rpm' || inputs.system == 'both' }} | |
runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'wz-linux-arm64' || 'ubuntu-latest' }} | |
timeout-minutes: 50 | |
name: Package Wazuh agent binaries Linux ${{ inputs.architecture }} - RPM ${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }} - ${{ inputs.id }} | |
steps: | |
- name: Checkout the wazuh-agent repository | |
uses: actions/checkout@v4 | |
with: | |
repository: wazuh/wazuh-agent | |
ref: ${{ inputs.source_reference }} | |
persist-credentials: false | |
- name: Build Linux RPM Package - ${{ inputs.architecture }} | |
uses: ./.github/actions/linux_package_binaries | |
with: | |
architecture: ${{ inputs.architecture }} | |
docker_image_tag: ${{ inputs.docker_image_tag }} | |
source_reference: ${{ inputs.source_reference }} | |
system: rpm | |
revision: ${{ inputs.revision }} | |
is_stage: ${{ inputs.is_stage }} | |
checksum: ${{ inputs.checksum }} | |
upload_to_s3: 'false' | |
gh_token: ${{ github.token }} | |
test-package-agent-linux-deb-packages: | |
needs: build-package-agent-linux-deb-packages | |
if: ${{ inputs.extensive_testing && (inputs.system == 'deb' || inputs.system == 'both') }} | |
runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'wz-linux-arm64' || 'ubuntu-latest' }} | |
timeout-minutes: 50 | |
strategy: | |
matrix: | |
distro_name: ["ubuntu:20.04", "ubuntu:24.04", "debian:12", "debian:11"] | |
name: Test DEB Wazuh agent Linux package - ${{ inputs.architecture }} - ${{ inputs.source_reference }} - ${{ inputs.id }} | |
steps: | |
- name: Checkout the wazuh-agent repository | |
uses: actions/checkout@v4 | |
with: | |
repository: wazuh/wazuh-agent | |
ref: ${{ inputs.source_reference }} | |
persist-credentials: false | |
- name: Test package on ${{ matrix.distro_name }} | |
uses: ./.github/actions/linux_test_package | |
with: | |
system: deb | |
tested_image: ${{ matrix.distro_name }} | |
test-package-agent-linux-rpm-packages: | |
needs: build-package-agent-linux-rpm-packages | |
if: ${{ inputs.extensive_testing && (inputs.system == 'rpm' || inputs.system == 'both') }} | |
runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'wz-linux-arm64' || 'ubuntu-latest' }} | |
timeout-minutes: 50 | |
strategy: | |
matrix: | |
distro_name: ["fedora:42", "fedora:41", "amazonlinux:2023", "amazonlinux:2", "redhat/ubi8"] | |
name: Test RPM Wazuh agent Linux package - ${{ inputs.architecture }} - ${{ inputs.source_reference }} - ${{ inputs.id }} | |
steps: | |
- name: Checkout the wazuh-agent repository | |
uses: actions/checkout@v4 | |
with: | |
repository: wazuh/wazuh-agent | |
ref: ${{ inputs.source_reference }} | |
persist-credentials: false | |
- name: Test package on ${{ matrix.distro_name }} | |
uses: ./.github/actions/linux_test_package | |
with: | |
system: rpm | |
tested_image: ${{ matrix.distro_name }} |