nuget folder fixes

This commit is contained in:
StellaOps Bot
2025-12-25 19:51:26 +02:00
parent 0103defcff
commit ef6ac36323
11 changed files with 24 additions and 25 deletions

View File

@@ -93,12 +93,12 @@ jobs:
- name: Ensure binary manifests are up to date - name: Ensure binary manifests are up to date
run: | run: |
python3 scripts/update-binary-manifests.py python3 scripts/update-binary-manifests.py
git diff --exit-code local-nugets/manifest.json vendor/manifest.json offline/feeds/manifest.json git diff --exit-code .nuget/manifest.json vendor/manifest.json offline/feeds/manifest.json
- name: Ensure Mongo test URI configured - name: Ensure PostgreSQL test URI configured
run: | run: |
if [ -z "${STELLAOPS_TEST_MONGO_URI:-}" ]; then if [ -z "${STELLAOPS_TEST_POSTGRES_CONNECTION:-}" ]; then
echo "::error::STELLAOPS_TEST_MONGO_URI must be provided via repository secrets or variables for Graph Indexer integration tests." echo "::error::STELLAOPS_TEST_POSTGRES_CONNECTION must be provided via repository secrets or variables for integration tests."
exit 1 exit 1
fi fi

View File

@@ -56,8 +56,7 @@ jobs:
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: | path: |
~/.nuget/packages .nuget/packages
local-nugets/packages
key: fixture-drift-nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} key: fixture-drift-nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }}
- name: Restore solution - name: Restore solution

View File

@@ -43,7 +43,7 @@ jobs:
with: with:
path: | path: |
~/.nuget/packages ~/.nuget/packages
local-nugets/packages .nuget/packages
key: policy-lint-nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} key: policy-lint-nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }}
- name: Restore CLI - name: Restore CLI

View File

@@ -47,7 +47,7 @@ jobs:
with: with:
path: | path: |
~/.nuget/packages ~/.nuget/packages
local-nugets/packages .nuget/packages
key: policy-sim-nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} key: policy-sim-nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }}
- name: Restore CLI - name: Restore CLI

View File

@@ -23,7 +23,7 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1 DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
TZ: UTC TZ: UTC
SDK_NUGET_SOURCE: ${{ secrets.SDK_NUGET_SOURCE || 'local-nugets/packages' }} SDK_NUGET_SOURCE: ${{ secrets.SDK_NUGET_SOURCE || '.nuget/packages' }}
SDK_NUGET_API_KEY: ${{ secrets.SDK_NUGET_API_KEY }} SDK_NUGET_API_KEY: ${{ secrets.SDK_NUGET_API_KEY }}
SDK_SIGNING_CERT_B64: ${{ secrets.SDK_SIGNING_CERT_B64 }} SDK_SIGNING_CERT_B64: ${{ secrets.SDK_SIGNING_CERT_B64 }}
SDK_SIGNING_CERT_PASSWORD: ${{ secrets.SDK_SIGNING_CERT_PASSWORD }} SDK_SIGNING_CERT_PASSWORD: ${{ secrets.SDK_SIGNING_CERT_PASSWORD }}
@@ -46,8 +46,7 @@ jobs:
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: | path: |
~/.nuget/packages .nuget/packages
local-nugets/packages
key: sdk-nuget-${{ runner.os }}-${{ hashFiles('src/Sdk/**/*.csproj') }} key: sdk-nuget-${{ runner.os }}-${{ hashFiles('src/Sdk/**/*.csproj') }}
- name: Restore (best effort; skipped if no csproj) - name: Restore (best effort; skipped if no csproj)
@@ -87,6 +86,6 @@ jobs:
name: sdk-artifacts name: sdk-artifacts
path: | path: |
out/sdk out/sdk
local-nugets/packages/*.nupkg .nuget/packages/*.nupkg
if-no-files-found: warn if-no-files-found: warn
retention-days: 7 retention-days: 7

View File

@@ -45,7 +45,7 @@ jobs:
with: with:
path: | path: |
~/.nuget/packages ~/.nuget/packages
local-nugets/packages .nuget/packages
key: signals-nuget-${{ runner.os }}-${{ hashFiles('src/Signals/**/*.csproj') }} key: signals-nuget-${{ runner.os }}-${{ hashFiles('src/Signals/**/*.csproj') }}
- name: Restore - name: Restore

View File

@@ -50,7 +50,7 @@ jobs:
with: with:
path: | path: |
~/.nuget/packages ~/.nuget/packages
local-nugets/packages .nuget/packages
key: budget-gate-nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }} key: budget-gate-nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj') }}
- name: Restore and Build CLI - name: Restore and Build CLI

11
.gitignore vendored
View File

@@ -17,8 +17,7 @@ obj/
# Packages and logs # Packages and logs
*.log *.log
TestResults/ TestResults/
local-nuget/ .nuget/packages/
local-nugets/packages/
.dotnet .dotnet
.DS_Store .DS_Store
@@ -60,10 +59,8 @@ obj/
logs/ logs/
tmp/ tmp/
coverage/ coverage/
# Consolidated NuGet cache (all variants)
.nuget/ .nuget/
local-nugets/ .nuget-*/
local-nuget/ local-nuget*/
src/Sdk/StellaOps.Sdk.Generator/tools/jdk-21.0.1+12 src/Sdk/StellaOps.Sdk.Generator/tools/jdk-21.0.1+12
.nuget-cache/
.nuget-packages2/
.nuget-temp/

View File

@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<config>
<!-- Centralize package cache to prevent .nuget-* directory sprawl -->
<add key="globalPackagesFolder" value=".nuget/packages" />
</config>
<packageSources> <packageSources>
<clear /> <clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />

View File

@@ -10,8 +10,8 @@ export VSTEST_DISABLE_APPDOMAIN=1
export DOTNET_CLI_UI_LANGUAGE=en export DOTNET_CLI_UI_LANGUAGE=en
export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_CLI_TELEMETRY_OPTOUT=1
# Prefer the curated offline feed to avoid network flakiness during CI. # Prefer the curated offline feed to avoid network flakiness during CI.
export NUGET_PACKAGES="${ROOT_DIR}/local-nugets" export NUGET_PACKAGES="${ROOT_DIR}/.nuget/packages"
RESTORE_SOURCE="--source ${ROOT_DIR}/local-nugets --ignore-failed-sources" RESTORE_SOURCE="--source ${ROOT_DIR}/.nuget/packages --ignore-failed-sources"
# Ensure Mongo2Go can find OpenSSL 1.1 (needed by bundled mongod) # Ensure Mongo2Go can find OpenSSL 1.1 (needed by bundled mongod)
OPENSSL11_DIR="$ROOT_DIR/tools/openssl1.1/lib" OPENSSL11_DIR="$ROOT_DIR/tools/openssl1.1/lib"
if [[ -d "$OPENSSL11_DIR" ]]; then if [[ -d "$OPENSSL11_DIR" ]]; then

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)" ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
PACKAGES_DIR="$ROOT/local-nugets/packages" PACKAGES_DIR="$ROOT/.nuget/packages"
TMP_DIR="$ROOT/tmp/sbomservice-feed" TMP_DIR="$ROOT/tmp/sbomservice-feed"
PROJECT="$TMP_DIR/probe.csproj" PROJECT="$TMP_DIR/probe.csproj"