Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Adds building and publishing of nightly deb package. #78

Merged
merged 15 commits into from
Mar 2, 2021
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
Next Next commit
Adds github action to build on debian10 runner.
Adds build of deb package.
Adds publishing of package to nexus

Renamed workflow

Enabled manually triggering nightly job

First try of building rpm

Removed running tests for now

Fixed path to rpm Spec

Added pwd to prefix topdir with buildtarget directory

Path stuff

More path stuff

Hopefully fixed some stuff..

Forgot to check in half the files..

Hard coded service name

Steal password..

Steal password..

Added Centos7 build job

First try of adding deb package information

Added assets

Added apt build

Removed copy&paste error

Changed agent config directories and added postinst script to create empty dirs.

Added DEBHELPER marker to postinst

Added config options to place certificate and key file under the agent data directory by default.

Refactored to include only deb changes.
  • Loading branch information
soenkeliebau committed Feb 27, 2021
commit fde22837353ea413ce0007f3e014760e9b99bf9d
23 changes: 23 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Centos8-Nightly

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
debian10:
runs-on: debian10
steps:
- uses: actions/checkout@v2
- name: Build
run: ~/.cargo/bin/cargo +nightly build --verbose --release
- name: Build apt package
run: ~/.cargo/bin/cargo deb
- name: Publish apt package
run: /usr/bin/curl -u 'github:${{ secrets.NEXUS_PASSWORD }}' -H "Content-Type: multipart/form-data" --data-binary "@./target/debian/stackable-agent_0.1.0-nightly_amd64.deb" "https://repo.stackable.tech/repository/deb-nightly/"
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stackable-agent"
version = "0.1.0"
version = "0.1.0-nightly"
authors = ["Sönke Liebau <soenke.liebau@stackable.de>"]
edition = "2018"

Expand Down Expand Up @@ -46,3 +46,11 @@ serde_yaml = "0.8"
opt-level = "s"
lto = true
codegen-units = 1

[package.metadata.deb]
maintainer-scripts = "packaging/debian/"
systemd-units = { enable = false }
assets = [
["rpm/SOURCES/stackable-agent-0.1.0/etc/stackable-agent/agent.conf", "etc/stackable-agent/", "644"],
["target/release/agent", "opt/stackable-agent/stackable-agent", "755"],
]
5 changes: 5 additions & 0 deletions packaging/config/agent.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--package-directory=/var/lib/stackable/packages
--config-directory=/var/lib/stackable/config
--data-directory=/var/lib/stackable/agentdata
soenkeliebau marked this conversation as resolved.
Show resolved Hide resolved
--server-key-file=/var/lib/stackable/agentdata/config/agent.key
--server-cert-file=/var/lib/stackable/agentdata/config/agent.crt
7 changes: 7 additions & 0 deletions packaging/debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

mkdir -p /var/lib/stackable/packages
mkdir -p /var/lib/stackable/config
mkdir -p /var/lib/stackable/agentdata/config

#DEBHELPER#
14 changes: 14 additions & 0 deletions packaging/debian/service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Stackable Agent
Before=
After=network.target
[Service]
User=root
ExecStart=/opt/stackable-agent/stackable-agent
Restart=on-abort
StandardOutput=journal
StandardError=journal
Environment="CONFIG_FILE=/etc/stackable-agent/agent.conf"
Environment="RUST_LOG=info,stackable_agent::provider::states=debug,stackable_agent::agentconfig=trace"
soenkeliebau marked this conversation as resolved.
Show resolved Hide resolved
[Install]
WantedBy=multi-user.target