Skip to content

Commit 4c684ae

Browse files
authored
Merge pull request #12 from whamcloud/sagar-gharte/EHT-1293
Update RPM build to use correct make target
2 parents 41b38a0 + 37e6b1f commit 4c684ae

File tree

1 file changed

+13
-80
lines changed

1 file changed

+13
-80
lines changed

.github/workflows/whamcloud-release.yml

Lines changed: 13 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
6767
## 🚀 Installation Options
6868
69-
### Option 1: RPM Packages (Recommended for EL8/EL9/RHEL)
69+
### Option 1: RPM Packages (Recommended for EL8/RHEL8)
7070
7171
#### Enterprise Linux 8 / RHEL 8 / Rocky Linux 8 / AlmaLinux 8
7272
@@ -88,26 +88,6 @@ jobs:
8888
sudo systemctl status victorialogs
8989
```
9090
91-
#### Enterprise Linux 9 / RHEL 9 / Rocky Linux 9 / AlmaLinux 9
92-
93-
```bash
94-
# Download and install victorialogs
95-
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/victorialogs-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
96-
sudo dnf install -y ./victorialogs-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
97-
98-
# Download and install vlagent (optional)
99-
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlagent-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
100-
sudo dnf install -y ./vlagent-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
101-
102-
# Download and install vlogscli (optional)
103-
wget https://github.com/whamCloud/VictoriaLogs/releases/download/v${{ github.event.inputs.version }}/vlogscli-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
104-
sudo dnf install -y ./vlogscli-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
105-
106-
# Start services
107-
sudo systemctl enable --now victorialogs
108-
sudo systemctl status victorialogs
109-
```
110-
11191
### Option 2: Tarball Installation (Any Linux Distribution)
11292
11393
#### VictoriaLogs Server
@@ -217,37 +197,20 @@ jobs:
217197
repository: whamCloud/victorialogs-rpm
218198
path: victorialogs-rpm
219199

220-
- name: Build EL8 RPMs using Rocky Linux 8 container
200+
- name: Install RPM build tools
221201
run: |
222-
echo "Building EL8 RPMs for version ${{ github.event.inputs.version }}..."
223-
docker run --rm \
224-
-v $(pwd)/victorialogs-rpm:/build \
225-
-v $(pwd)/VictoriaLogs/bin:/binaries \
226-
-w /build \
227-
rockylinux:8 \
228-
bash -c "
229-
set -e
230-
echo 'Installing RPM build tools...'
231-
dnf install -y rpm-build systemd-rpm-macros rpmdevtools make
232-
echo 'Building EL8 RPMs...'
233-
make rpm VERSION=${{ github.event.inputs.version }}
234-
"
235-
236-
- name: Build EL9 RPMs using Rocky Linux 9 container
202+
if ! command -v rpmbuild &> /dev/null; then
203+
echo "Installing RPM build tools..."
204+
sudo dnf install -y rpm-build rpmdevtools
205+
else
206+
echo "RPM build tools already installed"
207+
fi
208+
209+
- name: Build EL8 RPMs
210+
working-directory: victorialogs-rpm
237211
run: |
238-
echo "Building EL9 RPMs for version ${{ github.event.inputs.version }}..."
239-
docker run --rm \
240-
-v $(pwd)/victorialogs-rpm:/build \
241-
-v $(pwd)/VictoriaLogs/bin:/binaries \
242-
-w /build \
243-
rockylinux:9 \
244-
bash -c "
245-
set -e
246-
echo 'Installing RPM build tools...'
247-
dnf install -y rpm-build systemd-rpm-macros rpmdevtools make
248-
echo 'Building EL9 RPMs...'
249-
make rpm VERSION=${{ github.event.inputs.version }}
250-
"
212+
echo "Building EL8 RPMs for version ${{ github.event.inputs.version }}..."
213+
make rpm VERSION=${{ github.event.inputs.version }}
251214
252215
- name: List built RPMs
253216
working-directory: victorialogs-rpm
@@ -265,16 +228,6 @@ jobs:
265228
asset_name: victorialogs-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
266229
asset_content_type: application/x-rpm
267230

268-
- name: Upload victorialogs EL9 RPM
269-
uses: actions/upload-release-asset@v1
270-
env:
271-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
272-
with:
273-
upload_url: ${{ steps.create_release.outputs.upload_url }}
274-
asset_path: ./victorialogs-rpm/output/victorialogs-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
275-
asset_name: victorialogs-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
276-
asset_content_type: application/x-rpm
277-
278231
- name: Upload vlagent EL8 RPM
279232
uses: actions/upload-release-asset@v1
280233
env:
@@ -285,16 +238,6 @@ jobs:
285238
asset_name: vlagent-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
286239
asset_content_type: application/x-rpm
287240

288-
- name: Upload vlagent EL9 RPM
289-
uses: actions/upload-release-asset@v1
290-
env:
291-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
292-
with:
293-
upload_url: ${{ steps.create_release.outputs.upload_url }}
294-
asset_path: ./victorialogs-rpm/output/vlagent-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
295-
asset_name: vlagent-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
296-
asset_content_type: application/x-rpm
297-
298241
- name: Upload vlogscli EL8 RPM
299242
uses: actions/upload-release-asset@v1
300243
env:
@@ -305,16 +248,6 @@ jobs:
305248
asset_name: vlogscli-${{ github.event.inputs.version }}-1.el8.x86_64.rpm
306249
asset_content_type: application/x-rpm
307250

308-
- name: Upload vlogscli EL9 RPM
309-
uses: actions/upload-release-asset@v1
310-
env:
311-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
312-
with:
313-
upload_url: ${{ steps.create_release.outputs.upload_url }}
314-
asset_path: ./victorialogs-rpm/output/vlogscli-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
315-
asset_name: vlogscli-${{ github.event.inputs.version }}-1.el9.x86_64.rpm
316-
asset_content_type: application/x-rpm
317-
318251
# ========================================
319252
# Cleanup Section
320253
# ========================================

0 commit comments

Comments
 (0)