-
Notifications
You must be signed in to change notification settings - Fork 27
153 lines (146 loc) · 4.96 KB
/
linux_build_package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
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
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
id:
type: string
required: false
jobs:
build-binaries-agent-linux-packages:
uses: wazuh/wazuh-agent/.github/workflows/linux_compile_repository.yml@enhancement/137-pkg-build-trigger
with:
docker_image_tag: ${{ inputs.docker_image_tag }}
architecture: ${{ inputs.architecture }}
source_reference: ${{ inputs.source_reference }}
id: ${{ inputs.id }}
build-package-agent-linux-deb-packages:
needs: build-binaries-agent-linux-packages
if: ${{ inputs.system == 'deb' || inputs.system == 'both' }}
uses: wazuh/wazuh-agent/.github/workflows/linux_package_binaries.yml@enhancement/137-pkg-build-trigger
with:
docker_image_tag: ${{ inputs.docker_image_tag }}
architecture: ${{ inputs.architecture }}
system: deb
revision: ${{ inputs.revision }}
is_stage: ${{ inputs.is_stage }}
checksum: ${{ inputs.checksum }}
source_reference: ${{ inputs.source_reference }}
upload_to_s3: false
id: ${{ inputs.id }}
build-package-agent-linux-rpm-packages:
needs: build-binaries-agent-linux-packages
if: ${{ inputs.system == 'rpm' || inputs.system == 'both' }}
uses: wazuh/wazuh-agent/.github/workflows/linux_package_binaries.yml@enhancement/137-pkg-build-trigger
with:
docker_image_tag: ${{ inputs.docker_image_tag }}
architecture: ${{ inputs.architecture }}
system: rpm
revision: ${{ inputs.revision }}
is_stage: ${{ inputs.is_stage }}
checksum: ${{ inputs.checksum }}
source_reference: ${{ inputs.source_reference }}
upload_to_s3: false
id: ${{ inputs.id }}
test-package-agent-linux-deb-packages:
needs: build-package-agent-linux-deb-packages
if: ${{ inputs.system == 'deb' || inputs.system == 'both' }}
uses: wazuh/wazuh-agent/.github/workflows/linux_test_deb_package.yml@enhancement/137-pkg-build-trigger
with:
architecture: ${{ inputs.architecture }}
source_reference: ${{ inputs.source_reference }}
id: ${{ inputs.id }}
test-package-agent-linux-rpm-packages:
needs: build-package-agent-linux-rpm-packages
if: ${{ inputs.system == 'rpm' || inputs.system == 'both' }}
uses: wazuh/wazuh-agent/.github/workflows/linux_test_rpm_package.yml@enhancement/137-pkg-build-trigger
with:
architecture: ${{ inputs.architecture }}
source_reference: ${{ inputs.source_reference }}
id: ${{ inputs.id }}