Skip to content

Commit

Permalink
Merge pull request #42 from karimra/add-deb-pkg
Browse files Browse the repository at this point in the history
add debian pkg build
  • Loading branch information
karimra authored Nov 11, 2023
2 parents b4a7728 + f5aaa8c commit ff3e811
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- "master"
- "main"
- "!releases/**"
env:
GOVER: 1.20.5
Expand Down
14 changes: 14 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}"
publishers:
- name: fury.io deb/rpm packages
ids:
- srl-grpc-tunnel-nfpms # this id belongs to nfpm section and is used to only upload artifacts from nfpm
dir: "{{ dir .ArtifactPath }}"
cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/srlinux/
changelog:
sort: asc
filters:
Expand All @@ -42,13 +48,21 @@ nfpms:
description: gRPC tunnel application for Nokia SR Linux
formats:
- rpm
- deb
license: "BSD 2"
bindir: /usr/local/bin/
contents:
- src: ./yang/grpc-tunnel.yang
dst: /opt/grpc-tunnel/yang/grpc-tunnel.yang
- src: ./scripts/postinstall.sh
dst: /opt/grpc-tunnel/scripts/postinstall.sh
- src: ./scripts/postremove.sh
dst: /opt/grpc-tunnel/scripts/postremove.sh
- src: ./yaml/grpc-tunnel.yaml
dst: /etc/opt/srlinux/appmgr/grpc-tunnel.yml
scripts:
postinstall: "scripts/postinstall.sh"
postremove: "scripts/postremove.sh"
overrides:
rpm:
scripts:
10 changes: 10 additions & 0 deletions scripts/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

appmgr=$(sr_linux --status | grep app_mgr | cut -d: -f 2 | tr -s ' ')

if [[ $appmgr != "not running" ]]
then
sr_cli tools system app-management application app_mgr reload
fi

gorele
8 changes: 8 additions & 0 deletions scripts/postremove.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

appmgr=$(sr_linux --status | grep app_mgr | cut -d: -f 2 | tr -s ' ')

if [[ $appmgr != "not running" ]]
then
sr_cli tools system app-management application app_mgr reload
fi

0 comments on commit ff3e811

Please sign in to comment.