mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-07-18 03:23:07 +01:00
Merge pull request #1859 from tgstation/DeploymentsTelemetry
Version Telemetry, Update Webpanel
This commit is contained in:
@@ -36,6 +36,7 @@ env:
|
||||
OD_MIN_COMPAT_DOTNET_VERSION: 7
|
||||
OD_DOTNET_VERSION: 8
|
||||
TGS_DOTNET_QUALITY: ga
|
||||
TGS_WEBPANEL_NODE_VERSION: 20.x
|
||||
TGS_TEST_GITHUB_TOKEN: ${{ secrets.LIVE_TESTS_TOKEN }}
|
||||
TGS_RELEASE_NOTES_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
|
||||
PACKAGING_PRIVATE_KEY_PASSPHRASE: ${{ secrets.PACKAGING_PRIVATE_KEY_PASSPHRASE }}
|
||||
@@ -52,6 +53,8 @@ jobs:
|
||||
permissions:
|
||||
security-events: write
|
||||
actions: read
|
||||
env:
|
||||
TGS_TELEMETRY_KEY_FILE: /tmp/tgs_telemetry_key.txt
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v4
|
||||
@@ -74,9 +77,16 @@ jobs:
|
||||
with:
|
||||
languages: csharp
|
||||
|
||||
- name: Setup Telemetry Key File
|
||||
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build
|
||||
run: dotnet build -c ReleaseNoWindows -p:TGS_HOST_NO_WEBPANEL=true
|
||||
|
||||
- name: Delete Telemetry Key File
|
||||
if: always()
|
||||
run: rm ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
@@ -356,6 +366,8 @@ jobs:
|
||||
docker-build:
|
||||
name: Build Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TGS_TELEMETRY_KEY_FILE: tgs_telemetry_key.txt
|
||||
steps:
|
||||
- name: Checkout (Branch)
|
||||
uses: actions/checkout@v4
|
||||
@@ -367,8 +379,16 @@ jobs:
|
||||
with:
|
||||
ref: "refs/pull/${{ github.event.inputs.pull_request_number }}/merge"
|
||||
|
||||
- name: Setup Telemetry Key File
|
||||
shell: bash
|
||||
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build Docker Image
|
||||
run: docker build . -f build/Dockerfile
|
||||
run: docker build . -f build/Dockerfile --build-arg TGS_TELEMETRY_KEY_FILE=${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Delete Telemetry Key File
|
||||
if: always()
|
||||
run: rm ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
linux-unit-tests:
|
||||
name: Linux Tests
|
||||
@@ -379,6 +399,7 @@ jobs:
|
||||
env:
|
||||
TGS_TEST_DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
TGS_TEST_IRC_CONNECTION_STRING: ${{ secrets.IRC_CONNECTION_STRING }}
|
||||
TGS_TELEMETRY_KEY_FILE: /tmp/tgs_telemetry_key.txt
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install x86 libc Dependencies
|
||||
@@ -393,6 +414,11 @@ jobs:
|
||||
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
|
||||
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
|
||||
|
||||
- name: Setup Node.JS
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.TGS_WEBPANEL_NODE_VERSION }}
|
||||
|
||||
- name: Checkout (Branch)
|
||||
uses: actions/checkout@v4
|
||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
@@ -406,9 +432,19 @@ jobs:
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Enable Corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Setup Telemetry Key File
|
||||
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build
|
||||
run: dotnet build -c ${{ matrix.configuration }}NoWindows
|
||||
|
||||
- name: Delete Telemetry Key File
|
||||
if: always()
|
||||
run: rm ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Cache BYOND .zips
|
||||
uses: actions/cache@v4
|
||||
id: cache-byond
|
||||
@@ -434,6 +470,7 @@ jobs:
|
||||
env:
|
||||
TGS_TEST_DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
|
||||
TGS_TEST_IRC_CONNECTION_STRING: ${{ secrets.IRC_CONNECTION_STRING }}
|
||||
TGS_TELEMETRY_KEY_FILE: C:/tgs_telemetry_key.txt
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
@@ -442,6 +479,11 @@ jobs:
|
||||
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
|
||||
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
|
||||
|
||||
- name: Setup Node.JS
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.TGS_WEBPANEL_NODE_VERSION }}
|
||||
|
||||
- name: Checkout (Branch)
|
||||
uses: actions/checkout@v4
|
||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
@@ -455,9 +497,21 @@ jobs:
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Enable Corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Setup Telemetry Key File
|
||||
shell: bash
|
||||
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build
|
||||
run: dotnet build -c ${{ matrix.configuration }}NoWix
|
||||
|
||||
- name: Delete Telemetry Key File
|
||||
shell: bash
|
||||
if: always()
|
||||
run: rm ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Cache BYOND .zips
|
||||
uses: actions/cache@v4
|
||||
id: cache-byond
|
||||
@@ -483,6 +537,8 @@ jobs:
|
||||
database-type: [ 'SqlServer', 'Sqlite', 'PostgresSql', 'MariaDB', 'MySql' ]
|
||||
watchdog-type: [ 'Basic', 'Advanced' ]
|
||||
configuration: [ 'Debug', 'Release' ]
|
||||
env:
|
||||
TGS_TELEMETRY_KEY_FILE: C:/tgs_telemetry_key.txt
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Wait for LocalDB Connection # Do this first because we don't want to find out it's failing later
|
||||
@@ -501,6 +557,11 @@ jobs:
|
||||
${{ env.OD_MIN_COMPAT_DOTNET_VERSION }}.0.x
|
||||
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
|
||||
|
||||
- name: Setup Node.JS
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.TGS_WEBPANEL_NODE_VERSION }}
|
||||
|
||||
- name: Set TGS_TEST_DUMP_API_SPEC
|
||||
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Advanced' && matrix.database-type == 'SqlServer' }}
|
||||
run: echo "TGS_TEST_DUMP_API_SPEC=yes" >> $Env:GITHUB_ENV
|
||||
@@ -570,9 +631,21 @@ jobs:
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Enable Corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Setup Telemetry Key File
|
||||
shell: bash
|
||||
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build
|
||||
run: dotnet build -c ${{ matrix.configuration }} tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj
|
||||
|
||||
- name: Delete Telemetry Key File
|
||||
shell: bash
|
||||
if: always()
|
||||
run: rm ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Cache BYOND .zips
|
||||
uses: actions/cache@v4
|
||||
id: cache-byond
|
||||
@@ -713,6 +786,8 @@ jobs:
|
||||
database-type: [ 'Sqlite', 'PostgresSql', 'MariaDB', 'MySql' ]
|
||||
watchdog-type: [ 'Basic', 'Advanced' ]
|
||||
configuration: [ 'Debug', 'Release' ]
|
||||
env:
|
||||
TGS_TELEMETRY_KEY_FILE: /tmp/tgs_telemetry_key.txt
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Disable ptrace_scope
|
||||
@@ -733,6 +808,11 @@ jobs:
|
||||
${{ env.OD_MIN_COMPAT_DOTNET_VERSION }}.0.x
|
||||
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
|
||||
|
||||
- name: Setup Node.JS
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.TGS_WEBPANEL_NODE_VERSION }}
|
||||
|
||||
- name: Set Sqlite Connection Info
|
||||
if: ${{ matrix.database-type == 'Sqlite' }}
|
||||
run: |
|
||||
@@ -775,9 +855,19 @@ jobs:
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Enable Corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Setup Telemetry Key File
|
||||
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build
|
||||
run: dotnet build -c ${{ matrix.configuration }}NoWindows tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj
|
||||
|
||||
- name: Delete Telemetry Key File
|
||||
if: always()
|
||||
run: rm ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Cache BYOND .zips
|
||||
uses: actions/cache@v4
|
||||
id: cache-byond
|
||||
@@ -1117,12 +1207,14 @@ jobs:
|
||||
build-deb:
|
||||
name: Build .deb Package # Can't do i386 due to https://github.com/dotnet/core/issues/4595
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TGS_TELEMETRY_KEY_FILE: /tmp/tgs_telemetry_key.txt
|
||||
steps:
|
||||
- name: Install Native Dependencies
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y -o APT::Immediate-Configure=0 libstdc++6:i386 libgcc-s1:i386 gnupg2 xmlstarlet libgdiplus
|
||||
sudo apt-get install -y -o APT::Immediate-Configure=0 libstdc++6:i386 libgcc-s1:i386
|
||||
|
||||
- name: Import GPG Key
|
||||
if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev'))
|
||||
@@ -1160,27 +1252,37 @@ jobs:
|
||||
with:
|
||||
ref: "refs/pull/${{ github.event.inputs.pull_request_number }}/merge"
|
||||
|
||||
- name: Grab Most Recent Changelog
|
||||
run: curl -L https://raw.githubusercontent.com/tgstation/tgstation-server/gh-pages/changelog.yml -o changelog.yml
|
||||
|
||||
- name: Setup Telemetry Key File
|
||||
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Execute Build Script (Unsigned)
|
||||
if: (!(github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && github.event.ref == 'refs/heads/master'))
|
||||
run: sudo -E build/package/deb/build_package.sh
|
||||
|
||||
- name: Execute Build Script (Signed)
|
||||
if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && github.event.ref == 'refs/heads/master')
|
||||
env:
|
||||
PACKAGING_KEYGRIP: ${{ vars.PACKAGING_KEYGRIP }}
|
||||
run: sudo -E build/package/deb/build_package.sh
|
||||
|
||||
- name: Parse TGS version
|
||||
run: |
|
||||
echo "TGS_VERSION=$(xmlstarlet sel -N X="http://schemas.microsoft.com/developer/msbuild/2003" --template --value-of /X:Project/X:PropertyGroup/X:TgsCoreVersion build/Version.props)" >> $GITHUB_ENV
|
||||
|
||||
- name: Grab Most Recent Changelog
|
||||
run: curl -L https://raw.githubusercontent.com/tgstation/tgstation-server/gh-pages/changelog.yml -o changelog.yml
|
||||
|
||||
- name: Execute Build Script (Unsigned)
|
||||
if: (!(github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev')))
|
||||
run: sudo -E build/package/deb/build_package.sh
|
||||
|
||||
- name: Execute Build Script (Signed)
|
||||
if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev'))
|
||||
env:
|
||||
PACKAGING_KEYGRIP: ${{ vars.PACKAGING_KEYGRIP }}
|
||||
run: |
|
||||
sudo -E build/package/deb/build_package.sh
|
||||
- name: Verify Package Files are Signed
|
||||
if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && github.event.ref == 'refs/heads/master')
|
||||
run:
|
||||
gpg --verify tgstation-server_${{ env.TGS_VERSION }}-1.dsc
|
||||
gpg --verify tgstation-server_${{ env.TGS_VERSION }}-1_amd64.changes
|
||||
gpg --verify tgstation-server_${{ env.TGS_VERSION }}-1_amd64.buildinfo
|
||||
|
||||
- name: Delete Telemetry Key File
|
||||
if: always()
|
||||
run: rm ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Test Install
|
||||
run: |
|
||||
sudo mkdir /etc/tgstation-server
|
||||
@@ -1219,6 +1321,8 @@ jobs:
|
||||
build-msi:
|
||||
name: Build Windows Installer .exe
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
TGS_TELEMETRY_KEY_FILE: C:/tgs_telemetry_key.txt
|
||||
steps:
|
||||
- name: Install winget
|
||||
uses: Cyberboss/install-winget@v1
|
||||
@@ -1231,6 +1335,11 @@ jobs:
|
||||
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
|
||||
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
|
||||
|
||||
- name: Setup Node.JS
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.TGS_WEBPANEL_NODE_VERSION }}
|
||||
|
||||
- name: Checkout (Branch)
|
||||
uses: actions/checkout@v4
|
||||
if: github.event_name == 'push' || github.event_name == 'schedule'
|
||||
@@ -1252,9 +1361,21 @@ jobs:
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Enable Corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Setup Telemetry Key File
|
||||
shell: bash
|
||||
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build Host
|
||||
run: dotnet build -c Release src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
|
||||
|
||||
- name: Delete Telemetry Key File
|
||||
shell: bash
|
||||
if: always()
|
||||
run: rm ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build Service
|
||||
run: dotnet build -c Release src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj
|
||||
|
||||
@@ -1620,6 +1741,8 @@ jobs:
|
||||
needs: [deploy-dm, deploy-http, deployment-gate]
|
||||
runs-on: windows-latest
|
||||
if: github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[TGSDeploy]')
|
||||
env:
|
||||
TGS_TELEMETRY_KEY_FILE: C:/tgs_telemetry_key.txt
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v4
|
||||
@@ -1627,6 +1750,11 @@ jobs:
|
||||
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
|
||||
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
|
||||
|
||||
- name: Setup Node.JS
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.TGS_WEBPANEL_NODE_VERSION }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -1638,9 +1766,21 @@ jobs:
|
||||
cd build/package/winget
|
||||
dotnet tool restore
|
||||
|
||||
- name: Build Host # We need to rebuild the installer.exe so it can be properly signed
|
||||
- name: Enable Corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Setup Telemetry Key File
|
||||
shell: bash
|
||||
run: echo "${{ secrets.TGS_TELEMETRY_KEY }}" > ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build Host # We need to rebuild the installer.exe so it can be properly signed
|
||||
run: dotnet build -c Release src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
|
||||
|
||||
- name: Delete Telemetry Key File
|
||||
shell: bash
|
||||
if: always()
|
||||
run: rm ${{ env.TGS_TELEMETRY_KEY_FILE }}
|
||||
|
||||
- name: Build Service
|
||||
run: dotnet build -c Release src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj
|
||||
|
||||
|
||||
Reference in New Issue
Block a user