-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy path6_builderpackage_agent-macos.yml
More file actions
137 lines (126 loc) · 4.18 KB
/
Copy path6_builderpackage_agent-macos.yml
File metadata and controls
137 lines (126 loc) · 4.18 KB
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
run-name: Packages - Build Wazuh agent Mac OS packages - ${{ inputs.architecture }}${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }} ${{ inputs.id }}
name: Build Wazuh agent Mac OS packages
on:
workflow_dispatch:
inputs:
architecture:
type: choice
description: Package architecture [intel64, arm64].
options:
- intel64
- arm64
required: true
revision:
type: string
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:
type: string
description: |
Branch/tag of wazuh/wazuh-agent to generate packages.
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:
architecture:
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: false
id:
type: string
required: false
jobs:
build-binaries-agent-macos-packages:
runs-on: ${{ inputs.architecture == 'arm64' && 'macos-14' || 'macos-13' }}
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
timeout-minutes: 50
name: Build Mac OS wazuh-agent sources - ${{ inputs.architecture }}
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 Mac OS Repository
uses: ./.github/actions/6_builderpackage_agent_macos
with:
architecture: ${{ inputs.architecture }}
gh_token: ${{ secrets.CI_WAZUH_AGENT_PACKAGES_CLASSIC }}
build-package-agent-macos-packages:
needs: build-binaries-agent-macos-packages
runs-on: macos-14
timeout-minutes: 50
name: Build Mac OS wazuh-agent package - ${{ inputs.architecture }}${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }}
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 Mac OS Package - ${{ inputs.architecture }}
uses: ./.github/actions/6_builderpackage_binary_macos
with:
architecture: ${{ inputs.architecture }}
revision: ${{ inputs.revision }}
is_stage: ${{ inputs.is_stage }}
checksum: ${{ inputs.checksum }}
test-package-agent-macos-packages:
needs: build-package-agent-macos-packages
runs-on: ${{ inputs.architecture == 'arm64' && 'macos-14' || 'macos-13' }}
timeout-minutes: 50
name: Test Mac OS wazuh-agent package - ${{ inputs.architecture }}${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }}
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 Mac OS Package - ${{ inputs.architecture }}
uses: ./.github/actions/6_testcomponent_install_macos
with:
checksum: ${{ inputs.checksum }}
upload_to_s3: 'false'