Codebasis als Dateien ins Arbeitsrepo statt als Gitlink

QuellCode/CentronERP war nur als Gitlink (Submodul-Referenz auf 79c1142)
getrackt, ohne .gitmodules und ohne erreichbares Remote. Der
Untersuchungsgegenstand der Versuchsreihe war damit nicht reproduzierbar
gesichert: Ein Klon haette ein leeres Verzeichnis erhalten, und die Belege
der 3.287 Anforderungen waeren nicht ueberpruefbar gewesen.

Umstellung:
- Historie nach c:\DEV\CentronERP_git_snapshot_79c1142 ausgelagert
  (vollstaendig lesbar, enthaelt 79c1142 und Vorgaenger 89ccfd6)
- Gitlink aus dem Index entfernt
- Dateiinhalt aufgenommen: 24.557 Dateien, rund 333 MB

Die verschachtelte .gitignore der Codebasis gilt weiter, Build-Artefakte
bleiben ausgeschlossen. Details in Versuche/Versuch_01/_Codebasis-Nachweis.md
This commit is contained in:
Christoph Schwörer
2026-08-26 07:43:51 +02:00
parent 18edae75b6
commit f045b99a25
24664 changed files with 5846716 additions and 1 deletions
@@ -0,0 +1,89 @@
trigger:
- master
- release/*
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
UploadCentronArtifacts: $[or(startsWith(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))]
pool: Default
steps:
- checkout: self
fetchDepth: 0
- script: 'dotnet run --project "./scripts/Scripts/Scripts.csproj" -- clean 2>&1'
displayName: Clean
- script: 'dotnet run --project "./scripts/Scripts/Scripts.csproj" -- build-nexus 2>&1'
displayName: Build Nexus
- task: TrustedSigning@0
displayName: Signing Nexus
inputs:
AzureTenantID: $(AzureTenantID)
AzureClientID: $(AzureClientID)
AzureClientSecret: $(AzureClientSecret)
AzureClientSendCertificateChain: false
Endpoint: 'https://weu.codesigning.azure.net/'
TrustedSigningAccountName: 'CentronCodesigning'
CertificateProfileName: 'centroncert'
FileDigest: 'SHA256'
Files: |
$(Build.SourcesDirectory)\src\nexus\CentronNexus\bin\Release\net8.0\win-x64\publish\CentronNexus.dll
$(Build.SourcesDirectory)\src\nexus\CentronNexus\bin\Release\net8.0\win-x64\publish\CentronNexus.exe
- script: 'dotnet run --project "./scripts/Scripts/Scripts.csproj" -- zip-nexus-directory 2>&1'
displayName: Set Nexus Zip-Directory
- script: 'dotnet run --project "./scripts/Scripts/Scripts.csproj" -- build-nexus-installer 2>&1'
displayName: Build Nexus Installer
- task: TrustedSigning@0
displayName: Signing Nexus
inputs:
AzureTenantID: $(AzureTenantID)
AzureClientID: $(AzureClientID)
AzureClientSecret: $(AzureClientSecret)
AzureClientSendCertificateChain: false
Endpoint: 'https://weu.codesigning.azure.net/'
TrustedSigningAccountName: 'CentronCodesigning'
CertificateProfileName: 'centroncert'
FileDigest: 'SHA256'
Files: $(Build.SourcesDirectory)\deployment\WixSharpInstaller\bin\Release\net472\c-entron Nexus.msi
- script: 'dotnet run --project "./scripts/Scripts/Scripts.csproj" -- zip-nexus-singleFile 2>&1'
displayName: Zip Nexus Installer
- script: 'dotnet run --project "./scripts/Scripts/Scripts.csproj" -- test-only 2>&1'
displayName: Test Nexus
- task: PublishTestResults@2
displayName: 'Publish Test: c-entron Nexus Tests'
inputs:
testResultsFormat: VSTest
testResultsFiles: 'artifacts/TestResults.trx'
testRunTitle: 'c-entron Nexus Tests'
buildConfiguration: 'Release'
failTaskOnFailedTests: true
- task: PublishPipelineArtifact@1
displayName: 'Upload Artifact to Azure Pipelines: c-entron Nexus'
inputs:
targetPath: './artifacts/c-entron Nexus Installer.zip'
artifactName: 'c-entron Nexus Installer'
- task: razorspoint.rp-build-release-pnptasks.RP-PnPPowerShell.PnPPowerShell@3
condition: and(succeeded(), eq(variables.UploadCentronArtifacts, true))
displayName: 'Upload Artifact to SharePoint: c-entron Nexus'
continueOnError: true
inputs:
SharePointVersion: SpOnline
sharepointConntection: 'Software Builds - SharePoint'
FileOrInline: Inline
RequiredVersion: '3.23.2007.1'
PnPPowerShellInline: |
$centronNexusDllFilePath = "$env:BUILD_SOURCESDIRECTORY\deployment\WixSharpInstaller\Files\CentronNexus.dll"
$version = [Version][System.Diagnostics.FileVersionInfo]::GetVersionInfo($centronNexusDllFilePath).FileVersion
$mainVersion = $version.ToString(3)
$file = Add-PnpFile -Folder "/Shared Documents/c-entron Nexus/v$mainVersion/v$version" -Path "artifacts\c-entron Nexus Installer.zip"
@@ -0,0 +1,41 @@
trigger:
branches:
include:
- master
resources:
pipelines:
- pipeline: Docker
source: Docker
project: c-entron.NET
trigger: true
- pipeline: Docker
source: Docker
trigger: true
pool: Tests
jobs:
- deployment: VMDeploy
displayName: Deploy to VM
environment:
name: 'Test Environment'
resourceType: virtualMachine
strategy:
runOnce:
deploy:
steps:
- checkout: self
fetchDepth: 0
- script: |
cd docker/compose/
docker compose down -v
- script: |
cd docker/compose/
docker image prune -f
- script: |
cd docker/compose/
docker compose pull
- script: |
cd docker/compose/
docker compose up -d --pull always --force-recreate
@@ -0,0 +1,38 @@
trigger:
- master
- release/*
pool:
vmImage: 'ubuntu-latest'
variables:
DOCKER_BUILDKIT: 1
steps:
- checkout: self
fetchDepth: 0
- script: |
versionNumber="$(nbgv get-version -v Version)"
versionNumberShort="${versionNumber%.*}"
echo "##vso[build.updatebuildnumber]$versionNumber"
echo "##vso[task.setvariable variable=versionNumber;isoutput=true]$versionNumber"
echo "##vso[task.setvariable variable=versionNumberShort;isoutput=true]$versionNumberShort"
displayName: 'Set Azure DevOps Build Version'
name: 'versionSetup'
- task: Docker@2
displayName: Login to Azure Container Registry
inputs:
command: login
containerRegistry: CentronACR
- task: Docker@2
displayName: Build and push image
inputs:
containerRegistry: CentronACR
repository: centron_nexus
tags: $(versionSetup.versionNumber),$(versionSetup.versionNumberShort),latest
command: buildAndPush
Dockerfile: docker/Dockerfile
buildContext: .
@@ -0,0 +1,10 @@
trigger:
- master
- releases/*
pool: QuickTest
steps:
- script: 'dotnet run --project "./scripts/Scripts/Scripts.csproj" -- test-only 2>&1'
displayName: Test Nexus
@@ -0,0 +1,136 @@
trigger:
- master
- releases/*
pool: QuickTest
strategy:
matrix:
default:
NAME: default
version2:
NAME: version2
views:
NAME: views
resources:
containers:
- container: db
endpoint: CentronACR
image: centron.azurecr.io/centron_db/$(NAME):0213def19b183ffb83ce9649468ad914384c0bcb
env:
MSSQL_SA_PASSWORD: SA!password
ports:
- 1433:1433
options: --name db
- container: smtp
endpoint: CentronACR
image: centron.azurecr.io/mailcatcher:latest
ports:
- 1025:1025
- 1080:1080
options: --name centron-smtp-1
- container: webservice
endpoint: CentronACR
image: centron.azurecr.io/centron_webservice:latest
env:
HARDWARE_ID: LinuxV1.ZDhiZjhiZjgtMjIwNS00MWQ1LThiMGEtMjM2ZjZhMzc2MGMz
WEBSERVICE_CONFIG: '<?xml version="1.0" encoding="utf-8"?>
<WebServiceConfig>
<WebServiceAddress>http://localhost:1234/CentronService</WebServiceAddress>
<PublicWebServiceAddress></PublicWebServiceAddress>
<WebServiceCertificateFilePath></WebServiceCertificateFilePath>
<WebServiceCertificatePassword></WebServiceCertificatePassword>
<ActiveDirectoryAuthEnabled>false</ActiveDirectoryAuthEnabled>
<ActiveDirectoryUrl></ActiveDirectoryUrl>
<ActiveDirectoryName></ActiveDirectoryName>
<ActiveDirectoryCertificateHash></ActiveDirectoryCertificateHash>
<DatabaseConnectionString>
</DatabaseConnectionString>
<DatabaseConnectionStringPlain>
Server=db,1433; Database=Centron; User Id=SA; Password=SA!password
</DatabaseConnectionStringPlain>
<UseIncreasedThreadPool>true</UseIncreasedThreadPool>
<ActivateHelpPage>false</ActivateHelpPage>
<ExecuteServices>false</ExecuteServices>
<ProxyAddress></ProxyAddress>
<ProxyPort />
<ProxyUsername />
<ProxyPassword></ProxyPassword>
<TwoFactorAuthEnabled>false</TwoFactorAuthEnabled>
<TwoFactorAuthType>RadiusServer</TwoFactorAuthType>
<RadiusServerAddress></RadiusServerAddress>
<RadiusServerSecret></RadiusServerSecret>
<RadiusServerConnectionTimeoutInSeconds>30</RadiusServerConnectionTimeoutInSeconds>
<RadiusServerNasIdentifier></RadiusServerNasIdentifier>
<RadiusServerNasIpAddress></RadiusServerNasIpAddress>
<MailTwoFactorAuthSenderAddress></MailTwoFactorAuthSenderAddress>
<MailTwoFactorAuthTimeoutInSeconds>120</MailTwoFactorAuthTimeoutInSeconds>
<TwoFactorValidDurationInDays>0</TwoFactorValidDurationInDays>
<SecretKey>ThisIsASecretKey</SecretKey>
</WebServiceConfig>'
command: sh -c "sleep 75;echo $WEBSERVICE_CONFIG > /app/WebServiceConfig.xml;/app/Centron.Host.Console"
ports:
- "1234:1234"
options: --name webservice
services:
db: db
centron-smtp-1: smtp
webservice: webservice
steps:
- checkout: self
fetchDepth: 0
- script: 'dotnet build "./src/nexus/CentronNexus.Host/CentronNexus.Host.csproj"'
displayName: Build Nexus
- script: >
dotnet run --project "./src/nexus/CentronNexus.Host/CentronNexus.Host.csproj" > nexus_logs_$(NAME).txt 2>&1 &
echo "##vso[task.setvariable variable=NexusPID;]$!"
displayName: Run Nexus
- script: 'dotnet build "./tests/PlaywrightTests/PlaywrightTests.csproj"'
displayName: 'Build playwright tests'
- script: './tests/PlaywrightTests/bin/Debug/net8.0/playwright.ps1 install'
displayName: 'Install playwright tests'
- script: >
dotnet test "./tests/PlaywrightTests/PlaywrightTests.csproj"
--filter TestCategory=$(NAME)
--logger "trx;LogFileName=TestResults.trx"
--results-directory "artifacts/tests/playwright/"
displayName: 'Run playwright tests'
- publish: ./tests/PlaywrightTests/bin/Debug/net8.0/playwright-traces/
artifact: traces_$(NAME)_$(System.JobAttempt)
displayName: 'Publish playwright test traces'
condition: always()
- task: PublishTestResults@2
displayName: 'Publish playwright test results'
condition: always()
inputs:
testResultsFormat: VSTest
testResultsFiles: 'artifacts/tests/playwright/TestResults.trx'
testRunTitle: 'Playwright Tests'
buildConfiguration: 'Release'
failTaskOnFailedTests: true
- script: 'kill $(NexusPID) || true'
displayName: Cleanup Nexus process
condition: always()
continueOnError: true
- publish: nexus_logs_$(NAME).txt
artifact: nexus_$(NAME)_$(System.JobAttempt)
displayName: Publish Nexus logs
condition: always()
continueOnError: true
- script: docker container logs webservice > webservice_logs_$(NAME).txt || true
displayName: Get webservice logs
condition: always()
- publish: webservice_logs_$(NAME).txt
artifact: webservice_$(NAME)_$(System.JobAttempt)
displayName: Publish webservice logs
condition: always()
continueOnError: true
- script: docker image prune -f --filter "dangling=true"
displayName: Cleanup dangling images
condition: always()
continueOnError: true
@@ -0,0 +1,25 @@
trigger:
- please_dont_get_triggered
schedules:
- cron: '0 0 * * *'
branches:
include:
- master
pool: Default
steps:
- task: AdvancedSecurity-Codeql-Init@1
inputs:
languages: 'csharp,javascript'
- checkout: self
fetchDepth: 0
- script: 'dotnet run --project "./scripts/Scripts/Scripts.csproj" -- build 2>&1'
displayName: Build
- task: AdvancedSecurity-Dependency-Scanning@1
- task: AdvancedSecurity-Codeql-Analyze@1