Skip to content

Commit ba80f53

Browse files
committed
Add testing of RPM packages
1 parent 1e5133b commit ba80f53

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

.github/workflows/build.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ jobs:
6767

6868
test:
6969
needs: [version, commit_sha, assemble]
70+
strategy:
71+
matrix:
72+
os: [ {suffix: "amd64", ext: "deb"}, {suffix: "x86_64", ext: "rpm"} ]
7073
uses: ./.github/workflows/r_test.yml
7174
with:
72-
package: wazuh-indexer-${{ needs.version.outputs.version }}-${{ github.event_name == 'push' && '1' || inputs.revision }}_amd64_${{ needs.commit_sha.outputs.commit_sha }}.deb
75+
package: wazuh-indexer-${{ needs.version.outputs.version }}-${{ github.event_name == 'push' && '1' || inputs.revision }}_${{ matrix.os.suffix }}_${{ needs.commit_sha.outputs.commit_sha }}.${{ matrix.os.ext }}

.github/workflows/r_test.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,20 @@ jobs:
2424
name: ${{ inputs.package }}
2525
path: artifacts/dist
2626

27-
- name: Install package
27+
- name: Install package (RPM)
28+
if: endsWith(${{ inputs.package }}, "rpm")
29+
run: |
30+
sudo yum localinstall "artifacts/dist/${{ inputs.package }}"
31+
32+
- name: Install package (DEB)
33+
if: endsWith(${{ inputs.package }}, "deb")
2834
run: |
2935
sudo dpkg -i "artifacts/dist/${{ inputs.package }}"
3036
3137
- uses: actions/checkout@v4
38+
if: endsWith(${{ inputs.package }}, "deb")
3239
- name: Generate and deploy certificates
40+
if: endsWith(${{ inputs.package }}, "deb")
3341
uses: addnab/docker-run-action@v3
3442
with:
3543
image: wazuh/wazuh-certs-generator:0.0.1
@@ -48,17 +56,21 @@ jobs:
4856
ls /certs
4957
5058
- run: sudo systemctl daemon-reload
51-
- run: |
59+
if: endsWith(${{ inputs.package }}, "deb")
60+
- if: endsWith(${{ inputs.package }}, "deb")
61+
run: |
5262
if ! sudo systemctl enable wazuh-indexer.service; then
5363
sudo journalctl --no-pager -u wazuh-indexer.service
5464
exit 1
5565
fi
56-
- run: |
66+
- if: endsWith(${{ inputs.package }}, "deb")
67+
run: |
5768
if ! sudo systemctl start wazuh-indexer; then
5869
sudo journalctl --no-pager -u wazuh-indexer.service
5970
exit 1
6071
fi
61-
- run: |
72+
- if: endsWith(${{ inputs.package }}, "deb")
73+
run: |
6274
if ! sudo systemctl status --no-pager wazuh-indexer -n 100; then
6375
sudo journalctl --no-pager -u wazuh-indexer.service
6476
exit 1

0 commit comments

Comments
 (0)