Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ploutos packaging workflow. #26

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/pkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Packaging

on:
# Since this workflow is quite costly, we only run it automatically on
# release tags. Otherwise trigger it manually.
push:
tags:
- v*

# Allow manually triggering the workflow.
workflow_dispatch:

jobs:
package:
uses: NLnetLabs/ploutos/.github/workflows/pkg-rust.yml@v7
secrets:
DOCKER_HUB_ID: ${{ secrets.DOCKER_HUB_ID }}
partim marked this conversation as resolved.
Show resolved Hide resolved
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
with:
docker_org: nlnetlabs
docker_repo: dnsi
docker_build_rules: pkg/rules/docker-images-to-build.yml
partim marked this conversation as resolved.
Show resolved Hide resolved
docker_sanity_check_command: --version

package_build_rules: pkg/rules/packages-to-build.yml
package_test_scripts_path: pkg/test-scripts/test-<package>.sh

rpm_scriptlets_path: pkg/rpm/scriptlets.toml
partim marked this conversation as resolved.
Show resolved Hide resolved

52 changes: 52 additions & 0 deletions pkg/rules/packages-to-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This matrix definition is used as both the package_build_rules and the
# package_test_rules Ploutos packaging workflow inputs.
---
pkg:
- "dnsi"
image:
- "ubuntu:xenial" # ubuntu/16.04
- "ubuntu:bionic" # ubuntu/18.04
- "ubuntu:focal" # ubuntu/20.04
- "ubuntu:jammy" # ubuntu/22.04
- "debian:stretch" # debian/9
- "debian:buster" # debian/10
- "debian:bullseye" # debian/11
- "debian:bookworm" # debian/12
- 'centos:7'
- 'rockylinux:8' # compatible with EOL centos:8
- 'rockylinux:9'
target:
- 'x86_64'
test-image:
- ""
include:
- pkg: "rtrtr"
image: 'debian:bullseye'
target: 'armv7-unknown-linux-musleabihf'

- pkg: 'dnsi'
image: 'debian:buster'
target: 'arm-unknown-linux-musleabihf'

- pkg: 'dnsi'
image: 'rockylinux:9'
target: 'x86_64'
test-image: 'almalinux:9'

- pkg: 'dnsi'
image: 'rockylinux:9'
target: 'x86_64'
test-image: 'centos:9-Stream'

test-mode:
- 'fresh-install'
- 'upgrade-from-published'
partim marked this conversation as resolved.
Show resolved Hide resolved

test-exclude:
ximon18 marked this conversation as resolved.
Show resolved Hide resolved
- pkg: 'dnsi'
image: 'rockylinux:9'
mode: 'upgrade-from-published'
- pkg: 'dnsi'
image: 'debian:bookworm'
mode: 'upgrade-from-published'

15 changes: 15 additions & 0 deletions pkg/test-scripts/test-dnsi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -eo pipefail
set -x

case $1 in
post-install)
echo -e "\nDNSI VERSION:"
dnsi --version

post-upgrade)
echo -e "\nDNSI VERSION:"
dnsi --version
esac

Loading