53 lines
1.5 KiB
Bash
53 lines
1.5 KiB
Bash
#!/hint/bash -euE
|
|
# Copyright (C) 2024 Umorpha Systems
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
load_module "$(dirname -- "${BASH_SOURCE[0]}")/base-nginx.sh"
|
|
load_module "$(dirname -- "${BASH_SOURCE[0]}")/base-eclipse-creds.sh"
|
|
|
|
post_install+=(20:eclipse-leader:post_install)
|
|
eclipse-leader:post_install() {
|
|
local arg_mountpoint=$1
|
|
|
|
systemctl --root="$arg_mountpoint" enable eclipse-httpd.socket
|
|
systemctl --root="$arg_mountpoint" enable eclipse-trigger.timer
|
|
|
|
install -Dm644 /dev/stdin "$arg_mountpoint/etc/nginx/sites/ci.conf" <<-'EOF'
|
|
# -*- mode: nginx; nginx-indent-level: 4; intent-tabs-mode: nil -*-
|
|
server {
|
|
server_name ci.mothstuff.lol;
|
|
include /etc/nginx/snippets/listen.conf;
|
|
|
|
location / {
|
|
proxy_pass http://unix:/run/eclipse-httpd.socket;
|
|
proxy_http_version 1.1;
|
|
proxy_request_buffering off;
|
|
}
|
|
}
|
|
EOF
|
|
|
|
install -Dm644 /dev/stdin "$arg_mountpoint/etc/eclipse/actions.d/pitch.yml" <<-'EOF'
|
|
- triggers:
|
|
- repo_url: gitea@git.mothstuff.lol:lukeshu/pitch.git
|
|
rev: HEAD
|
|
run: |
|
|
set -ex
|
|
git clone gitea@git.mothstuff.lol:lukeshu/pitch.git
|
|
cd pitch
|
|
make
|
|
cp -v *.pdf "$ECLIPSE_ARTIFACTSDIR"
|
|
EOF
|
|
|
|
install -Dm644 /dev/stdin "$arg_mountpoint/etc/eclipse/actions.d/business-plan.yml" <<-'EOF'
|
|
- triggers:
|
|
- repo_url: gitea@git.mothstuff.lol:jp/business-plan.git
|
|
rev: HEAD
|
|
run: |
|
|
set -ex
|
|
git clone gitea@git.mothstuff.lol:jp/business-plan.git
|
|
cd business-plan
|
|
make
|
|
cp -v *.pdf "$ECLIPSE_ARTIFACTSDIR"
|
|
EOF
|
|
}
|