From 9ad588493f7273e9370ee36e5b4efc8613879942 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 13 Oct 2024 19:09:24 -0400 Subject: [PATCH 1/3] Fix jobs missing libgdiplus --- .github/workflows/ci-pipeline.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index ccd353acf7..b95a880f01 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -51,6 +51,11 @@ jobs: name: Build ReleaseNotes for Other Jobs runs-on: ubuntu-latest steps: + - name: Install Native Dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgdiplus + - name: Setup dotnet uses: actions/setup-dotnet@v4 with: @@ -84,6 +89,11 @@ jobs: env: TGS_TELEMETRY_KEY_FILE: /tmp/tgs_telemetry_key.txt steps: + - name: Install Native Dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgdiplus + - name: Setup dotnet uses: actions/setup-dotnet@v4 with: From 4f3050125d512ab3b9ede0bc9c7ffd614a597fa8 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 14 Oct 2024 13:05:21 -0400 Subject: [PATCH 2/3] Upload .deb logs on failure `systemctl status` failure --- .github/workflows/ci-pipeline.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index b95a880f01..93dc8e3c01 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -1379,8 +1379,32 @@ jobs: cat /usr/bin/tgs-configure - name: Test Service + id: test-service run: | + set +e systemctl status tgstation-server + retval=$? + set -e + if [[ $retval -ne 0 ]]; then + echo "succeeded=NO" >> $GITHUB_OUTPUT + else + echo "succeeded=YES" >> $GITHUB_OUTPUT + fi + + - name: Chown Errored Service Logs + if: ${{ steps.test-service.outputs.succeeded == 'NO' }} + run: sudo chown -R runner /var/log/tgstation-server + + - name: Store Errored Service Logs + if: ${{ steps.test-service.outputs.succeeded == 'NO' }} + uses: actions/upload-artifact@v4 + with: + name: systemd-service-logs + path: /var/log/tgstation-server/**/* + + - name: Fail if Service Errored + if: ${{ steps.test-service.outputs.succeeded == 'NO' }} + run: exit 1 - name: Test Uninstall # Wait 10s for service to initialize shell: bash From 86ed9abba3f26601a762c83f2ec9d62cde2405e5 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 14 Oct 2024 14:14:17 -0400 Subject: [PATCH 3/3] Put the systemd service test database file in an owned directory --- .github/workflows/ci-pipeline.yml | 4 +-- build/package/deb/appsettings.GitHub.yml | 26 +++++++++++++++++++ .../{ => winget}/appsettings.GitHub.yml | 0 tgstation-server.sln | 2 ++ 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 build/package/deb/appsettings.GitHub.yml rename build/package/{ => winget}/appsettings.GitHub.yml (100%) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 93dc8e3c01..bcca5496c9 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -1369,7 +1369,7 @@ jobs: - name: Test Install run: | sudo mkdir /etc/tgstation-server - sudo cp build/package/appsettings.GitHub.yml /etc/tgstation-server/appsettings.Production.yml + sudo cp build/package/deb/appsettings.GitHub.yml /etc/tgstation-server/appsettings.Production.yml sudo apt-get install -y ./tgstation-server_${{ env.TGS_VERSION }}-1_amd64.deb sudo ls -al /etc/tgstation-server sudo cat /etc/tgstation-server/appsettings.Production.yml @@ -1514,7 +1514,7 @@ jobs: shell: powershell # If it's missing, I found that in elements were the problem run: | mkdir C:/ProgramData/tgstation-server - cp build/package/appsettings.GitHub.yml C:/ProgramData/tgstation-server/appsettings.Production.yml + cp build/package/winget/appsettings.GitHub.yml C:/ProgramData/tgstation-server/appsettings.Production.yml $file = [System.IO.Path]::GetFullPath("build/package/winget/test-installer.exe") $log = [System.IO.Path]::GetFullPath("install.log") $procMain = Start-Process -FilePath $file "/install /silent /log `"$log`"" -NoNewWindow -PassThru -Wait diff --git a/build/package/deb/appsettings.GitHub.yml b/build/package/deb/appsettings.GitHub.yml new file mode 100644 index 0000000000..ae79a502fc --- /dev/null +++ b/build/package/deb/appsettings.GitHub.yml @@ -0,0 +1,26 @@ +# Barebones config file used for testing service installs in GitHub actions +Database: + DatabaseType: Sqlite + ConnectionString: Data Source=/home/tgstation-server/tgs.sqlite3;Mode=ReadWriteCreate +General: + ConfigVersion: 4.6.0 + ApiPort: 5000 + GitHubAccessToken: + SetupWizardMode: Never + ByondTopicTimeout: 5000 + RestartTimeoutMinutes: 1 + ShutdownTimeoutMinutes: 300 + UseBasicWatchdog: false + HostApiDocumentation: true + SkipAddingByondFirewallException: false + DeploymentDirectoryCopyTasksPerCore: + MinimumPasswordLength: 15 + InstanceLimit: 10 + UserLimit: 100 + UserGroupLimit: 25 + ValidInstancePaths: +FileLogging: + Directory: + Disable: false + LogLevel: Trace + MicrosoftLogLevel: Warning diff --git a/build/package/appsettings.GitHub.yml b/build/package/winget/appsettings.GitHub.yml similarity index 100% rename from build/package/appsettings.GitHub.yml rename to build/package/winget/appsettings.GitHub.yml diff --git a/tgstation-server.sln b/tgstation-server.sln index d34815bd30..31d15d0159 100644 --- a/tgstation-server.sln +++ b/tgstation-server.sln @@ -219,6 +219,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{2648 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "deb", "deb", "{457A1F89-6201-4430-BCC6-2F4438A54B9E}" ProjectSection(SolutionItems) = preProject + build\package\deb\appsettings.GitHub.yml = build\package\deb\appsettings.GitHub.yml build\package\deb\build_package.sh = build\package\deb\build_package.sh build\package\deb\install_artifacts.sh = build\package\deb\install_artifacts.sh build\package\deb\MakeInstall = build\package\deb\MakeInstall @@ -244,6 +245,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "upstream", "upstream", "{B4 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "winget", "winget", "{506B9092-AF88-4DA2-84FD-C11646B695B0}" ProjectSection(SolutionItems) = preProject + build\package\winget\appsettings.GitHub.yml = build\package\winget\appsettings.GitHub.yml build\package\winget\install_banner.jpg = build\package\winget\install_banner.jpg build\package\winget\prepare_installer_input_artifacts.ps1 = build\package\winget\prepare_installer_input_artifacts.ps1 build\package\winget\push_manifest.ps1 = build\package\winget\push_manifest.ps1