-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (49 loc) · 1.87 KB
/
offline-installation.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
name: Offline installation test
on:
pull_request:
paths:
- 'install_functions/wazuh-offline-download.sh'
- 'install_functions/wazuh-offline-installation.sh'
workflow_dispatch:
jobs:
Build-wazuh-install-script:
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_after_successful_duplicate: 'false'
- uses: actions/checkout@v4
- name: Build wazuh-install script and use staging packages
run: bash builder.sh -i -d staging
- uses: actions/upload-artifact@v3
with:
name: script
path: ./wazuh-install.sh
if-no-files-found: error
Test-offline-installation-debian:
runs-on: ubuntu-latest
needs: Build-wazuh-install-script
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: script
- name: Move installation assistant script
run: cp $GITHUB_WORKSPACE/wazuh-install.sh $GITHUB_WORKSPACE/.github/actions/offline-installation/wazuh-install.sh
- name: Run script
run: sudo bash $GITHUB_WORKSPACE/.github/actions/offline-installation/offline-installation.sh
Test-offline-installation-rpm:
runs-on: ubuntu-latest
needs: Build-wazuh-install-script
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: script
- name: Move installation assistant script
run: cp $GITHUB_WORKSPACE/wazuh-install.sh $GITHUB_WORKSPACE/.github/actions/offline-installation/wazuh-install.sh
- name: Launch docker and run script
run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/offline-installation/:/tests centos:centos7 bash /tests/offline-installation.sh