From 5081b4847d4b8d83693b9449bc575810e5ecb1b8 Mon Sep 17 00:00:00 2001 From: David Teo Date: Tue, 4 Mar 2025 10:18:28 +0800 Subject: [PATCH 1/6] Initial commit for packageWorks in 6000.2 --- .gitignore | 66 +++ ...rastructure-instability-detection-linux.sh | 37 ++ ...nfrastructure-instability-detection-mac.sh | 37 ++ ...frastructure-instability-detection-win.cmd | 11 + .yamato/wrench/api-validation-jobs.yml | 58 +++ .yamato/wrench/package-pack-jobs.yml | 28 ++ .yamato/wrench/preview-a-p-v.yml | 343 +++++++++++++ .yamato/wrench/promotion-jobs.yml | 179 +++++++ .yamato/wrench/publish-trigger.yml | 12 + .yamato/wrench/recipe-regeneration.yml | 30 ++ .yamato/wrench/validation-jobs.yml | 451 ++++++++++++++++++ .yamato/wrench/wrench_config.json | 37 ++ Wrench/Program.cs | 21 + Wrench/Settings/TilemapExtrasSettings.cs | 30 ++ Wrench/TilemapExtras-recipes.sln | 16 + Wrench/TilemapExtras.Cookbook.csproj | 14 + Wrench/global.json | 7 + Wrench/nuget.config | 6 + Wrench/onboard.py | 149 ++++++ Wrench/regenerate.bat | 2 + Wrench/regenerate.sh | 2 + 21 files changed, 1536 insertions(+) create mode 100644 .gitignore create mode 100644 .yamato/generated-scripts/infrastructure-instability-detection-linux.sh create mode 100644 .yamato/generated-scripts/infrastructure-instability-detection-mac.sh create mode 100644 .yamato/generated-scripts/infrastructure-instability-detection-win.cmd create mode 100644 .yamato/wrench/api-validation-jobs.yml create mode 100644 .yamato/wrench/package-pack-jobs.yml create mode 100644 .yamato/wrench/preview-a-p-v.yml create mode 100644 .yamato/wrench/promotion-jobs.yml create mode 100644 .yamato/wrench/publish-trigger.yml create mode 100644 .yamato/wrench/recipe-regeneration.yml create mode 100644 .yamato/wrench/validation-jobs.yml create mode 100644 .yamato/wrench/wrench_config.json create mode 100644 Wrench/Program.cs create mode 100644 Wrench/Settings/TilemapExtrasSettings.cs create mode 100644 Wrench/TilemapExtras-recipes.sln create mode 100644 Wrench/TilemapExtras.Cookbook.csproj create mode 100644 Wrench/global.json create mode 100644 Wrench/nuget.config create mode 100644 Wrench/onboard.py create mode 100644 Wrench/regenerate.bat create mode 100755 Wrench/regenerate.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f18fe4d --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +[Ll]ibrary/ +[Tt]emp/ +[Oo]bj/ +[Bb]uild/ +[Bb]uilds/ +Assets/AssetStoreTools* +**/.idea/ + +# Visual Studio cache directory +.vs/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ +*.csproj +*.csproj.meta +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.opendb +*.dwlt + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta + +# Unity3D Generated File On Crash Reports +sysinfo.txt + +# Builds +*.apk +*.unitypackage +Projects/PublishAll/Logs +Projects/AllPackages/Logs +**/Logs + +EntityCache +EntityCache.meta +Projects/Hybrid/UserSettings +StreamingAssets.meta +SceneDependencyCache.meta +SceneDependencyCache/ + +**/Packages/packages-lock.json +**/ProjectSettings/VersionControlSettings.asset +**/ProjectSettings/PackageManagerSettings.asset +**/UserSettings/QuickSearch.settings +**/UserSettings/QuickSearch.index + +!Documentation~ +!Samples~/ +!Packages/com.unity.2d.psdimporter.tests/EditorTests/TypeAssets~/ +.DS_Store +.multitool + +#Packageworks +!Wrench/*.sln +!Wrench/*.csproj +Wrench/bin/ \ No newline at end of file diff --git a/.yamato/generated-scripts/infrastructure-instability-detection-linux.sh b/.yamato/generated-scripts/infrastructure-instability-detection-linux.sh new file mode 100644 index 0000000..2380121 --- /dev/null +++ b/.yamato/generated-scripts/infrastructure-instability-detection-linux.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# This is an auto-generated script. Do not edit manually! +set -x + +set -e +if [ -f "infrastructure_instability_detection_standalone.zip" ]; then + echo "removed existing archive infrastructure_instability_detection_standalone.zip" + rm "infrastructure_instability_detection_standalone.zip" || true +fi + +if [ -d "infrastructure_instability_detection_standalone" ]; then + echo "removed existing directory infrastructure_instability_detection_standalone/" + rm -rf "infrastructure_instability_detection_standalone" || true +fi + +echo "downloading and extracting infrastructure_instability_detection_standalone@1.0.0" +curl -fs "https://artifactory-slo.bf.unity3d.com/artifactory/automation-and-tooling/infrastructure-instability-detection/standalone/1.0.0/ubuntu.zip" --output "infrastructure_instability_detection_standalone.zip" --retry 5 || true + +if [ -d "infrastructure_instability_detection" ]; then + echo "removing infrastructure_instability_detection folder to avoid name clash" + rm -rf infrastructure_instability_detection/ || true +fi + +unzip -qo "infrastructure_instability_detection_standalone.zip" && rm "infrastructure_instability_detection_standalone.zip" || true + +echo "downloading and extracting patterns" +curl -fs "https://artifactory-slo.bf.unity3d.com/artifactory/automation-and-tooling/infrastructure-instability-detection/patterns.zip" --output patterns.zip --retry 5 || true + +if [ -d "patterns" ]; then + echo "removing patterns folder to avoid name clash" + rm -rf patterns/ || true +fi + +unzip -q patterns.zip && rm patterns.zip || true + +echo "running '$(pwd)/infrastructure_instability_detection'" +./infrastructure_instability_detection || true diff --git a/.yamato/generated-scripts/infrastructure-instability-detection-mac.sh b/.yamato/generated-scripts/infrastructure-instability-detection-mac.sh new file mode 100644 index 0000000..e37062e --- /dev/null +++ b/.yamato/generated-scripts/infrastructure-instability-detection-mac.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# This is an auto-generated script. Do not edit manually! +set -x + +set -e +if [ -f "infrastructure_instability_detection_standalone.zip" ]; then + echo "removed existing archive infrastructure_instability_detection_standalone.zip" + rm "infrastructure_instability_detection_standalone.zip" || true +fi + +if [ -d "infrastructure_instability_detection_standalone" ]; then + echo "removed existing directory infrastructure_instability_detection_standalone/" + rm -rf "infrastructure_instability_detection_standalone" || true +fi + +echo "downloading and extracting infrastructure_instability_detection_standalone@1.0.0" +curl -fs "https://artifactory-slo.bf.unity3d.com/artifactory/automation-and-tooling/infrastructure-instability-detection/standalone/1.0.0/macos.zip" --output "infrastructure_instability_detection_standalone.zip" --retry 5 || true + +if [ -d "infrastructure_instability_detection" ]; then + echo "removing infrastructure_instability_detection folder to avoid name clash" + rm -rf infrastructure_instability_detection/ || true +fi + +unzip -qo "infrastructure_instability_detection_standalone.zip" && rm "infrastructure_instability_detection_standalone.zip" || true + +echo "downloading and extracting patterns" +curl -fs "https://artifactory-slo.bf.unity3d.com/artifactory/automation-and-tooling/infrastructure-instability-detection/patterns.zip" --output patterns.zip --retry 5 || true + +if [ -d "patterns" ]; then + echo "removing patterns folder to avoid name clash" + rm -rf patterns/ || true +fi + +unzip -q patterns.zip && rm patterns.zip || true + +echo "running '$(pwd)/infrastructure_instability_detection'" +./infrastructure_instability_detection || true diff --git a/.yamato/generated-scripts/infrastructure-instability-detection-win.cmd b/.yamato/generated-scripts/infrastructure-instability-detection-win.cmd new file mode 100644 index 0000000..137617b --- /dev/null +++ b/.yamato/generated-scripts/infrastructure-instability-detection-win.cmd @@ -0,0 +1,11 @@ +@echo on +rem This is an auto-generated script. Do not edit manually! + +curl -fs "https://artifactory-slo.bf.unity3d.com/artifactory/automation-and-tooling/infrastructure-instability-detection/standalone/1.0.0/windows.zip" --output "infrastructure_instability_detection_standalone.zip" --retry 5 +IF EXIST "infrastructure_instability_detection" rmdir /s /q infrastructure_instability_detection +powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('infrastructure_instability_detection_standalone.zip', '.'); }" && DEL "infrastructure_instability_detection_standalone.zip" +curl -fs "https://artifactory-slo.bf.unity3d.com/artifactory/automation-and-tooling/infrastructure-instability-detection/patterns.zip" --output patterns.zip --retry 5 +IF EXIST "patterns" rmdir /s /q patterns +powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('patterns.zip', '.'); }" && DEL "patterns.zip" +infrastructure_instability_detection +exit /b 0 diff --git a/.yamato/wrench/api-validation-jobs.yml b/.yamato/wrench/api-validation-jobs.yml new file mode 100644 index 0000000..2b1efa1 --- /dev/null +++ b/.yamato/wrench/api-validation-jobs.yml @@ -0,0 +1,58 @@ +# Auto-generated by Recipe Engine, do not modify manually. +# This job is generated by the wrench recipe engine module, see find the docs here: http://Go/ii2fb +all_api_validation_jobs: + name: All API Validation Jobs + dependencies: + - path: .yamato/wrench/api-validation-jobs.yml#api_validation_-_2d_tilemap_extras_-_6000_1_-_windows + +# upm-ci validation tests for API Validation - 2d.tilemap.extras - 6000.1 - windows (6000.1 - Windows). +api_validation_-_2d_tilemap_extras_-_6000_1_-_windows: + name: API Validation - 2d.tilemap.extras - 6000.1 - windows + agent: + image: package-ci/win10:default + type: Unity::VM + flavor: b1.large + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + timeout: 20 + retries: 10 + - command: unity-downloader-cli -u 6000.1 -c Editor --fast + timeout: 10 + retries: 3 + - command: python PythonScripts/PackageJsonCondersor.py + timeout: 1 + retries: 0 + - command: upm-ci package test -u .Editor --package-path . --type vetting-tests || exit 0 + timeout: 30 + retries: 0 + - command: python PythonScripts/parse_upm_ci_results.py --package-path=. + timeout: 2 + retries: 0 + after: + - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + logs: + paths: + - '*.log' + - '*.xml' + - upm-ci~/test-results/**/* + - upm-ci~/temp/*/Logs/** + - upm-ci~/temp/*/Library/*.log + - upm-ci~/temp/*/*.log + - upm-ci~/temp/Builds/*.log + browsable: onNonSuccess + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + diff --git a/.yamato/wrench/package-pack-jobs.yml b/.yamato/wrench/package-pack-jobs.yml new file mode 100644 index 0000000..72e2fe0 --- /dev/null +++ b/.yamato/wrench/package-pack-jobs.yml @@ -0,0 +1,28 @@ +# Auto-generated by Recipe Engine, do not modify manually. +# This job is generated by the wrench recipe engine module, see find the docs here: http://Go/ii2fb + +# Pack 2D Tilemap Extras +package_pack_-_2d_tilemap_extras: + name: Package Pack - 2d.tilemap.extras + agent: + image: package-ci/ubuntu-20.04:default + type: Unity::VM + flavor: b1.large + commands: + - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + timeout: 20 + retries: 10 + - command: upm-ci package pack --package-path . + - command: cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras_packages.json + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh + artifacts: + packages: + paths: + - upm-ci~/packages/**/* + variables: + UPMCI_ACK_LARGE_PACKAGE: 1 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + diff --git a/.yamato/wrench/preview-a-p-v.yml b/.yamato/wrench/preview-a-p-v.yml new file mode 100644 index 0000000..db04e5e --- /dev/null +++ b/.yamato/wrench/preview-a-p-v.yml @@ -0,0 +1,343 @@ +# Auto-generated by Recipe Engine, do not modify manually. +# This job is generated by the wrench recipe engine module, see find the docs here: http://Go/ii2fb + +# Parent Preview APV Job. +all_preview_apv_jobs: + name: All Preview APV Jobs + dependencies: + - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_1_-_macos + - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_1_-_ubuntu + - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_1_-_windows + - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_2_-_macos + - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_2_-_ubuntu + - path: .yamato/wrench/preview-a-p-v.yml#preview_apv_-_6000_2_-_windows + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + +# Functional tests for dependents found in the latest 6000.1 manifest (MacOS). +preview_apv_-_6000_1_-_macos: + name: Preview APV - 6000.1 - macos + agent: + image: package-ci/macos-13:default + type: Unity::VM::osx + flavor: b1.xlarge + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + timeout: 20 + retries: 10 + - command: unity-downloader-cli -u 6000.1 -c Editor --fast + timeout: 10 + retries: 3 + - command: python PythonScripts/preview_apv.py --wrench-config=.yamato/wrench/wrench_config.json --editor-version=6000.1 --testsuite=editor,playmode --artifacts-path=PreviewApvArtifacts~ + - command: echo 'Skipping Editor Manifest Validator as it is only supported on Windows' + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-mac.sh + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + logs: + paths: + - '*.log' + - '*.xml' + - upm-ci~/test-results/**/* + - upm-ci~/temp/*/Logs/** + - upm-ci~/temp/*/Library/*.log + - upm-ci~/temp/*/*.log + - upm-ci~/temp/Builds/*.log + packages: + paths: + - upm-ci~/packages/**/* + PreviewAPVResults: + paths: + - PreviewApvArtifacts~/** + - APVTest/**/manifest.json + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + +# Functional tests for dependents found in the latest 6000.1 manifest (Ubuntu). +preview_apv_-_6000_1_-_ubuntu: + name: Preview APV - 6000.1 - ubuntu + agent: + image: package-ci/ubuntu-20.04:default + type: Unity::VM + flavor: b1.large + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + timeout: 20 + retries: 10 + - command: unity-downloader-cli -u 6000.1 -c Editor --fast + timeout: 10 + retries: 3 + - command: python PythonScripts/preview_apv.py --wrench-config=.yamato/wrench/wrench_config.json --editor-version=6000.1 --testsuite=editor,playmode --artifacts-path=PreviewApvArtifacts~ + - command: echo 'Skipping Editor Manifest Validator as it is only supported on Windows' + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + logs: + paths: + - '*.log' + - '*.xml' + - upm-ci~/test-results/**/* + - upm-ci~/temp/*/Logs/** + - upm-ci~/temp/*/Library/*.log + - upm-ci~/temp/*/*.log + - upm-ci~/temp/Builds/*.log + packages: + paths: + - upm-ci~/packages/**/* + PreviewAPVResults: + paths: + - PreviewApvArtifacts~/** + - APVTest/**/manifest.json + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + +# Functional tests for dependents found in the latest 6000.1 manifest (Windows). +preview_apv_-_6000_1_-_windows: + name: Preview APV - 6000.1 - windows + agent: + image: package-ci/win10:default + type: Unity::VM + flavor: b1.large + commands: + - command: gsudo reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + timeout: 20 + retries: 10 + - command: unity-downloader-cli -u 6000.1 -c Editor --fast + timeout: 10 + retries: 3 + - command: python PythonScripts/preview_apv.py --wrench-config=.yamato/wrench/wrench_config.json --editor-version=6000.1 --testsuite=editor,playmode --artifacts-path=PreviewApvArtifacts~ + - command: python PythonScripts/editor_manifest_validator.py --version=6000.1 --wrench-config=.yamato/wrench/wrench_config.json + after: + - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + logs: + paths: + - '*.log' + - '*.xml' + - upm-ci~/test-results/**/* + - upm-ci~/temp/*/Logs/** + - upm-ci~/temp/*/Library/*.log + - upm-ci~/temp/*/*.log + - upm-ci~/temp/Builds/*.log + packages: + paths: + - upm-ci~/packages/**/* + PreviewAPVResults: + paths: + - PreviewApvArtifacts~/** + - APVTest/**/manifest.json + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + +# Functional tests for dependents found in the latest 6000.2 manifest (MacOS). +preview_apv_-_6000_2_-_macos: + name: Preview APV - 6000.2 - macos + agent: + image: package-ci/macos-13:default + type: Unity::VM::osx + flavor: b1.xlarge + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + timeout: 20 + retries: 10 + - command: unity-downloader-cli -u 6000.2 -c Editor --fast + timeout: 10 + retries: 3 + - command: python PythonScripts/preview_apv.py --wrench-config=.yamato/wrench/wrench_config.json --editor-version=6000.2 --testsuite=editor,playmode --artifacts-path=PreviewApvArtifacts~ + - command: echo 'Skipping Editor Manifest Validator as it is only supported on Windows' + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-mac.sh + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + logs: + paths: + - '*.log' + - '*.xml' + - upm-ci~/test-results/**/* + - upm-ci~/temp/*/Logs/** + - upm-ci~/temp/*/Library/*.log + - upm-ci~/temp/*/*.log + - upm-ci~/temp/Builds/*.log + packages: + paths: + - upm-ci~/packages/**/* + PreviewAPVResults: + paths: + - PreviewApvArtifacts~/** + - APVTest/**/manifest.json + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + +# Functional tests for dependents found in the latest 6000.2 manifest (Ubuntu). +preview_apv_-_6000_2_-_ubuntu: + name: Preview APV - 6000.2 - ubuntu + agent: + image: package-ci/ubuntu-20.04:default + type: Unity::VM + flavor: b1.large + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + timeout: 20 + retries: 10 + - command: unity-downloader-cli -u 6000.2 -c Editor --fast + timeout: 10 + retries: 3 + - command: python PythonScripts/preview_apv.py --wrench-config=.yamato/wrench/wrench_config.json --editor-version=6000.2 --testsuite=editor,playmode --artifacts-path=PreviewApvArtifacts~ + - command: echo 'Skipping Editor Manifest Validator as it is only supported on Windows' + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + logs: + paths: + - '*.log' + - '*.xml' + - upm-ci~/test-results/**/* + - upm-ci~/temp/*/Logs/** + - upm-ci~/temp/*/Library/*.log + - upm-ci~/temp/*/*.log + - upm-ci~/temp/Builds/*.log + packages: + paths: + - upm-ci~/packages/**/* + PreviewAPVResults: + paths: + - PreviewApvArtifacts~/** + - APVTest/**/manifest.json + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + +# Functional tests for dependents found in the latest 6000.2 manifest (Windows). +preview_apv_-_6000_2_-_windows: + name: Preview APV - 6000.2 - windows + agent: + image: package-ci/win10:default + type: Unity::VM + flavor: b1.large + commands: + - command: gsudo reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + timeout: 20 + retries: 10 + - command: unity-downloader-cli -u 6000.2 -c Editor --fast + timeout: 10 + retries: 3 + - command: python PythonScripts/preview_apv.py --wrench-config=.yamato/wrench/wrench_config.json --editor-version=6000.2 --testsuite=editor,playmode --artifacts-path=PreviewApvArtifacts~ + - command: python PythonScripts/editor_manifest_validator.py --version=6000.2 --wrench-config=.yamato/wrench/wrench_config.json + after: + - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + logs: + paths: + - '*.log' + - '*.xml' + - upm-ci~/test-results/**/* + - upm-ci~/temp/*/Logs/** + - upm-ci~/temp/*/Library/*.log + - upm-ci~/temp/*/*.log + - upm-ci~/temp/Builds/*.log + packages: + paths: + - upm-ci~/packages/**/* + PreviewAPVResults: + paths: + - PreviewApvArtifacts~/** + - APVTest/**/manifest.json + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + diff --git a/.yamato/wrench/promotion-jobs.yml b/.yamato/wrench/promotion-jobs.yml new file mode 100644 index 0000000..acaf840 --- /dev/null +++ b/.yamato/wrench/promotion-jobs.yml @@ -0,0 +1,179 @@ +# Auto-generated by Recipe Engine, do not modify manually. +# This job is generated by the wrench recipe engine module, see find the docs here: http://Go/ii2fb + +# Publish for 2d.tilemap.extras to https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-npm +publish_2d_tilemap_extras: + name: Publish 2d.tilemap.extras + agent: + image: package-ci/ubuntu-20.04:default + type: Unity::VM + flavor: b1.large + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/report_valid_editors.py + - command: python PythonScripts/ignore_existing_package_failure.py + - command: python PythonScripts/run_publish_if_any_package_left.py + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh + artifacts: + logs: + paths: + - results/UTR/**/* + browsable: onNonSuccess + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_1_-_macos + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.1-macos + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.1-macos + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_1_-_ubuntu + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.1-ubuntu + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.1-ubuntu + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_1_-_windows + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.1-windows + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.1-windows + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_1_0a9_-_windows + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.1.0a9-windows + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.1.0a9-windows + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_2_-_macos + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.2-macos + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.2-macos + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_2_-_ubuntu + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.2-ubuntu + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.2-ubuntu + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_2_-_windows + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.2-windows + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.2-windows + unzip: true + variables: + UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + +# Publish Dry Run for 2d.tilemap.extras to https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-npm +publish_dry_run_2d_tilemap_extras: + name: Publish Dry Run 2d.tilemap.extras + agent: + image: package-ci/ubuntu-20.04:default + type: Unity::VM + flavor: b1.large + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/report_valid_editors.py + - command: python PythonScripts/ignore_existing_package_failure.py + - command: python PythonScripts/run_publish_if_any_package_left.py --dry-run + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh + artifacts: + logs: + paths: + - results/UTR/**/* + browsable: onNonSuccess + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_1_-_macos + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.1-macos + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.1-macos + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_1_-_ubuntu + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.1-ubuntu + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.1-ubuntu + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_1_-_windows + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.1-windows + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.1-windows + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_1_0a9_-_windows + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.1.0a9-windows + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.1.0a9-windows + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_2_-_macos + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.2-macos + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.2-macos + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_2_-_ubuntu + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.2-ubuntu + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.2-ubuntu + unzip: true + - path: .yamato/wrench/validation-jobs.yml#validate_-_2d_tilemap_extras_-_6000_2_-_windows + specific_options: + UTR: + location: results/UTR/validate-2d.tilemap.extras-6000.2-windows + unzip: true + pvp-results: + location: results/pvp/validate-2d.tilemap.extras-6000.2-windows + unzip: true + variables: + UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + diff --git a/.yamato/wrench/publish-trigger.yml b/.yamato/wrench/publish-trigger.yml new file mode 100644 index 0000000..2366c70 --- /dev/null +++ b/.yamato/wrench/publish-trigger.yml @@ -0,0 +1,12 @@ +# Auto-generated by Recipe Engine, do not modify manually. +# This job is generated by the wrench recipe engine module, see find the docs here: http://Go/ii2fb +all_promotion_related_jobs_promotiontrigger: + name: All Promotion Related Jobs PromotionTrigger + dependencies: + - path: .yamato/wrench/api-validation-jobs.yml#all_api_validation_jobs + - path: .yamato/wrench/preview-a-p-v.yml#all_preview_apv_jobs + - path: .yamato/wrench/promotion-jobs.yml#publish_dry_run_2d_tilemap_extras + triggers: + expression: push.branch match "^release/.*" + cancel_old_ci: true + diff --git a/.yamato/wrench/recipe-regeneration.yml b/.yamato/wrench/recipe-regeneration.yml new file mode 100644 index 0000000..80843f9 --- /dev/null +++ b/.yamato/wrench/recipe-regeneration.yml @@ -0,0 +1,30 @@ +# Auto-generated by Recipe Engine, do not modify manually. +# This job is generated by the wrench recipe engine module, see find the docs here: http://Go/ii2fb + +# Test that Generated Wrench Jobs are up to date. +test_-_wrench_jobs_up_to_date: + name: Test - Wrench Jobs up to date + agent: + image: package-ci/ubuntu-20.04:default + type: Unity::VM + flavor: b1.large + commands: + - command: dotnet run --project Wrench/TilemapExtras.Cookbook.csproj + - command: |- + if [ -n "$(git status --porcelain -- .yamato/wrench)" ]; then + git status + echo "Your repo is not clean - diff output:" + git diff + echo "You must run recipe generation after updating recipes to update the generated YAML!" + echo "Run 'dotnet run --project Wrench/TilemapExtras.Cookbook.csproj' from the root of your repository to regenerate all job definitions created by wrench." + exit 1 + fi + variables: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + triggers: + expression: push.branch match "^release/.*" + cancel_old_ci: true + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + diff --git a/.yamato/wrench/validation-jobs.yml b/.yamato/wrench/validation-jobs.yml new file mode 100644 index 0000000..e79beea --- /dev/null +++ b/.yamato/wrench/validation-jobs.yml @@ -0,0 +1,451 @@ +# Auto-generated by Recipe Engine, do not modify manually. +# This job is generated by the wrench recipe engine module, see find the docs here: http://Go/ii2fb + +# PVP Editor and Playmode tests for Validate - 2d.tilemap.extras - 6000.1 - macos (6000.1 - MacOS). +validate_-_2d_tilemap_extras_-_6000_1_-_macos: + name: Validate - 2d.tilemap.extras - 6000.1 - macos + agent: + image: package-ci/macos-13:default + type: Unity::VM::osx + flavor: b1.xlarge + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: unity-downloader-cli -u 6000.1 -c Editor --fast + timeout: 10 + retries: 3 + - command: upm-pvp create-test-project test-2d.tilemap.extras --packages "upm-ci~/packages/*.tgz" --unity .Editor + timeout: 10 + retries: 1 + - command: echo No internal packages to add. + - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp + timeout: 40 + retries: 0 + - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json + timeout: 5 + retries: 0 + - command: echo No additional PVP profiles to declared to check. + - command: UnifiedTestRunner --testproject=test-2d.tilemap.extras --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" + timeout: 40 + retries: 1 + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-mac.sh + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + packages: + paths: + - upm-ci~/packages/**/* + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + UTR: + paths: + - '*.log' + - '*.xml' + - artifacts/**/* + - test-2d.tilemap.extras/Logs/** + - test-2d.tilemap.extras/Library/*.log + - test-2d.tilemap.extras/*.log + - test-2d.tilemap.extras/Builds/*.log + - build/test-results/** + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + labels: + - Packages:2d.tilemap.extras + +# PVP Editor and Playmode tests for Validate - 2d.tilemap.extras - 6000.1 - ubuntu (6000.1 - Ubuntu). +validate_-_2d_tilemap_extras_-_6000_1_-_ubuntu: + name: Validate - 2d.tilemap.extras - 6000.1 - ubuntu + agent: + image: package-ci/ubuntu-20.04:default + type: Unity::VM + flavor: b1.large + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: unity-downloader-cli -u 6000.1 -c Editor --fast + timeout: 10 + retries: 3 + - command: upm-pvp create-test-project test-2d.tilemap.extras --packages "upm-ci~/packages/*.tgz" --unity .Editor + timeout: 10 + retries: 1 + - command: echo No internal packages to add. + - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp + timeout: 40 + retries: 0 + - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json + timeout: 5 + retries: 0 + - command: echo No additional PVP profiles to declared to check. + - command: UnifiedTestRunner --testproject=test-2d.tilemap.extras --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" + timeout: 40 + retries: 1 + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + packages: + paths: + - upm-ci~/packages/**/* + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + UTR: + paths: + - '*.log' + - '*.xml' + - artifacts/**/* + - test-2d.tilemap.extras/Logs/** + - test-2d.tilemap.extras/Library/*.log + - test-2d.tilemap.extras/*.log + - test-2d.tilemap.extras/Builds/*.log + - build/test-results/** + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + labels: + - Packages:2d.tilemap.extras + +# PVP Editor and Playmode tests for Validate - 2d.tilemap.extras - 6000.1 - windows (6000.1 - Windows). +validate_-_2d_tilemap_extras_-_6000_1_-_windows: + name: Validate - 2d.tilemap.extras - 6000.1 - windows + agent: + image: package-ci/win10:default + type: Unity::VM + flavor: b1.large + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: unity-downloader-cli -u 6000.1 -c Editor --fast + timeout: 10 + retries: 3 + - command: upm-pvp create-test-project test-2d.tilemap.extras --packages "upm-ci~/packages/*.tgz" --unity .Editor + timeout: 10 + retries: 1 + - command: echo No internal packages to add. + - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp + timeout: 40 + retries: 0 + - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json + timeout: 5 + retries: 0 + - command: echo No additional PVP profiles to declared to check. + - command: UnifiedTestRunner.exe --testproject=test-2d.tilemap.extras --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" + timeout: 40 + retries: 1 + after: + - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + packages: + paths: + - upm-ci~/packages/**/* + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + UTR: + paths: + - '*.log' + - '*.xml' + - artifacts/**/* + - test-2d.tilemap.extras/Logs/** + - test-2d.tilemap.extras/Library/*.log + - test-2d.tilemap.extras/*.log + - test-2d.tilemap.extras/Builds/*.log + - build/test-results/** + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + labels: + - Packages:2d.tilemap.extras + +# PVP Editor and Playmode tests for Validate - 2d.tilemap.extras - 6000.1.0a9 - windows (6000.1.0a9 - Windows). +validate_-_2d_tilemap_extras_-_6000_1_0a9_-_windows: + name: Validate - 2d.tilemap.extras - 6000.1.0a9 - windows + agent: + image: package-ci/win10:default + type: Unity::VM + flavor: b1.large + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: unity-downloader-cli -u 6000.1.0a9 -c Editor --fast + timeout: 10 + retries: 3 + - command: upm-pvp create-test-project test-2d.tilemap.extras --packages "upm-ci~/packages/*.tgz" --unity .Editor + timeout: 10 + retries: 1 + - command: echo No internal packages to add. + - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp + timeout: 40 + retries: 0 + - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json + timeout: 5 + retries: 0 + - command: echo No additional PVP profiles to declared to check. + - command: UnifiedTestRunner.exe --testproject=test-2d.tilemap.extras --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" + timeout: 40 + retries: 1 + after: + - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + packages: + paths: + - upm-ci~/packages/**/* + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + UTR: + paths: + - '*.log' + - '*.xml' + - artifacts/**/* + - test-2d.tilemap.extras/Logs/** + - test-2d.tilemap.extras/Library/*.log + - test-2d.tilemap.extras/*.log + - test-2d.tilemap.extras/Builds/*.log + - build/test-results/** + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + labels: + - Packages:2d.tilemap.extras + +# PVP Editor and Playmode tests for Validate - 2d.tilemap.extras - 6000.2 - macos (6000.2 - MacOS). +validate_-_2d_tilemap_extras_-_6000_2_-_macos: + name: Validate - 2d.tilemap.extras - 6000.2 - macos + agent: + image: package-ci/macos-13:default + type: Unity::VM::osx + flavor: b1.xlarge + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: unity-downloader-cli -u 6000.2 -c Editor --fast + timeout: 10 + retries: 3 + - command: upm-pvp create-test-project test-2d.tilemap.extras --packages "upm-ci~/packages/*.tgz" --unity .Editor + timeout: 10 + retries: 1 + - command: echo No internal packages to add. + - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp + timeout: 40 + retries: 0 + - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json + timeout: 5 + retries: 0 + - command: echo No additional PVP profiles to declared to check. + - command: UnifiedTestRunner --testproject=test-2d.tilemap.extras --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" + timeout: 40 + retries: 1 + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-mac.sh + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + packages: + paths: + - upm-ci~/packages/**/* + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + UTR: + paths: + - '*.log' + - '*.xml' + - artifacts/**/* + - test-2d.tilemap.extras/Logs/** + - test-2d.tilemap.extras/Library/*.log + - test-2d.tilemap.extras/*.log + - test-2d.tilemap.extras/Builds/*.log + - build/test-results/** + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + labels: + - Packages:2d.tilemap.extras + +# PVP Editor and Playmode tests for Validate - 2d.tilemap.extras - 6000.2 - ubuntu (6000.2 - Ubuntu). +validate_-_2d_tilemap_extras_-_6000_2_-_ubuntu: + name: Validate - 2d.tilemap.extras - 6000.2 - ubuntu + agent: + image: package-ci/ubuntu-20.04:default + type: Unity::VM + flavor: b1.large + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: unity-downloader-cli -u 6000.2 -c Editor --fast + timeout: 10 + retries: 3 + - command: upm-pvp create-test-project test-2d.tilemap.extras --packages "upm-ci~/packages/*.tgz" --unity .Editor + timeout: 10 + retries: 1 + - command: echo No internal packages to add. + - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp + timeout: 40 + retries: 0 + - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json + timeout: 5 + retries: 0 + - command: echo No additional PVP profiles to declared to check. + - command: UnifiedTestRunner --testproject=test-2d.tilemap.extras --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" + timeout: 40 + retries: 1 + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + packages: + paths: + - upm-ci~/packages/**/* + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + UTR: + paths: + - '*.log' + - '*.xml' + - artifacts/**/* + - test-2d.tilemap.extras/Logs/** + - test-2d.tilemap.extras/Library/*.log + - test-2d.tilemap.extras/*.log + - test-2d.tilemap.extras/Builds/*.log + - build/test-results/** + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + labels: + - Packages:2d.tilemap.extras + +# PVP Editor and Playmode tests for Validate - 2d.tilemap.extras - 6000.2 - windows (6000.2 - Windows). +validate_-_2d_tilemap_extras_-_6000_2_-_windows: + name: Validate - 2d.tilemap.extras - 6000.2 - windows + agent: + image: package-ci/win10:default + type: Unity::VM + flavor: b1.large + commands: + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/print_machine_info.py + - command: unity-downloader-cli -u 6000.2 -c Editor --fast + timeout: 10 + retries: 3 + - command: upm-pvp create-test-project test-2d.tilemap.extras --packages "upm-ci~/packages/*.tgz" --unity .Editor + timeout: 10 + retries: 1 + - command: echo No internal packages to add. + - command: upm-pvp test --unity .Editor --packages "upm-ci~/packages/*.tgz" --results upm-ci~/pvp + timeout: 40 + retries: 0 + - command: upm-pvp require "pkgprom-promote -PVP-29-2 rme" --results upm-ci~/pvp --exemptions upm-ci~/pvp/failures.json + timeout: 5 + retries: 0 + - command: echo No additional PVP profiles to declared to check. + - command: UnifiedTestRunner.exe --testproject=test-2d.tilemap.extras --editor-location=.Editor --clean-library --reruncount=1 --clean-library-on-rerun --artifacts-path=artifacts --suite=Editor --suite=Playmode "--ff={ops.upmpvpevidence.enable=true}" + timeout: 40 + retries: 1 + after: + - command: .yamato\generated-scripts\infrastructure-instability-detection-win.cmd + artifacts: + Crash Dumps: + paths: + - CrashDumps/** + packages: + paths: + - upm-ci~/packages/**/* + pvp-results: + paths: + - upm-ci~/pvp/**/* + browsable: onDemand + UTR: + paths: + - '*.log' + - '*.xml' + - artifacts/**/* + - test-2d.tilemap.extras/Logs/** + - test-2d.tilemap.extras/Library/*.log + - test-2d.tilemap.extras/*.log + - test-2d.tilemap.extras/Builds/*.log + - build/test-results/** + browsable: onDemand + dependencies: + - path: .yamato/wrench/package-pack-jobs.yml#package_pack_-_2d_tilemap_extras + variables: + UPMPVP_ACK_UPMPVP_DOES_NO_API_VALIDATION: 1 + UPMPVP_CONTEXT_WRENCH: 0.10.42.0 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + labels: + - Packages:2d.tilemap.extras + diff --git a/.yamato/wrench/wrench_config.json b/.yamato/wrench/wrench_config.json new file mode 100644 index 0000000..4fc09a1 --- /dev/null +++ b/.yamato/wrench/wrench_config.json @@ -0,0 +1,37 @@ +{ + "schema_version": 0.7, + "packages": { + "com.unity.2d.tilemap.extras": { + "directory": "./", + "prePackCommands": [], + "preTestCommands": { + "MacOS": [], + "Ubuntu": [], + "Windows": [] + }, + "InternalOnly": false, + "NeverPublish": false, + "MaxEditorVersion": "", + "coverageEnabled": false, + "coverageCommands": [ + "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:ASSEMBLY_NAME;pathReplacePatterns:@*,,**/PackageCache/,;sourcePaths:YAMATO_SOURCE_DIR/Packages;" + ], + "dependantsToIgnoreInPreviewApv": {} + } + }, + "releasing_packages": [ + "com.unity.2d.tilemap.extras" + ], + "jobs_to_monitor": { + "com.unity.2d.tilemap.extras": [ + ".yamato/wrench/api-validation-jobs.yml#api_validation_-_2d_tilemap_extras_-_6000_1_-_windows", + ".yamato/wrench/preview-a-p-v.yml#all_preview_apv_jobs", + ".yamato/wrench/promotion-jobs.yml#publish_dry_run_2d_tilemap_extras" + ] + }, + "publishing_job": ".yamato/wrench/promotion-jobs.yml#publish_2d_tilemap_extras", + "branch_pattern": "ReleaseSlash", + "wrench_version": "0.10.42.0", + "pvp_exemption_path": ".yamato/wrench/pvp-exemptions.json", + "cs_project_path": "Wrench/TilemapExtras.Cookbook.csproj" +} \ No newline at end of file diff --git a/Wrench/Program.cs b/Wrench/Program.cs new file mode 100644 index 0000000..bfac8ec --- /dev/null +++ b/Wrench/Program.cs @@ -0,0 +1,21 @@ +using TilemapExtras.Cookbook.Settings; +using RecipeEngine; +using RecipeEngine.Modules.Wrench.Helpers; + + +// ReSharper disable once CheckNamespace +public static class Program +{ + public static int Main(string[] args) + { + var settings = new TilemapExtrasSettings(); + + // ReSharper disable once UnusedVariable + var engine = EngineFactory + .Create() + .ScanAll() + .WithWrenchModule(settings.Wrench) + .GenerateAsync().Result; + return engine; + } +} diff --git a/Wrench/Settings/TilemapExtrasSettings.cs b/Wrench/Settings/TilemapExtrasSettings.cs new file mode 100644 index 0000000..6f190e3 --- /dev/null +++ b/Wrench/Settings/TilemapExtrasSettings.cs @@ -0,0 +1,30 @@ +using RecipeEngine.Api.Settings; +using RecipeEngine.Modules.Wrench.Models; +using RecipeEngine.Modules.Wrench.Settings; + +namespace TilemapExtras.Cookbook.Settings; + +public class TilemapExtrasSettings : AnnotatedSettingsBase +{ + // Path from the root of the repository where packages are located. + readonly string[] PackagesRootPaths = {"."}; + + // update this to list all packages in this repo that you want to release. + Dictionary PackageOptions = new() + { + { + "com.unity.2d.tilemap.extras", + new PackageOptions() { ReleaseOptions = new ReleaseOptions() { IsReleasing = true } } + } + }; + + public TilemapExtrasSettings() + { + Wrench = new WrenchSettings( + PackagesRootPaths, + PackageOptions + ); + } + + public WrenchSettings Wrench { get; private set; } +} diff --git a/Wrench/TilemapExtras-recipes.sln b/Wrench/TilemapExtras-recipes.sln new file mode 100644 index 0000000..6ceb742 --- /dev/null +++ b/Wrench/TilemapExtras-recipes.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TilemapExtras.Cookbook", "TilemapExtras.Cookbook.csproj", "{A5A71435-C891-4C78-989C-2713DAA7B3B8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A5A71435-C891-4C78-989C-2713DAA7B3B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5A71435-C891-4C78-989C-2713DAA7B3B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5A71435-C891-4C78-989C-2713DAA7B3B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5A71435-C891-4C78-989C-2713DAA7B3B8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/Wrench/TilemapExtras.Cookbook.csproj b/Wrench/TilemapExtras.Cookbook.csproj new file mode 100644 index 0000000..3c9167f --- /dev/null +++ b/Wrench/TilemapExtras.Cookbook.csproj @@ -0,0 +1,14 @@ + + + + Exe + net8.0 + enable + enable + + + + + + + diff --git a/Wrench/global.json b/Wrench/global.json new file mode 100644 index 0000000..2ddda36 --- /dev/null +++ b/Wrench/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "8.0.0", + "rollForward": "latestMinor", + "allowPrerelease": false + } +} \ No newline at end of file diff --git a/Wrench/nuget.config b/Wrench/nuget.config new file mode 100644 index 0000000..de6af57 --- /dev/null +++ b/Wrench/nuget.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/Wrench/onboard.py b/Wrench/onboard.py new file mode 100644 index 0000000..6f51867 --- /dev/null +++ b/Wrench/onboard.py @@ -0,0 +1,149 @@ +# Description: This script is used to onboard a project onto Wrench +import argparse +import json +import os +import shutil +import subprocess + +TEMPLATE_CSPROJ = "TEMPLATE.Cookbook.csproj" +TEMPLATE_SLN = "TEMPLATE-recipes.sln" + + +def get_args(): + parser = argparse.ArgumentParser(description="Onboard a project onto Wrench") + parser.add_argument("--settings-name", required=True, help="The name of the settings file", + dest="settings_name") + return parser.parse_args() + + +def delete_git_folder(): + print("Deleting .git folder") + if os.path.isfile(".gitignore"): + os.remove(".gitignore") + if os.path.exists(".git"): + shutil.rmtree(".git", ignore_errors=True) + + +def get_git_root_dir(): + git_dir = subprocess.run(["git", "rev-parse", "--show-toplevel"], stdout=subprocess.PIPE).stdout + return git_dir.decode("utf-8").strip() + + +def find_package_json_files(root_dir, initial=True): + #walk the directory recursively and find all package.json files + rtn_list = set() + for root, dirs, files in os.walk(root_dir): + for file in files: + if file == "package.json": + if initial: + file_location = file + else: + file_location = os.path.join(root, file) + # validate the package.json file + with open(os.path.join(root, file_location), "r") as f: + data = json.loads(f.read()) + if "unity" in data and "name" in data: + rtn_list.add(data["name"]) + for directory in dirs: + rtn_list.update(find_package_json_files(os.path.join(root, directory), False)) + + return rtn_list + + +def create_package_option(name, first): + initial_char="" + initial_tab = "" + if not first: + initial_char = ",\n" + initial_tab = " " + return f"{initial_char}{initial_tab}{{\n \"{name}\",\n new PackageOptions() {{ ReleaseOptions = new ReleaseOptions() {{ IsReleasing = true }} }}\n }}" + + +def update_template_variables(packages): + template_var = "TEMPLATESettings" + settings = get_args() + settings_content = open(os.path.join("Settings", template_var+".cs")).read() + # replace the template settings with the actual settings + settings_content = settings_content.replace("TEMPLATESettings", f"{settings.settings_name}Settings") + settings_content = settings_content.replace('PACKAGES_ROOTS', '.') + + package_replace_string = str() + first = True + for package in packages: + package_replace_string += create_package_option(package, first) + first = False + settings_content = settings_content.replace('//"PACKAGES_TO_RELEASE"', package_replace_string) + settings_content = settings_content.replace('TEMPLATE.Cookbook.Settings', settings.settings_name+".Cookbook.Settings") + + # Write the updated settings file + with open(os.path.join("Settings", settings.settings_name+"Settings.cs"), "w") as f: + f.write(settings_content) + # Update the Program.cs file + program_content = open("Program.cs").read() + with open("Program.cs", "w") as f: + program_content = program_content.replace('using TEMPLATE.Cookbook.Settings;', f"using {settings.settings_name}.Cookbook.Settings;") + program_content = program_content.replace("TEMPLATE.Cookbook", settings.settings_name) + program_content = program_content.replace('PACKAGES_ROOT', '.') + program_content = program_content.replace('TEMPLATESettings', settings.settings_name+"Settings") + f.write(program_content) + # delete the template file + os.remove(os.path.join("Settings", template_var+".cs")) + # update csproj file + csproj_content = open(TEMPLATE_CSPROJ).read() + with open(TEMPLATE_CSPROJ.replace("TEMPLATE", settings.settings_name), "w") as f: + f.write(csproj_content) + os.remove(TEMPLATE_CSPROJ) + # update sln file + sln_content = open(TEMPLATE_SLN).read() + with open(TEMPLATE_SLN.replace("TEMPLATE", settings.settings_name), "w") as f: + sln_content = sln_content.replace("TEMPLATE", settings.settings_name) + f.write(sln_content) + os.remove(TEMPLATE_SLN) + + +def update_shell_scripts(root_dir): + split_root=os.path.normpath(root_dir).split(os.sep) + split_cwd=os.getcwd().split(os.sep) + + relative_path = os.path.relpath(os.getcwd(), root_dir) + csproj_path = os.path.join(relative_path, f"{get_args().settings_name}.Cookbook.csproj") + + path_diff = len(split_cwd) - len(split_root) + cd_string = str() + for i in range(path_diff): + cd_string += "../" + + bash_content = open("regenerate.bat").read() + bash_content = bash_content.replace("STEPS_TO_ROOT", cd_string) + bash_content = bash_content.replace("PATH_TO_CSPROJ", csproj_path) + with open("regenerate.bat", "w") as f: + f.write(bash_content) + + shell_content = open("regenerate.sh").read() + shell_content = shell_content.replace("STEPS_TO_ROOT", cd_string) + shell_content = shell_content.replace("PATH_TO_CSPROJ", csproj_path) + with open("regenerate.sh", "w") as f: + f.write(shell_content) + + +def main(): + print("Starting process of onboarding") + # delete git folder + delete_git_folder() + # get root folder + root_dir = get_git_root_dir() + # find all appropriate package.json files + package_files = find_package_json_files(root_dir) + packages = set() + # process out any testing packages + for package in package_files: + if ".tests" in package: + continue + packages.add(package) + # Replace Template naming with actual naming + update_template_variables(packages) + update_shell_scripts(root_dir) + + +if "__main__" in __name__: + main() \ No newline at end of file diff --git a/Wrench/regenerate.bat b/Wrench/regenerate.bat new file mode 100644 index 0000000..3bcf50a --- /dev/null +++ b/Wrench/regenerate.bat @@ -0,0 +1,2 @@ +cd %~dp0../ +dotnet run --project Wrench/TilemapExtras.Cookbook.csproj \ No newline at end of file diff --git a/Wrench/regenerate.sh b/Wrench/regenerate.sh new file mode 100755 index 0000000..7b33aba --- /dev/null +++ b/Wrench/regenerate.sh @@ -0,0 +1,2 @@ +cd $(dirname "$0")/../ +dotnet run --project Wrench/TilemapExtras.Cookbook.csproj \ No newline at end of file From 768d85fc354025c2251a3638aab3c9d9c333c7f6 Mon Sep 17 00:00:00 2001 From: chuanxin <> Date: Tue, 4 Mar 2025 12:42:34 +0800 Subject: [PATCH 2/6] -Add prepack commands --- .yamato/wrench/package-pack-jobs.yml | 4 ++++ .yamato/wrench/wrench_config.json | 7 ++++++- Wrench/Settings/TilemapExtrasSettings.cs | 16 +++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.yamato/wrench/package-pack-jobs.yml b/.yamato/wrench/package-pack-jobs.yml index 72e2fe0..abf8884 100644 --- a/.yamato/wrench/package-pack-jobs.yml +++ b/.yamato/wrench/package-pack-jobs.yml @@ -12,6 +12,10 @@ package_pack_-_2d_tilemap_extras: - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm timeout: 20 retries: 10 + - command: git clone $UNITY_2D_REPO_GIT --no-checkout ../.unity/2d + - command: cd ../.unity/2d && git fetch origin $GIT_BRANCH + - command: cd ../.unity/2d && rm -f .git/index.lock + - command: cd ../.unity/2d && git checkout -f --detach FETCH_HEAD - command: upm-ci package pack --package-path . - command: cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras_packages.json after: diff --git a/.yamato/wrench/wrench_config.json b/.yamato/wrench/wrench_config.json index 4fc09a1..33e5866 100644 --- a/.yamato/wrench/wrench_config.json +++ b/.yamato/wrench/wrench_config.json @@ -3,7 +3,12 @@ "packages": { "com.unity.2d.tilemap.extras": { "directory": "./", - "prePackCommands": [], + "prePackCommands": [ + "git clone $UNITY_2D_REPO_GIT --no-checkout ../.unity/2d", + "cd ../.unity/2d && git fetch origin $GIT_BRANCH", + "cd ../.unity/2d && rm -f .git/index.lock", + "cd ../.unity/2d && git checkout -f --detach FETCH_HEAD" + ], "preTestCommands": { "MacOS": [], "Ubuntu": [], diff --git a/Wrench/Settings/TilemapExtrasSettings.cs b/Wrench/Settings/TilemapExtrasSettings.cs index 6f190e3..6df24d7 100644 --- a/Wrench/Settings/TilemapExtrasSettings.cs +++ b/Wrench/Settings/TilemapExtrasSettings.cs @@ -1,4 +1,5 @@ using RecipeEngine.Api.Settings; +using RecipeEngine.Api.Commands; using RecipeEngine.Modules.Wrench.Models; using RecipeEngine.Modules.Wrench.Settings; @@ -14,7 +15,20 @@ public class TilemapExtrasSettings : AnnotatedSettingsBase { { "com.unity.2d.tilemap.extras", - new PackageOptions() { ReleaseOptions = new ReleaseOptions() { IsReleasing = true } } + new PackageOptions() + { + PackJobOptions = new PackJobOptions() + { + PrePackCommands = new List() + { + new Command("git clone $UNITY_2D_REPO_GIT --no-checkout ../.unity/2d"), + new Command("cd ../.unity/2d && git fetch origin $GIT_BRANCH"), + new Command("cd ../.unity/2d && rm -f .git/index.lock"), + new Command("cd ../.unity/2d && git checkout -f --detach FETCH_HEAD") + } + }, + ReleaseOptions = new ReleaseOptions() { IsReleasing = true } + } } }; From 2133d0071b2cc6d2b4f0ccfca0588eb603718029 Mon Sep 17 00:00:00 2001 From: chuanxin <> Date: Tue, 4 Mar 2025 12:52:48 +0800 Subject: [PATCH 3/6] -Move Wrench to hidden folder --- {Wrench => .Wrench}/Program.cs | 0 {Wrench => .Wrench}/Settings/TilemapExtrasSettings.cs | 0 {Wrench => .Wrench}/TilemapExtras-recipes.sln | 0 {Wrench => .Wrench}/TilemapExtras.Cookbook.csproj | 0 {Wrench => .Wrench}/global.json | 0 {Wrench => .Wrench}/nuget.config | 0 {Wrench => .Wrench}/onboard.py | 0 .Wrench/regenerate.bat | 2 ++ .Wrench/regenerate.sh | 2 ++ .gitignore | 7 +------ .yamato/wrench/recipe-regeneration.yml | 4 ++-- .yamato/wrench/wrench_config.json | 2 +- Wrench/regenerate.bat | 2 -- Wrench/regenerate.sh | 2 -- 14 files changed, 8 insertions(+), 13 deletions(-) rename {Wrench => .Wrench}/Program.cs (100%) rename {Wrench => .Wrench}/Settings/TilemapExtrasSettings.cs (100%) rename {Wrench => .Wrench}/TilemapExtras-recipes.sln (100%) rename {Wrench => .Wrench}/TilemapExtras.Cookbook.csproj (100%) rename {Wrench => .Wrench}/global.json (100%) rename {Wrench => .Wrench}/nuget.config (100%) rename {Wrench => .Wrench}/onboard.py (100%) create mode 100644 .Wrench/regenerate.bat create mode 100755 .Wrench/regenerate.sh delete mode 100644 Wrench/regenerate.bat delete mode 100755 Wrench/regenerate.sh diff --git a/Wrench/Program.cs b/.Wrench/Program.cs similarity index 100% rename from Wrench/Program.cs rename to .Wrench/Program.cs diff --git a/Wrench/Settings/TilemapExtrasSettings.cs b/.Wrench/Settings/TilemapExtrasSettings.cs similarity index 100% rename from Wrench/Settings/TilemapExtrasSettings.cs rename to .Wrench/Settings/TilemapExtrasSettings.cs diff --git a/Wrench/TilemapExtras-recipes.sln b/.Wrench/TilemapExtras-recipes.sln similarity index 100% rename from Wrench/TilemapExtras-recipes.sln rename to .Wrench/TilemapExtras-recipes.sln diff --git a/Wrench/TilemapExtras.Cookbook.csproj b/.Wrench/TilemapExtras.Cookbook.csproj similarity index 100% rename from Wrench/TilemapExtras.Cookbook.csproj rename to .Wrench/TilemapExtras.Cookbook.csproj diff --git a/Wrench/global.json b/.Wrench/global.json similarity index 100% rename from Wrench/global.json rename to .Wrench/global.json diff --git a/Wrench/nuget.config b/.Wrench/nuget.config similarity index 100% rename from Wrench/nuget.config rename to .Wrench/nuget.config diff --git a/Wrench/onboard.py b/.Wrench/onboard.py similarity index 100% rename from Wrench/onboard.py rename to .Wrench/onboard.py diff --git a/.Wrench/regenerate.bat b/.Wrench/regenerate.bat new file mode 100644 index 0000000..7ec05e3 --- /dev/null +++ b/.Wrench/regenerate.bat @@ -0,0 +1,2 @@ +cd %~dp0../ +dotnet run --project .Wrench/TilemapExtras.Cookbook.csproj \ No newline at end of file diff --git a/.Wrench/regenerate.sh b/.Wrench/regenerate.sh new file mode 100755 index 0000000..991c77c --- /dev/null +++ b/.Wrench/regenerate.sh @@ -0,0 +1,2 @@ +cd $(dirname "$0")/../ +dotnet run --project .Wrench/TilemapExtras.Cookbook.csproj \ No newline at end of file diff --git a/.gitignore b/.gitignore index f18fe4d..0471bc1 100644 --- a/.gitignore +++ b/.gitignore @@ -58,9 +58,4 @@ SceneDependencyCache/ !Samples~/ !Packages/com.unity.2d.psdimporter.tests/EditorTests/TypeAssets~/ .DS_Store -.multitool - -#Packageworks -!Wrench/*.sln -!Wrench/*.csproj -Wrench/bin/ \ No newline at end of file +.multitool \ No newline at end of file diff --git a/.yamato/wrench/recipe-regeneration.yml b/.yamato/wrench/recipe-regeneration.yml index 80843f9..28e9f54 100644 --- a/.yamato/wrench/recipe-regeneration.yml +++ b/.yamato/wrench/recipe-regeneration.yml @@ -9,14 +9,14 @@ test_-_wrench_jobs_up_to_date: type: Unity::VM flavor: b1.large commands: - - command: dotnet run --project Wrench/TilemapExtras.Cookbook.csproj + - command: dotnet run --project .Wrench/TilemapExtras.Cookbook.csproj - command: |- if [ -n "$(git status --porcelain -- .yamato/wrench)" ]; then git status echo "Your repo is not clean - diff output:" git diff echo "You must run recipe generation after updating recipes to update the generated YAML!" - echo "Run 'dotnet run --project Wrench/TilemapExtras.Cookbook.csproj' from the root of your repository to regenerate all job definitions created by wrench." + echo "Run 'dotnet run --project .Wrench/TilemapExtras.Cookbook.csproj' from the root of your repository to regenerate all job definitions created by wrench." exit 1 fi variables: diff --git a/.yamato/wrench/wrench_config.json b/.yamato/wrench/wrench_config.json index 33e5866..656f441 100644 --- a/.yamato/wrench/wrench_config.json +++ b/.yamato/wrench/wrench_config.json @@ -38,5 +38,5 @@ "branch_pattern": "ReleaseSlash", "wrench_version": "0.10.42.0", "pvp_exemption_path": ".yamato/wrench/pvp-exemptions.json", - "cs_project_path": "Wrench/TilemapExtras.Cookbook.csproj" + "cs_project_path": ".Wrench/TilemapExtras.Cookbook.csproj" } \ No newline at end of file diff --git a/Wrench/regenerate.bat b/Wrench/regenerate.bat deleted file mode 100644 index 3bcf50a..0000000 --- a/Wrench/regenerate.bat +++ /dev/null @@ -1,2 +0,0 @@ -cd %~dp0../ -dotnet run --project Wrench/TilemapExtras.Cookbook.csproj \ No newline at end of file diff --git a/Wrench/regenerate.sh b/Wrench/regenerate.sh deleted file mode 100755 index 7b33aba..0000000 --- a/Wrench/regenerate.sh +++ /dev/null @@ -1,2 +0,0 @@ -cd $(dirname "$0")/../ -dotnet run --project Wrench/TilemapExtras.Cookbook.csproj \ No newline at end of file From 5cbe908e6cd82c5230761604721401135c106b2f Mon Sep 17 00:00:00 2001 From: chuanxin <> Date: Tue, 4 Mar 2025 13:14:21 +0800 Subject: [PATCH 4/6] -Pack tests --- .Wrench/Settings/TilemapExtrasSettings.cs | 7 +++++-- .gitignore | 4 +++- .yamato/wrench/package-pack-jobs.yml | 3 +++ .yamato/wrench/wrench_config.json | 5 ++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.Wrench/Settings/TilemapExtrasSettings.cs b/.Wrench/Settings/TilemapExtrasSettings.cs index 6df24d7..9027548 100644 --- a/.Wrench/Settings/TilemapExtrasSettings.cs +++ b/.Wrench/Settings/TilemapExtrasSettings.cs @@ -24,8 +24,11 @@ public class TilemapExtrasSettings : AnnotatedSettingsBase new Command("git clone $UNITY_2D_REPO_GIT --no-checkout ../.unity/2d"), new Command("cd ../.unity/2d && git fetch origin $GIT_BRANCH"), new Command("cd ../.unity/2d && rm -f .git/index.lock"), - new Command("cd ../.unity/2d && git checkout -f --detach FETCH_HEAD") - } + new Command("cd ../.unity/2d && git checkout -f --detach FETCH_HEAD"), + new Command("upm-ci package pack --package-path ../.unity/2d/Packages/com.unity.2d.tilemap.extras.tests"), + new Command("cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras.tests_packages.json"), + new Command("rm upm-ci~/packages/packages.json"), + }, }, ReleaseOptions = new ReleaseOptions() { IsReleasing = true } } diff --git a/.gitignore b/.gitignore index 0471bc1..225916f 100644 --- a/.gitignore +++ b/.gitignore @@ -58,4 +58,6 @@ SceneDependencyCache/ !Samples~/ !Packages/com.unity.2d.psdimporter.tests/EditorTests/TypeAssets~/ .DS_Store -.multitool \ No newline at end of file +.multitool + +.Wrench/bin \ No newline at end of file diff --git a/.yamato/wrench/package-pack-jobs.yml b/.yamato/wrench/package-pack-jobs.yml index abf8884..3b09fde 100644 --- a/.yamato/wrench/package-pack-jobs.yml +++ b/.yamato/wrench/package-pack-jobs.yml @@ -16,6 +16,9 @@ package_pack_-_2d_tilemap_extras: - command: cd ../.unity/2d && git fetch origin $GIT_BRANCH - command: cd ../.unity/2d && rm -f .git/index.lock - command: cd ../.unity/2d && git checkout -f --detach FETCH_HEAD + - command: upm-ci package pack --package-path ../.unity/2d/Packages/com.unity.2d.tilemap.extras.tests + - command: cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras.tests_packages.json + - command: rm upm-ci~/packages/packages.json - command: upm-ci package pack --package-path . - command: cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras_packages.json after: diff --git a/.yamato/wrench/wrench_config.json b/.yamato/wrench/wrench_config.json index 656f441..74ecb99 100644 --- a/.yamato/wrench/wrench_config.json +++ b/.yamato/wrench/wrench_config.json @@ -7,7 +7,10 @@ "git clone $UNITY_2D_REPO_GIT --no-checkout ../.unity/2d", "cd ../.unity/2d && git fetch origin $GIT_BRANCH", "cd ../.unity/2d && rm -f .git/index.lock", - "cd ../.unity/2d && git checkout -f --detach FETCH_HEAD" + "cd ../.unity/2d && git checkout -f --detach FETCH_HEAD", + "upm-ci package pack --package-path ../.unity/2d/Packages/com.unity.2d.tilemap.extras.tests", + "cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras.tests_packages.json", + "rm upm-ci~/packages/packages.json" ], "preTestCommands": { "MacOS": [], From 5128a0d321e01acf69763db69ca7897d9c2cb5d2 Mon Sep 17 00:00:00 2001 From: chuanxin <> Date: Tue, 4 Mar 2025 13:50:12 +0800 Subject: [PATCH 5/6] -Add .Wrench to .npmignore --- .npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmignore b/.npmignore index ec41e61..e44f096 100644 --- a/.npmignore +++ b/.npmignore @@ -4,6 +4,7 @@ build/** .npmrc .npmignore .gitignore +.Wrench CONTRIBUTING.md CONTRIBUTING.md.meta QAReport.md From 92c54316c41c6a614d30abacac25f6a485e38021 Mon Sep 17 00:00:00 2001 From: chuanxin <> Date: Tue, 4 Mar 2025 14:33:39 +0800 Subject: [PATCH 6/6] -Move tests to .tests --- .Wrench/Settings/TilemapExtrasSettings.cs | 32 +++++++++++----- .npmignore | 1 + .yamato/wrench/package-pack-jobs.yml | 46 ++++++++++++++++++++--- .yamato/wrench/wrench_config.json | 33 ++++++++++++---- 4 files changed, 91 insertions(+), 21 deletions(-) diff --git a/.Wrench/Settings/TilemapExtrasSettings.cs b/.Wrench/Settings/TilemapExtrasSettings.cs index 9027548..38ddc8e 100644 --- a/.Wrench/Settings/TilemapExtrasSettings.cs +++ b/.Wrench/Settings/TilemapExtrasSettings.cs @@ -8,7 +8,7 @@ namespace TilemapExtras.Cookbook.Settings; public class TilemapExtrasSettings : AnnotatedSettingsBase { // Path from the root of the repository where packages are located. - readonly string[] PackagesRootPaths = {"."}; + readonly string[] PackagesRootPaths = {".", ".tests/Packages/com.unity.2d.tilemap.extras.tests"}; // update this to list all packages in this repo that you want to release. Dictionary PackageOptions = new() @@ -21,18 +21,32 @@ public class TilemapExtrasSettings : AnnotatedSettingsBase { PrePackCommands = new List() { - new Command("git clone $UNITY_2D_REPO_GIT --no-checkout ../.unity/2d"), - new Command("cd ../.unity/2d && git fetch origin $GIT_BRANCH"), - new Command("cd ../.unity/2d && rm -f .git/index.lock"), - new Command("cd ../.unity/2d && git checkout -f --detach FETCH_HEAD"), - new Command("upm-ci package pack --package-path ../.unity/2d/Packages/com.unity.2d.tilemap.extras.tests"), - new Command("cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras.tests_packages.json"), - new Command("rm upm-ci~/packages/packages.json"), + new Command("git clone $UNITY_2D_REPO_GIT --no-checkout .tests"), + new Command("cd .tests && git fetch origin $GIT_BRANCH"), + new Command("cd .tests && rm -f .git/index.lock"), + new Command("cd .tests && git checkout -f --detach FETCH_HEAD"), }, }, ReleaseOptions = new ReleaseOptions() { IsReleasing = true } } - } + }, + { + "com.unity.2d.tilemap.extras.tests", + new PackageOptions() + { + PackJobOptions = new PackJobOptions() + { + PrePackCommands = new List() + { + new Command("git clone $UNITY_2D_REPO_GIT --no-checkout .tests"), + new Command("cd .tests && git fetch origin $GIT_BRANCH"), + new Command("cd .tests && rm -f .git/index.lock"), + new Command("cd .tests && git checkout -f --detach FETCH_HEAD"), + }, + }, + ReleaseOptions = new ReleaseOptions() { IsReleasing = false, NeverPublish = true } + } + }, }; public TilemapExtrasSettings() diff --git a/.npmignore b/.npmignore index e44f096..00f6188 100644 --- a/.npmignore +++ b/.npmignore @@ -5,6 +5,7 @@ build/** .npmignore .gitignore .Wrench +.tests CONTRIBUTING.md CONTRIBUTING.md.meta QAReport.md diff --git a/.yamato/wrench/package-pack-jobs.yml b/.yamato/wrench/package-pack-jobs.yml index 3b09fde..74ffee2 100644 --- a/.yamato/wrench/package-pack-jobs.yml +++ b/.yamato/wrench/package-pack-jobs.yml @@ -12,15 +12,51 @@ package_pack_-_2d_tilemap_extras: - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm timeout: 20 retries: 10 - - command: git clone $UNITY_2D_REPO_GIT --no-checkout ../.unity/2d - - command: cd ../.unity/2d && git fetch origin $GIT_BRANCH - - command: cd ../.unity/2d && rm -f .git/index.lock - - command: cd ../.unity/2d && git checkout -f --detach FETCH_HEAD - - command: upm-ci package pack --package-path ../.unity/2d/Packages/com.unity.2d.tilemap.extras.tests + - command: git clone $UNITY_2D_REPO_GIT --no-checkout .tests + - command: cd .tests && git fetch origin $GIT_BRANCH + - command: cd .tests && rm -f .git/index.lock + - command: cd .tests && git checkout -f --detach FETCH_HEAD + - command: upm-ci package pack --package-path .tests/Packages/com.unity.2d.tilemap.extras.tests - command: cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras.tests_packages.json - command: rm upm-ci~/packages/packages.json + - command: mkdir -p upm-ci~/temp/packages + - command: mv upm-ci~/packages/* upm-ci~/temp/packages - command: upm-ci package pack --package-path . - command: cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras_packages.json + - command: mv upm-ci~/temp/packages/* upm-ci~/packages + - command: curl https://artifactory.prd.it.unity3d.com/artifactory/stevedore-unity-internal/wrench-localapv/1-2-58_ab06748e39f9b01f55b979c0c06d7c1f787e07cbca4dc6ae5eef274fd195612a.zip -o wrench-localapv.zip + - command: 7z x -aoa wrench-localapv.zip + - command: pip install semver requests --index-url https://artifactory-slo.bf.unity3d.com/artifactory/api/pypi/pypi/simple + - command: python PythonScripts/PackageJsonCondersor.py + after: + - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh + artifacts: + packages: + paths: + - upm-ci~/packages/**/* + variables: + UPMCI_ACK_LARGE_PACKAGE: 1 + metadata: + Job Maintainers: '#rm-packageworks' + Wrench: 0.10.42.0 + +# Pack 2D Tilemap Extras Tests +package_pack_-_2d_tilemap_extras_tests: + name: Package Pack - 2d.tilemap.extras.tests + agent: + image: package-ci/ubuntu-20.04:default + type: Unity::VM + flavor: b1.large + commands: + - command: npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm + timeout: 20 + retries: 10 + - command: git clone $UNITY_2D_REPO_GIT --no-checkout .tests + - command: cd .tests && git fetch origin $GIT_BRANCH + - command: cd .tests && rm -f .git/index.lock + - command: cd .tests && git checkout -f --detach FETCH_HEAD + - command: upm-ci package pack --package-path .tests/Packages/com.unity.2d.tilemap.extras.tests + - command: cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras.tests_packages.json after: - command: bash .yamato/generated-scripts/infrastructure-instability-detection-linux.sh artifacts: diff --git a/.yamato/wrench/wrench_config.json b/.yamato/wrench/wrench_config.json index 74ecb99..cc4fe91 100644 --- a/.yamato/wrench/wrench_config.json +++ b/.yamato/wrench/wrench_config.json @@ -4,13 +4,10 @@ "com.unity.2d.tilemap.extras": { "directory": "./", "prePackCommands": [ - "git clone $UNITY_2D_REPO_GIT --no-checkout ../.unity/2d", - "cd ../.unity/2d && git fetch origin $GIT_BRANCH", - "cd ../.unity/2d && rm -f .git/index.lock", - "cd ../.unity/2d && git checkout -f --detach FETCH_HEAD", - "upm-ci package pack --package-path ../.unity/2d/Packages/com.unity.2d.tilemap.extras.tests", - "cp upm-ci~/packages/packages.json upm-ci~/packages/com.unity.2d.tilemap.extras.tests_packages.json", - "rm upm-ci~/packages/packages.json" + "git clone $UNITY_2D_REPO_GIT --no-checkout .tests", + "cd .tests && git fetch origin $GIT_BRANCH", + "cd .tests && rm -f .git/index.lock", + "cd .tests && git checkout -f --detach FETCH_HEAD" ], "preTestCommands": { "MacOS": [], @@ -25,6 +22,28 @@ "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:ASSEMBLY_NAME;pathReplacePatterns:@*,,**/PackageCache/,;sourcePaths:YAMATO_SOURCE_DIR/Packages;" ], "dependantsToIgnoreInPreviewApv": {} + }, + "com.unity.2d.tilemap.extras.tests": { + "directory": ".tests/Packages/com.unity.2d.tilemap.extras.tests/", + "prePackCommands": [ + "git clone $UNITY_2D_REPO_GIT --no-checkout .tests", + "cd .tests && git fetch origin $GIT_BRANCH", + "cd .tests && rm -f .git/index.lock", + "cd .tests && git checkout -f --detach FETCH_HEAD" + ], + "preTestCommands": { + "MacOS": [], + "Ubuntu": [], + "Windows": [] + }, + "InternalOnly": false, + "NeverPublish": true, + "MaxEditorVersion": "", + "coverageEnabled": false, + "coverageCommands": [ + "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:ASSEMBLY_NAME;pathReplacePatterns:@*,,**/PackageCache/,;sourcePaths:YAMATO_SOURCE_DIR/Packages;" + ], + "dependantsToIgnoreInPreviewApv": {} } }, "releasing_packages": [