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 14 commits
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
28 changes: 28 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish-Nightly-Packages

on:
push:
branches:
- main

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 --manifest-path server/Cargo.toml --no-build
- name: Publish apt package
run: >-
/usr/bin/curl
-vvvv
--fail
-u 'github:${{ secrets.NEXUS_PASSWORD }}'
-H "Content-Type: multipart/form-data"
--data-binary "@./$(find target/debian/ -name *.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.

12 changes: 11 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[package]
name = "stackable-agent"
version = "0.1.0"
description = "Tha component of the Stackable Platform that manages installation of services on the workers"
version = "0.1.0-nightly"
authors = ["Sönke Liebau <soenke.liebau@stackable.de>"]
edition = "2018"
license = "Apache-2.0"

[dependencies]
# We are currently referencing the Krustlet directly from a Stackable fork of the official repository.
Expand Down Expand Up @@ -46,3 +48,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 = [
["packaging/config/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