Merge pull request #6 from waja/github_ci
Adding initial version of packaging test
This commit is contained in:
commit
52fd18c887
38
.github/workflows/packaging_test.yml
vendored
Normal file
38
.github/workflows/packaging_test.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: Packaging Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- $default-branch
|
||||
- development
|
||||
- master
|
||||
# Run tests for any PRs
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
SOURCE_DIR: ./
|
||||
ARTIFACTS_DIR: debian/build/release/
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
env:
|
||||
DEBIAN_FRONTEND: "noninteractive"
|
||||
- name: Remove github artefacts
|
||||
run: |
|
||||
rm -rf .github/
|
||||
- name: Adjust distibution in changelog file
|
||||
run: |
|
||||
sed -i '0,/restricted/s//stable/' debian/changelog
|
||||
- name: Build Debian package
|
||||
uses: dawidd6/action-debian-package@v1
|
||||
# uses: pi-top/action-debian-package@v4
|
||||
with:
|
||||
# source_directory: "${SOURCE_DIR}"
|
||||
# artifacts_directory: "${ARTIFACTS_DIR}"
|
||||
artifacts_directory: debian/build/release/
|
||||
# target_architectures: "amd64,i386"
|
||||
# distribution: 'stable'
|
||||
# os: 'debian'
|
38
.github/workflows/release.yml
vendored
Normal file
38
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: Build Packages
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published, created, edited]
|
||||
# Run tests for any PRs
|
||||
# pull_request:
|
||||
|
||||
env:
|
||||
SOURCE_DIR: ./
|
||||
ARTIFACTS_DIR: debian/build/release/
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
env:
|
||||
DEBIAN_FRONTEND: "noninteractive"
|
||||
- name: Remove github artefacts
|
||||
run: |
|
||||
rm -rf .github/
|
||||
- name: Adjust distibution in changelog file
|
||||
run: |
|
||||
sed -i '0,/restricted/s//stable/' debian/changelog
|
||||
- name: Build Debian package
|
||||
uses: pi-top/action-debian-package@v4
|
||||
with:
|
||||
artifacts_directory: debian/build/release/
|
||||
target_architectures: "amd64,i386"
|
||||
- name: Upload the artifacts
|
||||
uses: skx/github-action-publish-binaries@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
# releaseId: 'debian/18.20201012+4'
|
||||
# releaseId: ${{ needs.create_release.outputs.id }}
|
||||
args: debian/build/release/*
|
2
debian/packaging-helper.py
vendored
2
debian/packaging-helper.py
vendored
|
@ -24,7 +24,7 @@ ALLOWED_TESTS_FIELDS = ('Depends',
|
|||
# find all plugins
|
||||
__basedir__ = os.path.realpath(os.path.dirname(sys.argv[0]) + os.path.sep + '..')
|
||||
__plugins__ = [p for p in os.listdir(__basedir__)
|
||||
if (os.path.isdir(__basedir__ + os.path.sep + p) and p!='debian' and p!='.git' and p!='.pc' and p!='redhat')]
|
||||
if (os.path.isdir(__basedir__ + os.path.sep + p) and p!='debian' and p!='.git' and p!='.github' and p!='.pc' and p!='redhat')]
|
||||
__plugins__.sort()
|
||||
|
||||
|
||||
|
|
2
debian/rules
vendored
2
debian/rules
vendored
|
@ -4,7 +4,7 @@
|
|||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
|
||||
PLUGINS := $(shell find $(CURDIR) -mindepth 1 -maxdepth 1 -name .git -prune -o -name .pc -prune -o -name debian -prune -o -type d -printf '%f\n' | sort)
|
||||
PLUGINS := $(shell find $(CURDIR) -mindepth 1 -maxdepth 1 -name .git* -prune -o -name .pc -prune -o -name debian -prune -o -type d -printf '%f\n' | sort)
|
||||
PKGNAME = monitoring-plugins-cyconet
|
||||
|
||||
%:
|
||||
|
|
Loading…
Reference in a new issue