Compare commits
41 Commits
v0.0.1-alp
...
0.0.1-oqta
| Author | SHA1 | Date | |
|---|---|---|---|
| 5dff6d2bad | |||
| 320d02f734 | |||
| 9de928f114 | |||
| d3a914e020 | |||
| 3f034c6964 | |||
| dc48b906a8 | |||
| 289f1cf6ce | |||
| 36e9f9ee39 | |||
| 346fd6b33c | |||
| fee56ed714 | |||
| 7c0e5f7e03 | |||
| 18f396f51b | |||
| 96ed3d0679 | |||
| b6e9476bda | |||
| 6c2a122796 | |||
| 63d2e92f8b | |||
| dd68c66b87 | |||
| 568bbb5b5e | |||
| 14cc769418 | |||
| 76feb7615d | |||
| c3d521e5a0 | |||
| b7b950d4ac | |||
| 4fd49d0ea0 | |||
| 458514e04b | |||
| 1b8c00d7df | |||
| 5dbaa652c5 | |||
| fb411826ca | |||
| 3cce4fd900 | |||
| a67bfef0ce | |||
| 0af02afb20 | |||
| 17da27123e | |||
| f429512a14 | |||
| 933d194e5c | |||
| 162fd61936 | |||
| 4405df38aa | |||
| 6f0d30cde1 | |||
| 8643daa984 | |||
| c373b194d6 | |||
| 9f707e8504 | |||
| e0663ebfab | |||
| 492b55c313 |
@@ -2,8 +2,7 @@ name: build-debian-package
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- '*'
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -14,19 +13,19 @@ jobs:
|
|||||||
run: git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git .
|
run: git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git .
|
||||||
- name: "Git checkout"
|
- name: "Git checkout"
|
||||||
run: git checkout "${{ gitea.sha }}"
|
run: git checkout "${{ gitea.sha }}"
|
||||||
|
- name: "Submodules auschecken"
|
||||||
|
run: git submodule update --init
|
||||||
- name: "Dotnet SDK einrichten"
|
- name: "Dotnet SDK einrichten"
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: "10.0.x"
|
dotnet-version: "10.0.x"
|
||||||
- name: "Oqtane Framework auschecken"
|
|
||||||
run: git clone ${{ gitea.server_url }}/Diplomarbeit-Absolventenverein/oqtane.framework.git
|
|
||||||
- name: "Oqtane Framework restore"
|
|
||||||
run: dotnet restore ./oqtane.framework/Oqtane.slnx --verbosity detailed
|
|
||||||
- name: "Oqtane Framework bauen"
|
|
||||||
run: dotnet build -c Release ./oqtane.framework/Oqtane.slnx
|
|
||||||
- name: "Oqtane Framework publish"
|
|
||||||
run: dotnet publish -c Release ./oqtane.framework/Oqtane.slnx -o ./alumnihub_10.0_amd64/opt/alumnihub
|
|
||||||
- name: "Build .deb"
|
- name: "Build .deb"
|
||||||
run: ./run-build.sh "${{ gitea.ref_name }}"" "./alumnihub_10.0_amd64"
|
run: ./run-build.sh "${{ gitea.ref_name }}" "./alumnihub" "Release"
|
||||||
- name: "Upload .deb"
|
- name: "Upload .deb"
|
||||||
run: curl --user kocoder:${{ secrets.REGISTRY_TOKEN_KOCODER }} --upload-file ./alumnihub_10.0_amd64.deb https://git.kocoder.xyz/api/packages/Diplomarbeit-Absolventenverein/debian/pool/trixie/main/upload
|
run: curl --user kocoder:${{ secrets.REGISTRY_TOKEN_KOCODER }} --upload-file ./alumnihub.deb https://git.kocoder.xyz/api/packages/Diplomarbeit-Absolventenverein/debian/pool/trixie/main/upload
|
||||||
|
- name: "Create release"
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
./alumnihub.deb
|
||||||
|
./alumnihub/opt/alumnihub/Packages/*.nupkg
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.idea/
|
||||||
30
.gitmodules
vendored
Normal file
30
.gitmodules
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[submodule "oqtane.framework"]
|
||||||
|
path = oqtane.framework
|
||||||
|
url = https://git.kocoder.xyz/Diplomarbeit-Absolventenverein/oqtane.framework.git
|
||||||
|
[submodule "Module.AdminModules"]
|
||||||
|
path = Module.AdminModules
|
||||||
|
url = https://git.kocoder.xyz/Diplomarbeit-Absolventenverein/Module.AdminModules.git
|
||||||
|
[submodule "Theme.SZUAbsolventenverein"]
|
||||||
|
path = Theme.SZUAbsolventenverein
|
||||||
|
url = https://git.kocoder.xyz/Diplomarbeit-Absolventenverein/Theme.SZUAbsolventenverein.git
|
||||||
|
[submodule "Module.EventRegistration"]
|
||||||
|
path = Module.EventRegistration
|
||||||
|
url = https://git.kocoder.xyz/Diplomarbeit-Absolventenverein/Module.EventRegistration.git
|
||||||
|
[submodule "Module.HallOfFame"]
|
||||||
|
path = Module.HallOfFame
|
||||||
|
url = https://git.kocoder.xyz/Diplomarbeit-Absolventenverein/Module.HallOfFame.git
|
||||||
|
[submodule "Module.PremiumArea"]
|
||||||
|
path = Module.PremiumArea
|
||||||
|
url = https://git.kocoder.xyz/Diplomarbeit-Absolventenverein/Module.PremiumArea.git
|
||||||
|
[submodule "fixProps"]
|
||||||
|
path = fixProps
|
||||||
|
url = https://github.com/oqtane/oqtane.FixProps
|
||||||
|
[submodule "alumnihub/opt/alumnihub-helpers"]
|
||||||
|
path = alumnihub/opt/alumnihub-helpers
|
||||||
|
url = https://git.kocoder.xyz/Diplomarbeit-Absolventenverein/Customer.git
|
||||||
|
[submodule "interfaces"]
|
||||||
|
path = interfaces
|
||||||
|
url = https://git.kocoder.xyz/Diplomarbeit-Absolventenverein/Interfaces
|
||||||
|
[submodule "Module.BlackBoard"]
|
||||||
|
path = Module.BlackBoard
|
||||||
|
url = https://git.kocoder.xyz/Diplomarbeit-Absolventenverein/Module.BlackBoard.git
|
||||||
1
Module.AdminModules
Submodule
1
Module.AdminModules
Submodule
Submodule Module.AdminModules added at bdf54ef5ae
1
Module.BlackBoard
Submodule
1
Module.BlackBoard
Submodule
Submodule Module.BlackBoard added at f633708b57
1
Module.EventRegistration
Submodule
1
Module.EventRegistration
Submodule
Submodule Module.EventRegistration added at ed476ee35f
1
Module.HallOfFame
Submodule
1
Module.HallOfFame
Submodule
Submodule Module.HallOfFame added at 749a4eb5fa
1
Module.PremiumArea
Submodule
1
Module.PremiumArea
Submodule
Submodule Module.PremiumArea added at 206b974ab3
@@ -1,2 +1,5 @@
|
|||||||
# AlumniHub Debian Package
|
# AlumniHub Debian Package
|
||||||
Skripte die mittels Gitea Actions automatisch ein APT / .deb Packet bauen und unter Packages veröffentlichen.
|
Skripte die mittels Gitea Actions automatisch ein APT / .deb Packet bauen und unter Packages veröffentlichen.
|
||||||
|
|
||||||
|
Um ein Modul upzudaten: die Submodules updaten (auf die gewünschte Referenz bringen) dann commiten, einen git tag erstellen und alles gesammelt pushen.
|
||||||
|
Eine github/gitea actions Pipeline klont sich automatisch alle Submodules, richtet dotnet ein und ruft run-build.sh auf. in run-build.sh werden dann die einzelnen Projekte mithilfe von dem dotnet compiler kompiliert und das ergebnis im alumnihub order abgelegt. Dieser alumnihub order ist die Grundlage für das resultierende Debian Paket. Dieses wird mithilfe eines Aufrufes von dpkg-deb gebaut. Nach dem das Paket gebaut worden ist, wird dieses Debian Paket genommen und in die Gitea debian Pakete registry hochgeladen und ein release mit dem debian paket und den einzelnen Nugets auf Gitea veröffentlicht.
|
||||||
1
Theme.SZUAbsolventenverein
Submodule
1
Theme.SZUAbsolventenverein
Submodule
Submodule Theme.SZUAbsolventenverein added at 2ac142ed7e
@@ -1,5 +1,4 @@
|
|||||||
Package: alumnihub
|
Package: alumnihub
|
||||||
Version: 10.0-2
|
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Essential: no
|
Essential: no
|
||||||
Priority: optional
|
Priority: optional
|
||||||
9
alumnihub/DEBIAN/postinst
Executable file
9
alumnihub/DEBIAN/postinst
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
adduser --system alumnihub
|
||||||
|
|
||||||
|
if [ ! -e /opt/alumnihub/appsettings.json ]; then
|
||||||
|
cp /opt/alumnihub/appsettings.release.json /opt/alumnihub/appsettings.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R alumnihub:root /opt/alumnihub
|
||||||
|
|
||||||
1
alumnihub/DEBIAN/preinst
Executable file
1
alumnihub/DEBIAN/preinst
Executable file
@@ -0,0 +1 @@
|
|||||||
|
#!/bin/bash
|
||||||
@@ -2,14 +2,14 @@
|
|||||||
Description=Alumnihub Webservice
|
Description=Alumnihub Webservice
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/oqtane
|
WorkingDirectory=/opt/alumnihub
|
||||||
ExecStart=/usr/bin/dotnet /opt/alumnihub/Oqtane.Server.dll
|
ExecStart=/usr/bin/dotnet /opt/alumnihub/Oqtane.Server.dll
|
||||||
Restart=always
|
Restart=always
|
||||||
# Restart service after 10 seconds if the dotnet service crashes:
|
# Restart service after 10 seconds if the dotnet service crashes:
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
KillSignal=SIGINT
|
KillSignal=SIGINT
|
||||||
SyslogIdentifier=alumnihub
|
SyslogIdentifier=alumnihub
|
||||||
User=oqtane
|
User=alumnihub
|
||||||
Environment=ASPNETCORE_ENVIRONMENT=Production
|
Environment=ASPNETCORE_ENVIRONMENT=Production
|
||||||
Environment=ASPNETCORE_URLS="http://127.0.0.1:5000"
|
Environment=ASPNETCORE_URLS="http://127.0.0.1:5000"
|
||||||
Environment=ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
|
Environment=ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
|
||||||
1
alumnihub/opt/alumnihub-helpers
Submodule
1
alumnihub/opt/alumnihub-helpers
Submodule
Submodule alumnihub/opt/alumnihub-helpers added at 957e587593
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
deluser oqtane
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
useradd oqtane
|
|
||||||
1
fixProps
Submodule
1
fixProps
Submodule
Submodule fixProps added at 10f645be52
1
interfaces
Submodule
1
interfaces
Submodule
Submodule interfaces added at 3cc6eba28e
1
oqtane.framework
Submodule
1
oqtane.framework
Submodule
Submodule oqtane.framework added at 6db5c924c7
36
run-build.sh
36
run-build.sh
@@ -1,8 +1,42 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
VERSION="$1"
|
VERSION="$1"
|
||||||
DEBIAN_PACKAGE_PATH="$2"
|
DEBIAN_PACKAGE_PATH="$2"
|
||||||
|
ENVIRONMENT="$3"
|
||||||
|
|
||||||
|
if [ "$#" -ne 3 ]; then
|
||||||
|
echo "Error: You must provide exactly three arguments."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$VERSION" "$DEBIAN_PACKAGE_PATH" "$ENVIRONMENT"
|
||||||
|
|
||||||
|
echo "Building oqtane.framework"
|
||||||
|
|
||||||
|
dotnet restore ./oqtane.framework/Oqtane.slnx
|
||||||
|
dotnet build ./oqtane.framework/Oqtane.slnx --no-restore
|
||||||
|
dotnet build -c "$ENVIRONMENT" ./oqtane.framework/Oqtane.slnx --no-restore
|
||||||
|
dotnet publish -c "$ENVIRONMENT" ./oqtane.framework/Oqtane.Server/Oqtane.Server.csproj -o ./alumnihub/opt/alumnihub --no-restore
|
||||||
|
|
||||||
|
dotnet restore ./interfaces/SZUAbsolventenverein.slnx
|
||||||
|
dotnet build -c "$ENVIRONMENT" ./interfaces/SZUAbsolventenverein.slnx --no-restore
|
||||||
|
|
||||||
|
mkdir -p ./oqtane.framework/Oqtane.Server/Packages
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Building Modules and Themes"
|
||||||
|
|
||||||
|
for module in $(ls . | grep -E 'Module|Theme')
|
||||||
|
do
|
||||||
|
echo "######## Building $module"
|
||||||
|
dotnet restore ./$module/*.slnx
|
||||||
|
dotnet build -c "$ENVIRONMENT" ./$module/*.slnx --no-restore
|
||||||
|
dotnet publish -c "$ENVIRONMENT" ./$module/*.slnx --no-restore
|
||||||
|
done
|
||||||
|
|
||||||
|
cp -r ./oqtane.framework/Oqtane.Server/Packages ./alumnihub/opt/alumnihub/Packages
|
||||||
|
|
||||||
|
rm ./alumnihub/opt/alumnihub/appsettings.json
|
||||||
|
|
||||||
echo $VERSION $DEBIAN_PACKAGE_PATH
|
|
||||||
|
|
||||||
echo "Version: ${VERSION}" >> $DEBIAN_PACKAGE_PATH/DEBIAN/control
|
echo "Version: ${VERSION}" >> $DEBIAN_PACKAGE_PATH/DEBIAN/control
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user