Skip to content

Commit e18f1aa

Browse files
committed
publish deb pakcge by fixing issues with debain package generation
1 parent c081025 commit e18f1aa

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

.github/workflows/release.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
branches:
6-
- ashima-server
6+
- fix-deb
77

88
jobs:
99
release:
@@ -16,7 +16,8 @@ jobs:
1616
- cos-csi-mounter
1717

1818
env:
19-
IS_LATEST_RELEASE: 'true'
19+
IS_LATEST_RELEASE: 'false'
20+
APP_VERSION: 0.0.1
2021

2122
steps:
2223
- name: Checkout Code
@@ -55,11 +56,11 @@ jobs:
5556
uses: softprops/action-gh-release@v1
5657
with:
5758
files: |
58-
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-latest.tar.gz
59-
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-latest.tar.gz.sha256
60-
tag_name: v0.1.0-dev02
61-
name: v0.1.0-dev02
62-
body: CSR generated with SHA1 is not supported to get certs using Metadata.
59+
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-${{ env.APP_VERSION }}.tar.gz
60+
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-${{ env.APP_VERSION }}.tar.gz.sha256
61+
tag_name: v0.0.1-ansible1
62+
name: v0.0.1-ansible1
63+
body: Generate debian package with security fixes
6364
prerelease: ${{ env.IS_LATEST_RELEASE != 'true' }}
6465

6566
- name: Perform CodeQL Analysis

cos-csi-mounter/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME := cos-csi-mounter
2-
APP_VERSION := 0.0.0
2+
APP_VERSION := 0.0.1
33
BUILD_DIR := $(NAME)-$(APP_VERSION)
44
BIN_DIR := bin
55

@@ -8,7 +8,7 @@ MAINTAINER := "IKS Storage"
88
DEB_ARCH := all
99
DESCRIPTION := "IBM cos-csi-mounter service"
1010

11-
INSTALL_TAR_FILE := "$(NAME)-latest.tar.gz"
11+
INSTALL_TAR_FILE := "$(NAME)-$(APP_VERSION).tar.gz"
1212
CHECKSUM_FILE := "$(INSTALL_TAR_FILE).sha256"
1313

1414
test:
@@ -50,8 +50,8 @@ tar-package:
5050
tar-package:
5151
mkdir packages
5252
cp ${NAME}-* packages/
53-
cd packages && tar -czvf ../$(INSTALL_TAR_FILE) *
54-
sha256sum ./$(INSTALL_TAR_FILE) > $(CHECKSUM_FILE)
53+
cd packages && tar -czvf $(INSTALL_TAR_FILE) *
54+
sha256sum $(INSTALL_TAR_FILE) > $(CHECKSUM_FILE)
5555
@printf "Production - Install package created ok: $(INSTALL_TAR_FILE)\n"
5656

5757
clean:

cos-csi-mounter/install/postinst.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#!/bin/bash
22
set -e
3-
43
# Once package is installed this script will called to enable the service
4+
5+
# Reload systemd unit files
6+
systemctl daemon-reload || true
7+
8+
echo "[postinst] Enabling service..."
59
systemctl enable cos-csi-mounter.service
10+
11+
echo "[postinst] Starting service..."
612
systemctl start cos-csi-mounter.service
13+
14+
echo "[postinst] Done."

0 commit comments

Comments
 (0)