From 3ffe9f1fbef326803a19c7d26f115485d4fbae04 Mon Sep 17 00:00:00 2001
From: harry1o7 <harig08@icloud.com>
Date: Sat, 4 Mar 2023 23:12:12 -0500
Subject: [PATCH 01/10] Imported all stick changes from local files

---
 .../Plugins/OnScreen/OnScreenStick.cs         | 143 ++++++++++++++----
 1 file changed, 113 insertions(+), 30 deletions(-)

diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs
index 978931a15a..66af8be970 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs
@@ -118,15 +118,32 @@ private void Start()
             m_PointerDownPos = m_StartPos;
 
             var dynamicOrigin = new GameObject(kDynamicOriginClickable, typeof(Image));
-            dynamicOrigin.transform.SetParent(transform);
-            var image = dynamicOrigin.GetComponent<Image>();
-            image.color = new Color(1, 1, 1, 0);
+            print(dynamicOrigin.transform.localScale);
+            var image = dynamicOrigin.GetComponent<Image>();;
             var rectTransform = (RectTransform)dynamicOrigin.transform;
-            rectTransform.sizeDelta = new Vector2(m_DynamicOriginRange * 2, m_DynamicOriginRange * 2);
-            rectTransform.localScale = new Vector3(1, 1, 0);
-            rectTransform.anchoredPosition3D = Vector3.zero;
-
-            image.sprite = SpriteUtilities.CreateCircleSprite(16, new Color32(255, 255, 255, 255));
+            image.color = new Color(1, 1, 1, 0);
+            if (m_OriginType == OriginType.Circle)
+            {
+                rectTransform.SetParent(transform); 
+                rectTransform.sizeDelta = new Vector2(m_dynamicOriginRange * 2, m_dynamicOriginRange * 2);
+                rectTransform.localScale = new Vector3(1, 1, 0);
+                image.sprite = SpriteUtilities.CreateCircleSprite(16, new Color32(255, 255, 255, 255));
+                rectTransform.anchoredPosition3D = Vector3.zero;
+            }
+            else 
+            {
+                // Use a 1x1 square sprite and align the width, height, and position of the dynamic origin's RectTransform.
+                Texture2D spriteTexture = new Texture2D(1,1);
+                image.sprite = Sprite.Create(spriteTexture,new Rect(0,0,1,1),new Vector2(0.5f,0.5f));
+                rectTransform.SetParent(originTransfrom.gameObject.transform.parent, false);
+                rectTransform.anchorMin = originTransfrom.anchorMin;
+                rectTransform.anchorMax = originTransfrom.anchorMax;
+                rectTransform.anchoredPosition = originTransfrom.anchoredPosition;
+                rectTransform.sizeDelta = originTransfrom.sizeDelta;
+                print(rectTransform.sizeDelta);
+                rectTransform.SetParent(transform); 
+ 
+            }
             image.alphaHitTestMinimumThreshold = 0.5f;
         }
 
@@ -137,6 +154,7 @@ private void BeginInteraction(Vector2 pointerPosition, Camera uiCamera)
             {
                 Debug.LogError("OnScreenStick needs to be attached as a child to a UI Canvas to function properly.");
                 return;
+                
             }
 
             switch (m_Behaviour)
@@ -150,7 +168,7 @@ private void BeginInteraction(Vector2 pointerPosition, Camera uiCamera)
                     break;
                 case Behaviour.ExactPositionWithDynamicOrigin:
                     RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRect, pointerPosition, uiCamera, out var pointerDown);
-                    m_PointerDownPos = ((RectTransform)transform).anchoredPosition = pointerDown;
+                        m_PointerDownPos = ((RectTransform)transform).anchoredPosition = pointerDown;
                     break;
             }
         }
@@ -202,7 +220,7 @@ private void OnPointerDown(InputAction.CallbackContext ctx)
             var screenPosition = Vector2.zero;
             if (ctx.control?.device is Pointer pointer)
                 screenPosition = pointer.position.ReadValue();
-
+            
             m_PointerEventData.position = screenPosition;
             EventSystem.current.RaycastAll(m_PointerEventData, m_RaycastResults);
             if (m_RaycastResults.Count == 0)
@@ -212,7 +230,7 @@ private void OnPointerDown(InputAction.CallbackContext ctx)
             foreach (var result in m_RaycastResults)
             {
                 if (result.gameObject != gameObject) continue;
-
+                
                 stickSelected = true;
                 break;
             }
@@ -270,7 +288,7 @@ private void OnDrawGizmosSelected()
             if (m_Behaviour != Behaviour.ExactPositionWithDynamicOrigin) return;
 
             Gizmos.color = new Color32(158, 84, 219, 255);
-            DrawGizmoCircle(startPos, m_DynamicOriginRange);
+            DrawGizmoCircle(startPos, m_dynamicOriginRange);
         }
 
         private void DrawGizmoCircle(Vector2 center, float radius)
@@ -291,7 +309,7 @@ private void UpdateDynamicOriginClickableArea()
             if (dynamicOriginTransform)
             {
                 var rectTransform = (RectTransform)dynamicOriginTransform;
-                rectTransform.sizeDelta = new Vector2(m_DynamicOriginRange * 2, m_DynamicOriginRange * 2);
+                rectTransform.sizeDelta = new Vector2(m_dynamicOriginRange * 2, m_dynamicOriginRange * 2);
             }
         }
 
@@ -311,21 +329,29 @@ public float movementRange
         /// This only applies if <see cref="behaviour"/> is set to <see cref="Behaviour.ExactPositionWithDynamicOrigin"/>.
         /// When the first press is within this region, then the control will appear at that position and have it's origin of motion placed there.
         /// Otherwise, if pressed outside of this region the control will ignore it.
-        /// This property defines the radius of the circular region. The center point being defined by the component position in the scene.
+        /// This property defines the radius of the circular region. The center point being defined by the pivot of the parent's RectTransform in the scene.
         /// </remarks>
         public float dynamicOriginRange
         {
-            get => m_DynamicOriginRange;
+            get => m_dynamicOriginRange;
             set
             {
                 // ReSharper disable once CompareOfFloatsByEqualityOperator
-                if (m_DynamicOriginRange != value)
+                if (m_dynamicOriginRange != value)
                 {
-                    m_DynamicOriginRange = value;
+                    m_dynamicOriginRange = value;
                     UpdateDynamicOriginClickableArea();
                 }
             }
         }
+        /// <summary>
+        /// 
+        /// </summary>
+        public RectTransform originTransfrom
+        {
+            get => m_originTransform;
+            set => m_originTransform = value;
+        }
 
         /// <summary>
         /// Prevents stick interactions from getting cancelled due to device switching.
@@ -357,7 +383,10 @@ public bool useIsolatedInputActions
         [SerializeField]
         [Tooltip("Defines the circular region where the onscreen control may have it's origin placed.")]
         [Min(0)]
-        private float m_DynamicOriginRange = 100;
+        private float m_dynamicOriginRange = 100;
+        [SerializeField]
+        [Tooltip("Alternate dynamic origin Collider2D. Anything inside the Collider2D will be an area where you can place the joystick's origin,.")]
+        private RectTransform m_originTransform;
 
         [InputControl(layout = "Vector2")]
         [SerializeField]
@@ -372,12 +401,16 @@ public bool useIsolatedInputActions
             "ExactPositionWithDynamicOrigin: The control's center of origin is determined by the initial press position. " +
             "The stick will begin un-actuated at this center position and then track the current pointer or finger position.")]
         private Behaviour m_Behaviour;
+        [SerializeField]
+        [Tooltip("Choose which origin shape you want to use for the stick.\n\n" +
+                "Circle: Define the radius of the circle around the pivot.\n\n" + 
+                "Rect Transform: Attach a GameObject with a BoxCollider2D. The joystick will begin from anywhere in the collider.")]
+        private OriginType m_OriginType;
 
         [SerializeField]
         [Tooltip("Set this to true to prevent cancellation of pointer events due to device switching. Cancellation " +
             "will appear as the stick jumping back and forth between the pointer position and the stick center.")]
         private bool m_UseIsolatedInputActions;
-
         [SerializeField]
         [Tooltip("The action that will be used to detect pointer down events on the stick control. Note that if no bindings " +
             "are set, default ones will be provided.")]
@@ -401,7 +434,22 @@ protected override string controlPathInternal
             get => m_ControlPath;
             set => m_ControlPath = value;
         }
-
+        public OriginType originType
+        {
+            get => m_OriginType;
+            set => m_OriginType = value;
+        }
+        public enum OriginType
+        {
+            /// <summary>
+            /// Circle: Define the radius of the circle around the pivot.
+            /// </summary>
+            Circle,
+            /// <summary>
+            /// Rect Transform: Attach a GameObject with a BoxCollider2D. The joystick will begin from anywhere in the collider.
+            /// </summary>
+            RectTransform
+        }
         /// <summary>Defines how the onscreen stick will move relative to it's origin and the press position.</summary>
         public Behaviour behaviour
         {
@@ -429,28 +477,36 @@ public enum Behaviour
         [CustomEditor(typeof(OnScreenStick))]
         internal class OnScreenStickEditor : UnityEditor.Editor
         {
-            private AnimBool m_ShowDynamicOriginOptions;
+            private AnimBool m_ShowDynamicOriginDropdown;
             private AnimBool m_ShowIsolatedInputActions;
+            private AnimBool m_ShowDynamicBoxOrigin;
+            private AnimBool m_ShowDynamicCircleOrigin;
 
             private SerializedProperty m_UseIsolatedInputActions;
             private SerializedProperty m_Behaviour;
+            private SerializedProperty m_OriginType;
             private SerializedProperty m_ControlPathInternal;
             private SerializedProperty m_MovementRange;
-            private SerializedProperty m_DynamicOriginRange;
+            private SerializedProperty m_dynamicOriginRange;
+            private SerializedProperty m_originTransform;
             private SerializedProperty m_PointerDownAction;
             private SerializedProperty m_PointerMoveAction;
 
             public void OnEnable()
             {
-                m_ShowDynamicOriginOptions = new AnimBool(false);
+                m_ShowDynamicOriginDropdown = new AnimBool(false);
+                m_ShowDynamicBoxOrigin = new AnimBool(false);
+                m_ShowDynamicCircleOrigin = new AnimBool(false);
                 m_ShowIsolatedInputActions = new AnimBool(false);
 
                 m_UseIsolatedInputActions = serializedObject.FindProperty(nameof(OnScreenStick.m_UseIsolatedInputActions));
 
                 m_Behaviour = serializedObject.FindProperty(nameof(OnScreenStick.m_Behaviour));
+                m_OriginType = serializedObject.FindProperty(nameof(OnScreenStick.m_OriginType));
                 m_ControlPathInternal = serializedObject.FindProperty(nameof(OnScreenStick.m_ControlPath));
                 m_MovementRange = serializedObject.FindProperty(nameof(OnScreenStick.m_MovementRange));
-                m_DynamicOriginRange = serializedObject.FindProperty(nameof(OnScreenStick.m_DynamicOriginRange));
+                m_dynamicOriginRange = serializedObject.FindProperty(nameof(OnScreenStick.m_dynamicOriginRange));
+                m_originTransform = serializedObject.FindProperty(nameof(OnScreenStick.m_originTransform));
                 m_PointerDownAction = serializedObject.FindProperty(nameof(OnScreenStick.m_PointerDownAction));
                 m_PointerMoveAction = serializedObject.FindProperty(nameof(OnScreenStick.m_PointerMoveAction));
             }
@@ -461,17 +517,44 @@ public override void OnInspectorGUI()
                 EditorGUILayout.PropertyField(m_ControlPathInternal);
                 EditorGUILayout.PropertyField(m_Behaviour);
 
-                m_ShowDynamicOriginOptions.target = ((OnScreenStick)target).behaviour ==
+                m_ShowDynamicOriginDropdown.target = ((OnScreenStick)target).behaviour ==
                     Behaviour.ExactPositionWithDynamicOrigin;
-                if (EditorGUILayout.BeginFadeGroup(m_ShowDynamicOriginOptions.faded))
+
+                m_ShowDynamicBoxOrigin.target = ((OnScreenStick)target).originType ==
+                OriginType.RectTransform;
+
+                m_ShowDynamicCircleOrigin.target = ((OnScreenStick)target).originType ==
+                OriginType.Circle;
+
+                if (EditorGUILayout.BeginFadeGroup(m_ShowDynamicOriginDropdown.faded))
                 {
                     EditorGUI.indentLevel++;
-                    EditorGUI.BeginChangeCheck();
-                    EditorGUILayout.PropertyField(m_DynamicOriginRange);
-                    if (EditorGUI.EndChangeCheck())
+                    EditorGUILayout.PropertyField(m_OriginType);
+                    if (EditorGUILayout.BeginFadeGroup(m_ShowDynamicBoxOrigin.faded))
+                    {
+                        
+                        EditorGUI.indentLevel++;
+                        EditorGUI.BeginChangeCheck();
+                        EditorGUILayout.PropertyField(m_originTransform);
+                        if (EditorGUI.EndChangeCheck())
+                        {
+                            ((OnScreenStick)target).UpdateDynamicOriginClickableArea();
+                        }
+                        EditorGUI.indentLevel--;
+                    }
+                    EditorGUILayout.EndFadeGroup();
+                    if (EditorGUILayout.BeginFadeGroup(m_ShowDynamicCircleOrigin.faded))
                     {
-                        ((OnScreenStick)target).UpdateDynamicOriginClickableArea();
+                        EditorGUI.indentLevel++;
+                        EditorGUI.BeginChangeCheck();
+                        EditorGUILayout.PropertyField(m_dynamicOriginRange);
+                        if (EditorGUI.EndChangeCheck())
+                        {
+                            ((OnScreenStick)target).UpdateDynamicOriginClickableArea();
+                        }
+                        EditorGUI.indentLevel--;
                     }
+                    EditorGUILayout.EndFadeGroup();
                     EditorGUI.indentLevel--;
                 }
                 EditorGUILayout.EndFadeGroup();

From ec9f006465e939794ea78acc4f9de8673a0d4f1d Mon Sep 17 00:00:00 2001
From: Hari G <50050517+harry1o7@users.noreply.github.com>
Date: Sat, 4 Mar 2023 23:39:16 -0500
Subject: [PATCH 02/10] Removed debug messages

---
 .../InputSystem/Plugins/OnScreen/OnScreenStick.cs               | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs
index 66af8be970..2b4f0a19ae 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs
@@ -118,7 +118,6 @@ private void Start()
             m_PointerDownPos = m_StartPos;
 
             var dynamicOrigin = new GameObject(kDynamicOriginClickable, typeof(Image));
-            print(dynamicOrigin.transform.localScale);
             var image = dynamicOrigin.GetComponent<Image>();;
             var rectTransform = (RectTransform)dynamicOrigin.transform;
             image.color = new Color(1, 1, 1, 0);
@@ -140,7 +139,6 @@ private void Start()
                 rectTransform.anchorMax = originTransfrom.anchorMax;
                 rectTransform.anchoredPosition = originTransfrom.anchoredPosition;
                 rectTransform.sizeDelta = originTransfrom.sizeDelta;
-                print(rectTransform.sizeDelta);
                 rectTransform.SetParent(transform); 
  
             }

From 352cb7eb058e46442b5b8e9e09eafe10349359dd Mon Sep 17 00:00:00 2001
From: Hari G <50050517+harry1o7@users.noreply.github.com>
Date: Sun, 5 Mar 2023 00:05:00 -0500
Subject: [PATCH 03/10] Circle gizmo only drawn when selected

---
 .../Plugins/OnScreen/OnScreenStick.cs         | 26 ++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs
index 2b4f0a19ae..7cef83d291 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs
@@ -269,24 +269,26 @@ private Camera GetCameraFromCanvas()
 
         private void OnDrawGizmosSelected()
         {
-            Gizmos.matrix = ((RectTransform)transform.parent).localToWorldMatrix;
+            if (m_OriginType == OriginType.Circle) {
+                Gizmos.matrix = ((RectTransform)transform.parent).localToWorldMatrix;
 
-            var startPos = ((RectTransform)transform).anchoredPosition;
-            if (Application.isPlaying)
-                startPos = m_StartPos;
+                var startPos = ((RectTransform)transform).anchoredPosition;
+                if (Application.isPlaying)
+                    startPos = m_StartPos;
 
-            Gizmos.color = new Color32(84, 173, 219, 255);
+                Gizmos.color = new Color32(84, 173, 219, 255);
 
-            var center = startPos;
-            if (Application.isPlaying && m_Behaviour == Behaviour.ExactPositionWithDynamicOrigin)
-                center = m_PointerDownPos;
+                var center = startPos;
+                if (Application.isPlaying && m_Behaviour == Behaviour.ExactPositionWithDynamicOrigin)
+                    center = m_PointerDownPos;
 
-            DrawGizmoCircle(center, m_MovementRange);
+                DrawGizmoCircle(center, m_MovementRange);
 
-            if (m_Behaviour != Behaviour.ExactPositionWithDynamicOrigin) return;
+                if (m_Behaviour != Behaviour.ExactPositionWithDynamicOrigin) return;
 
-            Gizmos.color = new Color32(158, 84, 219, 255);
-            DrawGizmoCircle(startPos, m_dynamicOriginRange);
+                Gizmos.color = new Color32(158, 84, 219, 255);
+                DrawGizmoCircle(startPos, m_dynamicOriginRange);
+            }
         }
 
         private void DrawGizmoCircle(Vector2 center, float radius)

From 8103ab6d2663070a6e7a0448b16309aa983d598a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Freire?= <joao.freire@unity3d.com>
Date: Tue, 7 Mar 2023 15:43:58 +0100
Subject: [PATCH 04/10] Test Yamato on Merge Queue

---
 .yamato/analyze.yml         |  54 ++--
 .yamato/format.yml          |   1 +
 .yamato/promotion.yml       |  48 ++--
 .yamato/publish-samples.yml |  36 +--
 .yamato/sonarqube.yml       |  76 +++---
 .yamato/test-samples.yml    |  50 ++--
 .yamato/upm-ci.yml          | 504 ++++++++++++++++++------------------
 7 files changed, 385 insertions(+), 384 deletions(-)

diff --git a/.yamato/analyze.yml b/.yamato/analyze.yml
index c84734f60a..cb0690db53 100644
--- a/.yamato/analyze.yml
+++ b/.yamato/analyze.yml
@@ -1,27 +1,27 @@
-{% metadata_file .yamato/config.metadata %}
----
-
-code_analyser:
-  name : Code Analyzer
-  agent:
-    type: Unity::VM::osx
-    image: package-ci/macos-12:default
-    flavor: m1.mac
-  commands:
-    - git submodule update --init
-    - mkdir Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers
-    - curl -L https://www.nuget.org/api/v2/package/Microsoft.CodeQuality.Analyzers/2.9.2 -o Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.zip
-    - unzip Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.zip -d Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers
-    - {{ upm_ci_install }}
-    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-    - upm-ci project test --project-path Tools/CodeAnalyzerTestProject -u 2019.4
-  triggers:
-    cancel_old_ci: true
-    pull_requests:
-      - targets:
-          only:
-            - "develop"
-  artifacts:
-    UTR_Output.zip:
-      paths:
-        - "upm-ci~/test-results/**/*"
+#{% metadata_file .yamato/config.metadata %}
+#---
+#
+#code_analyser:
+#  name : Code Analyzer
+#  agent:
+#    type: Unity::VM::osx
+#    image: package-ci/macos-12:default
+#    flavor: m1.mac
+#  commands:
+#    - git submodule update --init
+#    - mkdir Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers
+#    - curl -L https://www.nuget.org/api/v2/package/Microsoft.CodeQuality.Analyzers/2.9.2 -o Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.zip
+#    - unzip Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.zip -d Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers
+#    - {{ upm_ci_install }}
+#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+#    - upm-ci project test --project-path Tools/CodeAnalyzerTestProject -u 2019.4
+#  triggers:
+#    cancel_old_ci: true
+#    pull_requests:
+#      - targets:
+#          only:
+#            - "develop"
+#  artifacts:
+#    UTR_Output.zip:
+#      paths:
+#        - "upm-ci~/test-results/**/*"
diff --git a/.yamato/format.yml b/.yamato/format.yml
index 787c78a64d..abaffd62a8 100644
--- a/.yamato/format.yml
+++ b/.yamato/format.yml
@@ -16,3 +16,4 @@ check_formatting:
       - targets:
           only:
             - "develop"
+            - "gh-readonly-queue/{base_branch}"
diff --git a/.yamato/promotion.yml b/.yamato/promotion.yml
index 82f8693c2b..5a9581602e 100644
--- a/.yamato/promotion.yml
+++ b/.yamato/promotion.yml
@@ -1,24 +1,24 @@
-{% metadata_file .yamato/config.metadata %}
----
-
-promote:
-  name: Promote to Production
-  agent:
-    type: Unity::VM
-    image: package-ci/win10:default
-    flavor: b1.large
-  dependencies:
-    - .yamato/publish-samples.yml 
-  variables:
-    UPMCI_PROMOTION: 1
-  commands:
-    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
-    - xcopy /Y /H .\Assets\Samples.meta .\Packages\com.unity.inputsystem
-    - del /AH .\Assets\Samples.meta
-    - {{ upm_ci_install }}
-    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-    - upm-ci package promote --package-path ./Packages/com.unity.inputsystem/
-  artifacts:
-    artifacts:
-      paths:
-        - "upm-ci~/**/*"
+#{% metadata_file .yamato/config.metadata %}
+#---
+#
+#promote:
+#  name: Promote to Production
+#  agent:
+#    type: Unity::VM
+#    image: package-ci/win10:default
+#    flavor: b1.large
+#  dependencies:
+#    - .yamato/publish-samples.yml 
+#  variables:
+#    UPMCI_PROMOTION: 1
+#  commands:
+#    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
+#    - xcopy /Y /H .\Assets\Samples.meta .\Packages\com.unity.inputsystem
+#    - del /AH .\Assets\Samples.meta
+#    - {{ upm_ci_install }}
+#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+#    - upm-ci package promote --package-path ./Packages/com.unity.inputsystem/
+#  artifacts:
+#    artifacts:
+#      paths:
+#        - "upm-ci~/**/*"
diff --git a/.yamato/publish-samples.yml b/.yamato/publish-samples.yml
index 548feaebcb..ed7c1843d3 100644
--- a/.yamato/publish-samples.yml
+++ b/.yamato/publish-samples.yml
@@ -1,18 +1,18 @@
-{% metadata_file .yamato/config.metadata %}
----
-
-test_sample_projects:
-  name : Publish Sample Projects
-  agent:
-    type: Unity::VM::osx
-    image: package-ci/macos-12:default
-    flavor: m1.mac
-  commands:
-    - {{ upm_ci_install }}
-    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u 2019.4
-    - Editor=.Editor/Unity.app/Contents/MacOS/Unity Method=Publish sh ExternalSampleProjects/publish.sh 
-  artifacts:
-    UTR_Output.zip:
-      paths:
-        - "upm-ci~/**/*"
+#{% metadata_file .yamato/config.metadata %}
+#---
+#
+#test_sample_projects:
+#  name : Publish Sample Projects
+#  agent:
+#    type: Unity::VM::osx
+#    image: package-ci/macos-12:default
+#    flavor: m1.mac
+#  commands:
+#    - {{ upm_ci_install }}
+#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+#    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u 2019.4
+#    - Editor=.Editor/Unity.app/Contents/MacOS/Unity Method=Publish sh ExternalSampleProjects/publish.sh 
+#  artifacts:
+#    UTR_Output.zip:
+#      paths:
+#        - "upm-ci~/**/*"
diff --git a/.yamato/sonarqube.yml b/.yamato/sonarqube.yml
index b18f1ee712..a0ce37d535 100644
--- a/.yamato/sonarqube.yml
+++ b/.yamato/sonarqube.yml
@@ -1,38 +1,38 @@
-# Sonarqube scanner job for the Input System Package
-Windows-Dotnet-SonarScanner:
-  name: Dotnet Sonar Scanner Windows Input System 
-  agent:
-    type: Unity::VM
-    flavor: b1.large
-    image: package-ci/win10-sonar:stable
-  variables:    
-    EDITOR_VERSION: "2021.3"
-    SONAR_HOST_URL: "https://sonar-staging.internal.unity3d.com"
-    SONARQUBE_PROJECT_NAME: "SonarProject"
-    SONAR_PROJECT_KEY: "input:com.unity.inputsystem"    
-    RIDER_VERSION: "3.0.12"    
-  commands:    
-    - |
-      cd %YAMATO_WORK_DIR%
-      unity-downloader-cli -u %EDITOR_VERSION% -c Editor --fast --wait
-    - |
-      unity-config project create %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%
-      unity-config settings project-path %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%
-      unity-config project add dependency com.unity.ide.rider@%RIDER_VERSION%
-      move %YAMATO_SOURCE_DIR%\Packages\com.unity.inputsystem %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Packages\com.unity.inputsystem      
-    - start /W %YAMATO_WORK_DIR%\.Editor\Unity.exe -projectPath %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME% -batchmode -quit -nographics -logFile %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Editor.log -executeMethod "Packages.Rider.Editor.RiderScriptEditor.SyncSolution"
-    - |
-      # If not triggered by a PR pass branch name, otherwise PR parameters
-      IF "%YAMATO_PR_ID%" == "" ( set SONAR_ANALYSIS_TYPE_PARAM=/d:sonar.branch.name=%GIT_BRANCH% ) ELSE ( set SONAR_ANALYSIS_TYPE_PARAM=/d:sonar.pullrequest.key=%YAMATO_PR_ID% /d:sonar.pullrequest.branch=%GIT_BRANCH% /d:sonar.pullrequest.base=%YAMATO_PR_TARGET_BRANCH% )
-      cmd /v /s /c "dotnet sonarscanner begin /k:"%SONAR_PROJECT_KEY%" /d:sonar.login=!SONAR_TOKEN_STAGING! /d:sonar.host.url=%SONAR_HOST_URL% /d:sonar.projectBaseDir=%YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Packages\com.unity.inputsystem /d:sonar.sourceEncoding="UTF-8" %SONAR_ANALYSIS_TYPE_PARAM% /d:sonar.scm.provider=git /d:sonar.log.level=DEBUG /d:sonar.verbose=true /d:sonar.qualitygate.wait=true"
-      dotnet build %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\%SONARQUBE_PROJECT_NAME%.sln /t:Rebuild /p:SonarQubeTestProject=false
-      cmd /v /s /c "dotnet sonarscanner end /d:sonar.login=!SONAR_TOKEN_STAGING!"      
-  artifacts:
-    logs:
-      paths:
-        - "**/*.log"
-  triggers:
-    pull_requests:
-      - targets:
-          only:
-            - "develop"
\ No newline at end of file
+## Sonarqube scanner job for the Input System Package
+#Windows-Dotnet-SonarScanner:
+#  name: Dotnet Sonar Scanner Windows Input System 
+#  agent:
+#    type: Unity::VM
+#    flavor: b1.large
+#    image: package-ci/win10-sonar:stable
+#  variables:    
+#    EDITOR_VERSION: "2021.3"
+#    SONAR_HOST_URL: "https://sonar-staging.internal.unity3d.com"
+#    SONARQUBE_PROJECT_NAME: "SonarProject"
+#    SONAR_PROJECT_KEY: "input:com.unity.inputsystem"    
+#    RIDER_VERSION: "3.0.12"    
+#  commands:    
+#    - |
+#      cd %YAMATO_WORK_DIR%
+#      unity-downloader-cli -u %EDITOR_VERSION% -c Editor --fast --wait
+#    - |
+#      unity-config project create %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%
+#      unity-config settings project-path %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%
+#      unity-config project add dependency com.unity.ide.rider@%RIDER_VERSION%
+#      move %YAMATO_SOURCE_DIR%\Packages\com.unity.inputsystem %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Packages\com.unity.inputsystem      
+#    - start /W %YAMATO_WORK_DIR%\.Editor\Unity.exe -projectPath %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME% -batchmode -quit -nographics -logFile %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Editor.log -executeMethod "Packages.Rider.Editor.RiderScriptEditor.SyncSolution"
+#    - |
+#      # If not triggered by a PR pass branch name, otherwise PR parameters
+#      IF "%YAMATO_PR_ID%" == "" ( set SONAR_ANALYSIS_TYPE_PARAM=/d:sonar.branch.name=%GIT_BRANCH% ) ELSE ( set SONAR_ANALYSIS_TYPE_PARAM=/d:sonar.pullrequest.key=%YAMATO_PR_ID% /d:sonar.pullrequest.branch=%GIT_BRANCH% /d:sonar.pullrequest.base=%YAMATO_PR_TARGET_BRANCH% )
+#      cmd /v /s /c "dotnet sonarscanner begin /k:"%SONAR_PROJECT_KEY%" /d:sonar.login=!SONAR_TOKEN_STAGING! /d:sonar.host.url=%SONAR_HOST_URL% /d:sonar.projectBaseDir=%YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Packages\com.unity.inputsystem /d:sonar.sourceEncoding="UTF-8" %SONAR_ANALYSIS_TYPE_PARAM% /d:sonar.scm.provider=git /d:sonar.log.level=DEBUG /d:sonar.verbose=true /d:sonar.qualitygate.wait=true"
+#      dotnet build %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\%SONARQUBE_PROJECT_NAME%.sln /t:Rebuild /p:SonarQubeTestProject=false
+#      cmd /v /s /c "dotnet sonarscanner end /d:sonar.login=!SONAR_TOKEN_STAGING!"      
+#  artifacts:
+#    logs:
+#      paths:
+#        - "**/*.log"
+#  triggers:
+#    pull_requests:
+#      - targets:
+#          only:
+#            - "develop"
\ No newline at end of file
diff --git a/.yamato/test-samples.yml b/.yamato/test-samples.yml
index 1cd750482d..4f564a3dab 100644
--- a/.yamato/test-samples.yml
+++ b/.yamato/test-samples.yml
@@ -1,25 +1,25 @@
-{% metadata_file .yamato/config.metadata %}
----
-{% for editor in editors %}
-test_sample_projects_{{ editor.version }}:
-  name : Test Sample Projects {{ editor.version }}
-  agent:
-    type: Unity::VM::osx
-    image: package-ci/macos-12:default
-    flavor: m1.mac
-  commands:
-    - {{ upm_ci_install }}
-    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
-    - Editor=.Editor/Unity.app/Contents/MacOS/Unity Method=DryRun sh ExternalSampleProjects/publish.sh 
-  triggers:
-    cancel_old_ci: true
-    pull_requests:
-      - targets:
-          only:
-            - "develop"
-  artifacts:
-    UTR_Output.zip:
-      paths:
-        - "upm-ci~/**/*"
-{% endfor %}
\ No newline at end of file
+#{% metadata_file .yamato/config.metadata %}
+#---
+#{% for editor in editors %}
+#test_sample_projects_{{ editor.version }}:
+#  name : Test Sample Projects {{ editor.version }}
+#  agent:
+#    type: Unity::VM::osx
+#    image: package-ci/macos-12:default
+#    flavor: m1.mac
+#  commands:
+#    - {{ upm_ci_install }}
+#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+#    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
+#    - Editor=.Editor/Unity.app/Contents/MacOS/Unity Method=DryRun sh ExternalSampleProjects/publish.sh 
+#  triggers:
+#    cancel_old_ci: true
+#    pull_requests:
+#      - targets:
+#          only:
+#            - "develop"
+#  artifacts:
+#    UTR_Output.zip:
+#      paths:
+#        - "upm-ci~/**/*"
+#{% endfor %}
\ No newline at end of file
diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml
index 1fc7500e53..38e3d18aa2 100644
--- a/.yamato/upm-ci.yml
+++ b/.yamato/upm-ci.yml
@@ -1,252 +1,252 @@
-{% metadata_file .yamato/config.metadata %}
----
-
-{% for editor in editors %}
-{% for platform in platforms_win %}
-{{ platform.name }}_{{ editor.version }}:
-  name : Build and Test version {{ editor.version }} on {{ platform.name }}
-  agent:
-    type: {{ platform.type }}
-    image: {{ platform.image }}
-    flavor: {{ platform.flavor }}
-  commands:
-    - {{ utr_install_win }}
-    - {{ upm_ci_install }}
-    # Get latest version of doctools package. Automatically makes the documentation tests in APIVerification go live.
-    - '%GSUDO% choco install netfx-4.7.1-devpack -y --ignore-detected-reboot --ignore-package-codes'
-    - git clone git@github.cds.internal.unity3d.com:unity/com.unity.package-manager-doctools.git Packages/com.unity.package-manager-doctools
-    # We keep the samples in Assets/ as they otherwise won't get imported and you can't
-    # really work with them. Move them into the package for when we run upm-ci here.
-    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
-    - move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
-    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-    # Run upm-ci verification tests as well as tests contained in the package.
-    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
-    {% if platform.installscript %}
-    - {{ unity_downloader_install }}
-    - {{ platform.installscript }} {{ editor.version }}
-    {% endif %}
-    # ADBv2 on 2019.4 causes the test runner to not start on initial import when the
-    # samples are in the package. Move the samples back into the project.
-    - move /Y .\Packages\com.unity.inputsystem\Samples .\Assets
-    - move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
-    # Now run our full test suite that sits in Assets/Tests by running UTR on our project.
-    - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
-  artifacts:
-    UTR_Output.zip:
-      paths:
-        - "upm-ci~/test-results/**/*"
-{% endfor %}
-{% for platform in platforms_nix %}
-{{ platform.name }}_{{ editor.version }}:
-  name : Build and Test version {{ editor.version }} on {{ platform.name }}
-  agent:
-    type: {{ platform.type }}
-    image: {{ platform.image }}
-    flavor: {{ platform.flavor }}
-  commands:
-    - {{ utr_install_nix }}
-    - {{ upm_ci_install }}
-    # Get latest version of doctools package. Automatically makes the documentation tests in APIVerification go live.
-    - git clone git@github.cds.internal.unity3d.com:unity/com.unity.package-manager-doctools.git Packages/com.unity.package-manager-doctools
-    # We keep the samples in Assets/ as they otherwise won't get imported and you can't
-    # really work with them. Move them into the package for when we run upm-ci here.
-    - mv ./Assets/Samples ./Packages/com.unity.inputsystem
-    - mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem
-    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-    # Run upm-ci verification tests as well as tests contained in the package.
-    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
-    {% if platform.installscript %}
-    - {{ unity_downloader_install }}
-    - {{ platform.installscript }} {{ editor.version }}
-    {% endif %}
-    # ADBv2 on 2019.4 causes the test runner to not start on initial import when the
-    # samples are in the package. Move the samples back into the project.
-    - mv ./Packages/com.unity.inputsystem/Samples ./Assets
-    - mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
-    # Now run our full test suite that sits in Assets/Tests by running UTR on our project.
-    - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
-  artifacts:
-    UTR_Output.zip:
-      paths:
-        - "upm-ci~/test-results/**/*"
-{% endfor %}
-{% endfor %}
-
-{% for editor in editors %}
-build_ios_{{ editor.version }}:
-  name: Build Tests on {{ editor.version }} on ios
-  agent:
-    type: Unity::VM::osx
-    image: package-ci/macos-12:default
-    flavor: b1.large
-  commands:
-    - {{ utr_install_nix }}
-    - {{ unity_downloader_install }}
-    - unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast -w
-    - ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
-  artifacts:
-    players:
-        paths:
-          - "build/players/**"
-    logs:
-        paths:
-          - "build/logs/**"
-
-run_ios_{{ editor.version }}:
-  name: Run Tests on {{ editor.version }} on ios
-  agent:
-      type: Unity::mobile::iPhone
-      image: package-ci/macos-12:default
-      model: SE
-      flavor: b1.medium
-  skip_checkout: true
-  dependencies:
-    - .yamato/upm-ci.yml#build_ios_{{ editor.version }}  
-  commands:
-    - {{ utr_install_nix }}
-    - ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
-  artifacts:
-    logs:
-        paths:
-          - "build/test-results/**"
-
-build_tvos_{{ editor.version }}:
-  name: Build Tests on {{ editor.version }} on tvos
-  agent:
-    type: Unity::VM::osx
-    image: package-ci/macos-12:default
-    flavor: b1.large
-  commands:
-    - {{ utr_install_nix }}
-    - {{ unity_downloader_install }}
-    - unity-downloader-cli -c Editor -c AppleTV -u {{ editor.version }} --fast -w
-    - ./utr --suite=playmode --platform=tvOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
-  artifacts:
-    players:
-        paths:
-          - "build/players/**"
-    logs:
-        paths:
-          - "build/logs/**"
-
-run_tvos_{{ editor.version }}:
-  name: Run Tests on {{ editor.version }} on tvos
-  agent:
-      type: Unity::mobile::appletv
-      image: package-ci/macos-12:default
-      flavor: b1.medium
-  skip_checkout: true
-  dependencies:
-    - .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
-  commands:
-    - {{ utr_install_nix }}
-    - ./utr --suite=playmode --platform=tvOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
-  artifacts:
-    logs:
-        paths:
-          - "build/test-results/**"
-
-{% for backend in scripting_backends %}
-build_android_{{ editor.version }}_{{ backend.name }}:
-  name: Build Tests on {{ editor.version }} on android {{ backend.name }}
-  agent:
-      type: Unity::VM
-      image: package-ci/win10:default
-      flavor: b1.xlarge
-  commands:
-    - {{ utr_install_win }}
-    - {{ unity_downloader_install }}
-    - unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast -w
-    - ./utr --suite=playmode --platform=Android --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend.name }} --build-only --repository --performance-project-id=InputSystem
-  artifacts:
-    players:
-        paths:
-          - "build/players/**"
-    logs:
-        paths:
-          - "build/logs/**"
-
-run_android_{{ editor.version }}_{{ backend.name }}:
-  name: Run Tests on {{ editor.version }} on android {{ backend.name }}
-  agent:
-      type: Unity::mobile::shield
-      image: package-ci/win10:default
-      flavor: b1.medium
-  # Skip repository cloning
-  skip_checkout: true
-  # Set a dependency on the build job
-  dependencies:
-    - .yamato/upm-ci.yml#build_android_{{ editor.version }}_{{ backend.name }}  
-  commands:
-    - {{ utr_install_win }}
-    - |
-       # Set the IP of the device. In case device gets lost, UTR will try to recconect to ANDROID_DEVICE_CONNECTION
-       set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
-       # Establish an ADB connection with the device
-       start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
-       # List the connected devices
-       start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
-       ./utr --suite=playmode --platform=android --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
-  after:
-    - start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
-    - if not exist build\test-results mkdir build\test-results
-    - powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe logcat -d > build/test-results/device_log.txt
-  # Set uploadable artifact paths
-  artifacts:
-    logs:
-      paths:
-        - "build/test-results/**"
-{% endfor %}
-
-{% endfor %}
-
-all_tests:
-  name: All Tests
-  dependencies:
-    {% for editor in editors %}
-    {% for platform in platforms_win %}
-    - .yamato/upm-ci.yml#{{ platform.name }}_{{ editor.version }}
-    {% endfor %}
-    {% for platform in platforms_nix %}
-    - .yamato/upm-ci.yml#{{ platform.name }}_{{ editor.version }}
-    {% endfor %}
-    {% for backend in scripting_backends %}
-    - .yamato/upm-ci.yml#run_android_{{ editor.version }}_{{ backend.name }}
-    {% endfor %}
-    - .yamato/upm-ci.yml#run_ios_{{ editor.version }}
-{% if editor.disable_tvos_run %}
-    - .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
-{% else %}
-    - .yamato/upm-ci.yml#run_tvos_{{ editor.version }}
-{% endif %}
-    {% endfor %}
-    - .yamato/upm-ci.yml#publish_dryrun
-  triggers:
-    cancel_old_ci: true
-    pull_requests:
-      - targets:
-          only:
-            - "develop"
-
-{% for run in (1..2) %}
-publish{% cycle "", "_dryrun" %}:
-  name: Publish to Internal Registry {% cycle "", "(Dry Run)" %}
-  agent:
-    type: Unity::VM
-    image: package-ci/win10:default
-    flavor: b1.large
-  variables:
-    UPMCI_ENABLE_PACKAGE_SIGNING: 1
-  commands:
-    - {{ upm_ci_install }}
-    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
-    - move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
-    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u 2019.4
-    - upm-ci package publish --package-path ./Packages/com.unity.inputsystem/ {% cycle "", "--dry-run" %}
-  artifacts:
-    artifacts:
-      paths:
-        - "upm-ci~/packages/*.tgz"
-{% endfor %}
+#{% metadata_file .yamato/config.metadata %}
+#---
+#
+#{% for editor in editors %}
+#{% for platform in platforms_win %}
+#{{ platform.name }}_{{ editor.version }}:
+#  name : Build and Test version {{ editor.version }} on {{ platform.name }}
+#  agent:
+#    type: {{ platform.type }}
+#    image: {{ platform.image }}
+#    flavor: {{ platform.flavor }}
+#  commands:
+#    - {{ utr_install_win }}
+#    - {{ upm_ci_install }}
+#    # Get latest version of doctools package. Automatically makes the documentation tests in APIVerification go live.
+#    - '%GSUDO% choco install netfx-4.7.1-devpack -y --ignore-detected-reboot --ignore-package-codes'
+#    - git clone git@github.cds.internal.unity3d.com:unity/com.unity.package-manager-doctools.git Packages/com.unity.package-manager-doctools
+#    # We keep the samples in Assets/ as they otherwise won't get imported and you can't
+#    # really work with them. Move them into the package for when we run upm-ci here.
+#    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
+#    - move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
+#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+#    # Run upm-ci verification tests as well as tests contained in the package.
+#    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
+#    {% if platform.installscript %}
+#    - {{ unity_downloader_install }}
+#    - {{ platform.installscript }} {{ editor.version }}
+#    {% endif %}
+#    # ADBv2 on 2019.4 causes the test runner to not start on initial import when the
+#    # samples are in the package. Move the samples back into the project.
+#    - move /Y .\Packages\com.unity.inputsystem\Samples .\Assets
+#    - move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
+#    # Now run our full test suite that sits in Assets/Tests by running UTR on our project.
+#    - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
+#  artifacts:
+#    UTR_Output.zip:
+#      paths:
+#        - "upm-ci~/test-results/**/*"
+#{% endfor %}
+#{% for platform in platforms_nix %}
+#{{ platform.name }}_{{ editor.version }}:
+#  name : Build and Test version {{ editor.version }} on {{ platform.name }}
+#  agent:
+#    type: {{ platform.type }}
+#    image: {{ platform.image }}
+#    flavor: {{ platform.flavor }}
+#  commands:
+#    - {{ utr_install_nix }}
+#    - {{ upm_ci_install }}
+#    # Get latest version of doctools package. Automatically makes the documentation tests in APIVerification go live.
+#    - git clone git@github.cds.internal.unity3d.com:unity/com.unity.package-manager-doctools.git Packages/com.unity.package-manager-doctools
+#    # We keep the samples in Assets/ as they otherwise won't get imported and you can't
+#    # really work with them. Move them into the package for when we run upm-ci here.
+#    - mv ./Assets/Samples ./Packages/com.unity.inputsystem
+#    - mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem
+#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+#    # Run upm-ci verification tests as well as tests contained in the package.
+#    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
+#    {% if platform.installscript %}
+#    - {{ unity_downloader_install }}
+#    - {{ platform.installscript }} {{ editor.version }}
+#    {% endif %}
+#    # ADBv2 on 2019.4 causes the test runner to not start on initial import when the
+#    # samples are in the package. Move the samples back into the project.
+#    - mv ./Packages/com.unity.inputsystem/Samples ./Assets
+#    - mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
+#    # Now run our full test suite that sits in Assets/Tests by running UTR on our project.
+#    - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
+#  artifacts:
+#    UTR_Output.zip:
+#      paths:
+#        - "upm-ci~/test-results/**/*"
+#{% endfor %}
+#{% endfor %}
+#
+#{% for editor in editors %}
+#build_ios_{{ editor.version }}:
+#  name: Build Tests on {{ editor.version }} on ios
+#  agent:
+#    type: Unity::VM::osx
+#    image: package-ci/macos-12:default
+#    flavor: b1.large
+#  commands:
+#    - {{ utr_install_nix }}
+#    - {{ unity_downloader_install }}
+#    - unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast -w
+#    - ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
+#  artifacts:
+#    players:
+#        paths:
+#          - "build/players/**"
+#    logs:
+#        paths:
+#          - "build/logs/**"
+#
+#run_ios_{{ editor.version }}:
+#  name: Run Tests on {{ editor.version }} on ios
+#  agent:
+#      type: Unity::mobile::iPhone
+#      image: package-ci/macos-12:default
+#      model: SE
+#      flavor: b1.medium
+#  skip_checkout: true
+#  dependencies:
+#    - .yamato/upm-ci.yml#build_ios_{{ editor.version }}  
+#  commands:
+#    - {{ utr_install_nix }}
+#    - ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
+#  artifacts:
+#    logs:
+#        paths:
+#          - "build/test-results/**"
+#
+#build_tvos_{{ editor.version }}:
+#  name: Build Tests on {{ editor.version }} on tvos
+#  agent:
+#    type: Unity::VM::osx
+#    image: package-ci/macos-12:default
+#    flavor: b1.large
+#  commands:
+#    - {{ utr_install_nix }}
+#    - {{ unity_downloader_install }}
+#    - unity-downloader-cli -c Editor -c AppleTV -u {{ editor.version }} --fast -w
+#    - ./utr --suite=playmode --platform=tvOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
+#  artifacts:
+#    players:
+#        paths:
+#          - "build/players/**"
+#    logs:
+#        paths:
+#          - "build/logs/**"
+#
+#run_tvos_{{ editor.version }}:
+#  name: Run Tests on {{ editor.version }} on tvos
+#  agent:
+#      type: Unity::mobile::appletv
+#      image: package-ci/macos-12:default
+#      flavor: b1.medium
+#  skip_checkout: true
+#  dependencies:
+#    - .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
+#  commands:
+#    - {{ utr_install_nix }}
+#    - ./utr --suite=playmode --platform=tvOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
+#  artifacts:
+#    logs:
+#        paths:
+#          - "build/test-results/**"
+#
+#{% for backend in scripting_backends %}
+#build_android_{{ editor.version }}_{{ backend.name }}:
+#  name: Build Tests on {{ editor.version }} on android {{ backend.name }}
+#  agent:
+#      type: Unity::VM
+#      image: package-ci/win10:default
+#      flavor: b1.xlarge
+#  commands:
+#    - {{ utr_install_win }}
+#    - {{ unity_downloader_install }}
+#    - unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast -w
+#    - ./utr --suite=playmode --platform=Android --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend.name }} --build-only --repository --performance-project-id=InputSystem
+#  artifacts:
+#    players:
+#        paths:
+#          - "build/players/**"
+#    logs:
+#        paths:
+#          - "build/logs/**"
+#
+#run_android_{{ editor.version }}_{{ backend.name }}:
+#  name: Run Tests on {{ editor.version }} on android {{ backend.name }}
+#  agent:
+#      type: Unity::mobile::shield
+#      image: package-ci/win10:default
+#      flavor: b1.medium
+#  # Skip repository cloning
+#  skip_checkout: true
+#  # Set a dependency on the build job
+#  dependencies:
+#    - .yamato/upm-ci.yml#build_android_{{ editor.version }}_{{ backend.name }}  
+#  commands:
+#    - {{ utr_install_win }}
+#    - |
+#       # Set the IP of the device. In case device gets lost, UTR will try to recconect to ANDROID_DEVICE_CONNECTION
+#       set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
+#       # Establish an ADB connection with the device
+#       start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
+#       # List the connected devices
+#       start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
+#       ./utr --suite=playmode --platform=android --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
+#  after:
+#    - start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
+#    - if not exist build\test-results mkdir build\test-results
+#    - powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe logcat -d > build/test-results/device_log.txt
+#  # Set uploadable artifact paths
+#  artifacts:
+#    logs:
+#      paths:
+#        - "build/test-results/**"
+#{% endfor %}
+#
+#{% endfor %}
+#
+#all_tests:
+#  name: All Tests
+#  dependencies:
+#    {% for editor in editors %}
+#    {% for platform in platforms_win %}
+#    - .yamato/upm-ci.yml#{{ platform.name }}_{{ editor.version }}
+#    {% endfor %}
+#    {% for platform in platforms_nix %}
+#    - .yamato/upm-ci.yml#{{ platform.name }}_{{ editor.version }}
+#    {% endfor %}
+#    {% for backend in scripting_backends %}
+#    - .yamato/upm-ci.yml#run_android_{{ editor.version }}_{{ backend.name }}
+#    {% endfor %}
+#    - .yamato/upm-ci.yml#run_ios_{{ editor.version }}
+#{% if editor.disable_tvos_run %}
+#    - .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
+#{% else %}
+#    - .yamato/upm-ci.yml#run_tvos_{{ editor.version }}
+#{% endif %}
+#    {% endfor %}
+#    - .yamato/upm-ci.yml#publish_dryrun
+#  triggers:
+#    cancel_old_ci: true
+#    pull_requests:
+#      - targets:
+#          only:
+#            - "develop"
+#
+#{% for run in (1..2) %}
+#publish{% cycle "", "_dryrun" %}:
+#  name: Publish to Internal Registry {% cycle "", "(Dry Run)" %}
+#  agent:
+#    type: Unity::VM
+#    image: package-ci/win10:default
+#    flavor: b1.large
+#  variables:
+#    UPMCI_ENABLE_PACKAGE_SIGNING: 1
+#  commands:
+#    - {{ upm_ci_install }}
+#    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
+#    - move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
+#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+#    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u 2019.4
+#    - upm-ci package publish --package-path ./Packages/com.unity.inputsystem/ {% cycle "", "--dry-run" %}
+#  artifacts:
+#    artifacts:
+#      paths:
+#        - "upm-ci~/packages/*.tgz"
+#{% endfor %}

From 2d0177d978ea97ad570723c88f9ff2d6758df77c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Freire?= <joao.freire@unity3d.com>
Date: Tue, 7 Mar 2023 16:04:42 +0100
Subject: [PATCH 05/10] Trigger yamato checks on merge queue branch

---
 .yamato/analyze.yml      |  55 ++---
 .yamato/sonarqube.yml    |  77 +++---
 .yamato/test-samples.yml |  51 ++--
 .yamato/upm-ci.yml       | 505 ++++++++++++++++++++-------------------
 4 files changed, 346 insertions(+), 342 deletions(-)

diff --git a/.yamato/analyze.yml b/.yamato/analyze.yml
index cb0690db53..a9acda8033 100644
--- a/.yamato/analyze.yml
+++ b/.yamato/analyze.yml
@@ -1,27 +1,28 @@
-#{% metadata_file .yamato/config.metadata %}
-#---
-#
-#code_analyser:
-#  name : Code Analyzer
-#  agent:
-#    type: Unity::VM::osx
-#    image: package-ci/macos-12:default
-#    flavor: m1.mac
-#  commands:
-#    - git submodule update --init
-#    - mkdir Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers
-#    - curl -L https://www.nuget.org/api/v2/package/Microsoft.CodeQuality.Analyzers/2.9.2 -o Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.zip
-#    - unzip Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.zip -d Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers
-#    - {{ upm_ci_install }}
-#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-#    - upm-ci project test --project-path Tools/CodeAnalyzerTestProject -u 2019.4
-#  triggers:
-#    cancel_old_ci: true
-#    pull_requests:
-#      - targets:
-#          only:
-#            - "develop"
-#  artifacts:
-#    UTR_Output.zip:
-#      paths:
-#        - "upm-ci~/test-results/**/*"
+{% metadata_file .yamato/config.metadata %}
+---
+
+code_analyser:
+  name : Code Analyzer
+  agent:
+    type: Unity::VM::osx
+    image: package-ci/macos-12:default
+    flavor: m1.mac
+  commands:
+    - git submodule update --init
+    - mkdir Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers
+    - curl -L https://www.nuget.org/api/v2/package/Microsoft.CodeQuality.Analyzers/2.9.2 -o Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.zip
+    - unzip Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.zip -d Tools/CodeAnalyzerTestProject/Microsoft.CodeQuality.Analyzers
+    - {{ upm_ci_install }}
+    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+    - upm-ci project test --project-path Tools/CodeAnalyzerTestProject -u 2019.4
+  triggers:
+    cancel_old_ci: true
+    pull_requests:
+      - targets:
+          only:
+            - "develop"
+            - "gh-readonly-queue/{base_branch}"
+  artifacts:
+    UTR_Output.zip:
+      paths:
+        - "upm-ci~/test-results/**/*"
diff --git a/.yamato/sonarqube.yml b/.yamato/sonarqube.yml
index a0ce37d535..7d3b4b2405 100644
--- a/.yamato/sonarqube.yml
+++ b/.yamato/sonarqube.yml
@@ -1,38 +1,39 @@
-## Sonarqube scanner job for the Input System Package
-#Windows-Dotnet-SonarScanner:
-#  name: Dotnet Sonar Scanner Windows Input System 
-#  agent:
-#    type: Unity::VM
-#    flavor: b1.large
-#    image: package-ci/win10-sonar:stable
-#  variables:    
-#    EDITOR_VERSION: "2021.3"
-#    SONAR_HOST_URL: "https://sonar-staging.internal.unity3d.com"
-#    SONARQUBE_PROJECT_NAME: "SonarProject"
-#    SONAR_PROJECT_KEY: "input:com.unity.inputsystem"    
-#    RIDER_VERSION: "3.0.12"    
-#  commands:    
-#    - |
-#      cd %YAMATO_WORK_DIR%
-#      unity-downloader-cli -u %EDITOR_VERSION% -c Editor --fast --wait
-#    - |
-#      unity-config project create %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%
-#      unity-config settings project-path %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%
-#      unity-config project add dependency com.unity.ide.rider@%RIDER_VERSION%
-#      move %YAMATO_SOURCE_DIR%\Packages\com.unity.inputsystem %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Packages\com.unity.inputsystem      
-#    - start /W %YAMATO_WORK_DIR%\.Editor\Unity.exe -projectPath %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME% -batchmode -quit -nographics -logFile %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Editor.log -executeMethod "Packages.Rider.Editor.RiderScriptEditor.SyncSolution"
-#    - |
-#      # If not triggered by a PR pass branch name, otherwise PR parameters
-#      IF "%YAMATO_PR_ID%" == "" ( set SONAR_ANALYSIS_TYPE_PARAM=/d:sonar.branch.name=%GIT_BRANCH% ) ELSE ( set SONAR_ANALYSIS_TYPE_PARAM=/d:sonar.pullrequest.key=%YAMATO_PR_ID% /d:sonar.pullrequest.branch=%GIT_BRANCH% /d:sonar.pullrequest.base=%YAMATO_PR_TARGET_BRANCH% )
-#      cmd /v /s /c "dotnet sonarscanner begin /k:"%SONAR_PROJECT_KEY%" /d:sonar.login=!SONAR_TOKEN_STAGING! /d:sonar.host.url=%SONAR_HOST_URL% /d:sonar.projectBaseDir=%YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Packages\com.unity.inputsystem /d:sonar.sourceEncoding="UTF-8" %SONAR_ANALYSIS_TYPE_PARAM% /d:sonar.scm.provider=git /d:sonar.log.level=DEBUG /d:sonar.verbose=true /d:sonar.qualitygate.wait=true"
-#      dotnet build %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\%SONARQUBE_PROJECT_NAME%.sln /t:Rebuild /p:SonarQubeTestProject=false
-#      cmd /v /s /c "dotnet sonarscanner end /d:sonar.login=!SONAR_TOKEN_STAGING!"      
-#  artifacts:
-#    logs:
-#      paths:
-#        - "**/*.log"
-#  triggers:
-#    pull_requests:
-#      - targets:
-#          only:
-#            - "develop"
\ No newline at end of file
+# Sonarqube scanner job for the Input System Package
+Windows-Dotnet-SonarScanner:
+  name: Dotnet Sonar Scanner Windows Input System 
+  agent:
+    type: Unity::VM
+    flavor: b1.large
+    image: package-ci/win10-sonar:stable
+  variables:    
+    EDITOR_VERSION: "2021.3"
+    SONAR_HOST_URL: "https://sonar-staging.internal.unity3d.com"
+    SONARQUBE_PROJECT_NAME: "SonarProject"
+    SONAR_PROJECT_KEY: "input:com.unity.inputsystem"    
+    RIDER_VERSION: "3.0.12"    
+  commands:    
+    - |
+      cd %YAMATO_WORK_DIR%
+      unity-downloader-cli -u %EDITOR_VERSION% -c Editor --fast --wait
+    - |
+      unity-config project create %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%
+      unity-config settings project-path %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%
+      unity-config project add dependency com.unity.ide.rider@%RIDER_VERSION%
+      move %YAMATO_SOURCE_DIR%\Packages\com.unity.inputsystem %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Packages\com.unity.inputsystem      
+    - start /W %YAMATO_WORK_DIR%\.Editor\Unity.exe -projectPath %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME% -batchmode -quit -nographics -logFile %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Editor.log -executeMethod "Packages.Rider.Editor.RiderScriptEditor.SyncSolution"
+    - |
+      # If not triggered by a PR pass branch name, otherwise PR parameters
+      IF "%YAMATO_PR_ID%" == "" ( set SONAR_ANALYSIS_TYPE_PARAM=/d:sonar.branch.name=%GIT_BRANCH% ) ELSE ( set SONAR_ANALYSIS_TYPE_PARAM=/d:sonar.pullrequest.key=%YAMATO_PR_ID% /d:sonar.pullrequest.branch=%GIT_BRANCH% /d:sonar.pullrequest.base=%YAMATO_PR_TARGET_BRANCH% )
+      cmd /v /s /c "dotnet sonarscanner begin /k:"%SONAR_PROJECT_KEY%" /d:sonar.login=!SONAR_TOKEN_STAGING! /d:sonar.host.url=%SONAR_HOST_URL% /d:sonar.projectBaseDir=%YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\Packages\com.unity.inputsystem /d:sonar.sourceEncoding="UTF-8" %SONAR_ANALYSIS_TYPE_PARAM% /d:sonar.scm.provider=git /d:sonar.log.level=DEBUG /d:sonar.verbose=true /d:sonar.qualitygate.wait=true"
+      dotnet build %YAMATO_SOURCE_DIR%\%SONARQUBE_PROJECT_NAME%\%SONARQUBE_PROJECT_NAME%.sln /t:Rebuild /p:SonarQubeTestProject=false
+      cmd /v /s /c "dotnet sonarscanner end /d:sonar.login=!SONAR_TOKEN_STAGING!"      
+  artifacts:
+    logs:
+      paths:
+        - "**/*.log"
+  triggers:
+    pull_requests:
+      - targets:
+          only:
+            - "develop"
+            - "gh-readonly-queue/{base_branch}"
\ No newline at end of file
diff --git a/.yamato/test-samples.yml b/.yamato/test-samples.yml
index 4f564a3dab..bbf77e0adc 100644
--- a/.yamato/test-samples.yml
+++ b/.yamato/test-samples.yml
@@ -1,25 +1,26 @@
-#{% metadata_file .yamato/config.metadata %}
-#---
-#{% for editor in editors %}
-#test_sample_projects_{{ editor.version }}:
-#  name : Test Sample Projects {{ editor.version }}
-#  agent:
-#    type: Unity::VM::osx
-#    image: package-ci/macos-12:default
-#    flavor: m1.mac
-#  commands:
-#    - {{ upm_ci_install }}
-#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-#    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
-#    - Editor=.Editor/Unity.app/Contents/MacOS/Unity Method=DryRun sh ExternalSampleProjects/publish.sh 
-#  triggers:
-#    cancel_old_ci: true
-#    pull_requests:
-#      - targets:
-#          only:
-#            - "develop"
-#  artifacts:
-#    UTR_Output.zip:
-#      paths:
-#        - "upm-ci~/**/*"
-#{% endfor %}
\ No newline at end of file
+{% metadata_file .yamato/config.metadata %}
+---
+{% for editor in editors %}
+test_sample_projects_{{ editor.version }}:
+  name : Test Sample Projects {{ editor.version }}
+  agent:
+    type: Unity::VM::osx
+    image: package-ci/macos-12:default
+    flavor: m1.mac
+  commands:
+    - {{ upm_ci_install }}
+    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
+    - Editor=.Editor/Unity.app/Contents/MacOS/Unity Method=DryRun sh ExternalSampleProjects/publish.sh 
+  triggers:
+    cancel_old_ci: true
+    pull_requests:
+      - targets:
+          only:
+            - "develop"
+            - "gh-readonly-queue/{base_branch}"
+  artifacts:
+    UTR_Output.zip:
+      paths:
+        - "upm-ci~/**/*"
+{% endfor %}
\ No newline at end of file
diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml
index 38e3d18aa2..ff1df085d2 100644
--- a/.yamato/upm-ci.yml
+++ b/.yamato/upm-ci.yml
@@ -1,252 +1,253 @@
-#{% metadata_file .yamato/config.metadata %}
-#---
-#
-#{% for editor in editors %}
-#{% for platform in platforms_win %}
-#{{ platform.name }}_{{ editor.version }}:
-#  name : Build and Test version {{ editor.version }} on {{ platform.name }}
-#  agent:
-#    type: {{ platform.type }}
-#    image: {{ platform.image }}
-#    flavor: {{ platform.flavor }}
-#  commands:
-#    - {{ utr_install_win }}
-#    - {{ upm_ci_install }}
-#    # Get latest version of doctools package. Automatically makes the documentation tests in APIVerification go live.
-#    - '%GSUDO% choco install netfx-4.7.1-devpack -y --ignore-detected-reboot --ignore-package-codes'
-#    - git clone git@github.cds.internal.unity3d.com:unity/com.unity.package-manager-doctools.git Packages/com.unity.package-manager-doctools
-#    # We keep the samples in Assets/ as they otherwise won't get imported and you can't
-#    # really work with them. Move them into the package for when we run upm-ci here.
-#    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
-#    - move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
-#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-#    # Run upm-ci verification tests as well as tests contained in the package.
-#    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
-#    {% if platform.installscript %}
-#    - {{ unity_downloader_install }}
-#    - {{ platform.installscript }} {{ editor.version }}
-#    {% endif %}
-#    # ADBv2 on 2019.4 causes the test runner to not start on initial import when the
-#    # samples are in the package. Move the samples back into the project.
-#    - move /Y .\Packages\com.unity.inputsystem\Samples .\Assets
-#    - move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
-#    # Now run our full test suite that sits in Assets/Tests by running UTR on our project.
-#    - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
-#  artifacts:
-#    UTR_Output.zip:
-#      paths:
-#        - "upm-ci~/test-results/**/*"
-#{% endfor %}
-#{% for platform in platforms_nix %}
-#{{ platform.name }}_{{ editor.version }}:
-#  name : Build and Test version {{ editor.version }} on {{ platform.name }}
-#  agent:
-#    type: {{ platform.type }}
-#    image: {{ platform.image }}
-#    flavor: {{ platform.flavor }}
-#  commands:
-#    - {{ utr_install_nix }}
-#    - {{ upm_ci_install }}
-#    # Get latest version of doctools package. Automatically makes the documentation tests in APIVerification go live.
-#    - git clone git@github.cds.internal.unity3d.com:unity/com.unity.package-manager-doctools.git Packages/com.unity.package-manager-doctools
-#    # We keep the samples in Assets/ as they otherwise won't get imported and you can't
-#    # really work with them. Move them into the package for when we run upm-ci here.
-#    - mv ./Assets/Samples ./Packages/com.unity.inputsystem
-#    - mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem
-#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-#    # Run upm-ci verification tests as well as tests contained in the package.
-#    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
-#    {% if platform.installscript %}
-#    - {{ unity_downloader_install }}
-#    - {{ platform.installscript }} {{ editor.version }}
-#    {% endif %}
-#    # ADBv2 on 2019.4 causes the test runner to not start on initial import when the
-#    # samples are in the package. Move the samples back into the project.
-#    - mv ./Packages/com.unity.inputsystem/Samples ./Assets
-#    - mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
-#    # Now run our full test suite that sits in Assets/Tests by running UTR on our project.
-#    - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
-#  artifacts:
-#    UTR_Output.zip:
-#      paths:
-#        - "upm-ci~/test-results/**/*"
-#{% endfor %}
-#{% endfor %}
-#
-#{% for editor in editors %}
-#build_ios_{{ editor.version }}:
-#  name: Build Tests on {{ editor.version }} on ios
-#  agent:
-#    type: Unity::VM::osx
-#    image: package-ci/macos-12:default
-#    flavor: b1.large
-#  commands:
-#    - {{ utr_install_nix }}
-#    - {{ unity_downloader_install }}
-#    - unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast -w
-#    - ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
-#  artifacts:
-#    players:
-#        paths:
-#          - "build/players/**"
-#    logs:
-#        paths:
-#          - "build/logs/**"
-#
-#run_ios_{{ editor.version }}:
-#  name: Run Tests on {{ editor.version }} on ios
-#  agent:
-#      type: Unity::mobile::iPhone
-#      image: package-ci/macos-12:default
-#      model: SE
-#      flavor: b1.medium
-#  skip_checkout: true
-#  dependencies:
-#    - .yamato/upm-ci.yml#build_ios_{{ editor.version }}  
-#  commands:
-#    - {{ utr_install_nix }}
-#    - ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
-#  artifacts:
-#    logs:
-#        paths:
-#          - "build/test-results/**"
-#
-#build_tvos_{{ editor.version }}:
-#  name: Build Tests on {{ editor.version }} on tvos
-#  agent:
-#    type: Unity::VM::osx
-#    image: package-ci/macos-12:default
-#    flavor: b1.large
-#  commands:
-#    - {{ utr_install_nix }}
-#    - {{ unity_downloader_install }}
-#    - unity-downloader-cli -c Editor -c AppleTV -u {{ editor.version }} --fast -w
-#    - ./utr --suite=playmode --platform=tvOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
-#  artifacts:
-#    players:
-#        paths:
-#          - "build/players/**"
-#    logs:
-#        paths:
-#          - "build/logs/**"
-#
-#run_tvos_{{ editor.version }}:
-#  name: Run Tests on {{ editor.version }} on tvos
-#  agent:
-#      type: Unity::mobile::appletv
-#      image: package-ci/macos-12:default
-#      flavor: b1.medium
-#  skip_checkout: true
-#  dependencies:
-#    - .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
-#  commands:
-#    - {{ utr_install_nix }}
-#    - ./utr --suite=playmode --platform=tvOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
-#  artifacts:
-#    logs:
-#        paths:
-#          - "build/test-results/**"
-#
-#{% for backend in scripting_backends %}
-#build_android_{{ editor.version }}_{{ backend.name }}:
-#  name: Build Tests on {{ editor.version }} on android {{ backend.name }}
-#  agent:
-#      type: Unity::VM
-#      image: package-ci/win10:default
-#      flavor: b1.xlarge
-#  commands:
-#    - {{ utr_install_win }}
-#    - {{ unity_downloader_install }}
-#    - unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast -w
-#    - ./utr --suite=playmode --platform=Android --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend.name }} --build-only --repository --performance-project-id=InputSystem
-#  artifacts:
-#    players:
-#        paths:
-#          - "build/players/**"
-#    logs:
-#        paths:
-#          - "build/logs/**"
-#
-#run_android_{{ editor.version }}_{{ backend.name }}:
-#  name: Run Tests on {{ editor.version }} on android {{ backend.name }}
-#  agent:
-#      type: Unity::mobile::shield
-#      image: package-ci/win10:default
-#      flavor: b1.medium
-#  # Skip repository cloning
-#  skip_checkout: true
-#  # Set a dependency on the build job
-#  dependencies:
-#    - .yamato/upm-ci.yml#build_android_{{ editor.version }}_{{ backend.name }}  
-#  commands:
-#    - {{ utr_install_win }}
-#    - |
-#       # Set the IP of the device. In case device gets lost, UTR will try to recconect to ANDROID_DEVICE_CONNECTION
-#       set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
-#       # Establish an ADB connection with the device
-#       start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
-#       # List the connected devices
-#       start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
-#       ./utr --suite=playmode --platform=android --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
-#  after:
-#    - start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
-#    - if not exist build\test-results mkdir build\test-results
-#    - powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe logcat -d > build/test-results/device_log.txt
-#  # Set uploadable artifact paths
-#  artifacts:
-#    logs:
-#      paths:
-#        - "build/test-results/**"
-#{% endfor %}
-#
-#{% endfor %}
-#
-#all_tests:
-#  name: All Tests
-#  dependencies:
-#    {% for editor in editors %}
-#    {% for platform in platforms_win %}
-#    - .yamato/upm-ci.yml#{{ platform.name }}_{{ editor.version }}
-#    {% endfor %}
-#    {% for platform in platforms_nix %}
-#    - .yamato/upm-ci.yml#{{ platform.name }}_{{ editor.version }}
-#    {% endfor %}
-#    {% for backend in scripting_backends %}
-#    - .yamato/upm-ci.yml#run_android_{{ editor.version }}_{{ backend.name }}
-#    {% endfor %}
-#    - .yamato/upm-ci.yml#run_ios_{{ editor.version }}
-#{% if editor.disable_tvos_run %}
-#    - .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
-#{% else %}
-#    - .yamato/upm-ci.yml#run_tvos_{{ editor.version }}
-#{% endif %}
-#    {% endfor %}
-#    - .yamato/upm-ci.yml#publish_dryrun
-#  triggers:
-#    cancel_old_ci: true
-#    pull_requests:
-#      - targets:
-#          only:
-#            - "develop"
-#
-#{% for run in (1..2) %}
-#publish{% cycle "", "_dryrun" %}:
-#  name: Publish to Internal Registry {% cycle "", "(Dry Run)" %}
-#  agent:
-#    type: Unity::VM
-#    image: package-ci/win10:default
-#    flavor: b1.large
-#  variables:
-#    UPMCI_ENABLE_PACKAGE_SIGNING: 1
-#  commands:
-#    - {{ upm_ci_install }}
-#    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
-#    - move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
-#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-#    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u 2019.4
-#    - upm-ci package publish --package-path ./Packages/com.unity.inputsystem/ {% cycle "", "--dry-run" %}
-#  artifacts:
-#    artifacts:
-#      paths:
-#        - "upm-ci~/packages/*.tgz"
-#{% endfor %}
+{% metadata_file .yamato/config.metadata %}
+---
+
+{% for editor in editors %}
+{% for platform in platforms_win %}
+{{ platform.name }}_{{ editor.version }}:
+  name : Build and Test version {{ editor.version }} on {{ platform.name }}
+  agent:
+    type: {{ platform.type }}
+    image: {{ platform.image }}
+    flavor: {{ platform.flavor }}
+  commands:
+    - {{ utr_install_win }}
+    - {{ upm_ci_install }}
+    # Get latest version of doctools package. Automatically makes the documentation tests in APIVerification go live.
+    - '%GSUDO% choco install netfx-4.7.1-devpack -y --ignore-detected-reboot --ignore-package-codes'
+    - git clone git@github.cds.internal.unity3d.com:unity/com.unity.package-manager-doctools.git Packages/com.unity.package-manager-doctools
+    # We keep the samples in Assets/ as they otherwise won't get imported and you can't
+    # really work with them. Move them into the package for when we run upm-ci here.
+    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
+    - move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
+    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+    # Run upm-ci verification tests as well as tests contained in the package.
+    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
+    {% if platform.installscript %}
+    - {{ unity_downloader_install }}
+    - {{ platform.installscript }} {{ editor.version }}
+    {% endif %}
+    # ADBv2 on 2019.4 causes the test runner to not start on initial import when the
+    # samples are in the package. Move the samples back into the project.
+    - move /Y .\Packages\com.unity.inputsystem\Samples .\Assets
+    - move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets
+    # Now run our full test suite that sits in Assets/Tests by running UTR on our project.
+    - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
+  artifacts:
+    UTR_Output.zip:
+      paths:
+        - "upm-ci~/test-results/**/*"
+{% endfor %}
+{% for platform in platforms_nix %}
+{{ platform.name }}_{{ editor.version }}:
+  name : Build and Test version {{ editor.version }} on {{ platform.name }}
+  agent:
+    type: {{ platform.type }}
+    image: {{ platform.image }}
+    flavor: {{ platform.flavor }}
+  commands:
+    - {{ utr_install_nix }}
+    - {{ upm_ci_install }}
+    # Get latest version of doctools package. Automatically makes the documentation tests in APIVerification go live.
+    - git clone git@github.cds.internal.unity3d.com:unity/com.unity.package-manager-doctools.git Packages/com.unity.package-manager-doctools
+    # We keep the samples in Assets/ as they otherwise won't get imported and you can't
+    # really work with them. Move them into the package for when we run upm-ci here.
+    - mv ./Assets/Samples ./Packages/com.unity.inputsystem
+    - mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem
+    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+    # Run upm-ci verification tests as well as tests contained in the package.
+    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}
+    {% if platform.installscript %}
+    - {{ unity_downloader_install }}
+    - {{ platform.installscript }} {{ editor.version }}
+    {% endif %}
+    # ADBv2 on 2019.4 causes the test runner to not start on initial import when the
+    # samples are in the package. Move the samples back into the project.
+    - mv ./Packages/com.unity.inputsystem/Samples ./Assets
+    - mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets
+    # Now run our full test suite that sits in Assets/Tests by running UTR on our project.
+    - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode --api-profile=NET_4_6 --stdout-filter=minimal {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem
+  artifacts:
+    UTR_Output.zip:
+      paths:
+        - "upm-ci~/test-results/**/*"
+{% endfor %}
+{% endfor %}
+
+{% for editor in editors %}
+build_ios_{{ editor.version }}:
+  name: Build Tests on {{ editor.version }} on ios
+  agent:
+    type: Unity::VM::osx
+    image: package-ci/macos-12:default
+    flavor: b1.large
+  commands:
+    - {{ utr_install_nix }}
+    - {{ unity_downloader_install }}
+    - unity-downloader-cli -c Editor -c iOS -u {{ editor.version }} --fast -w
+    - ./utr --suite=playmode --platform=iOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
+  artifacts:
+    players:
+        paths:
+          - "build/players/**"
+    logs:
+        paths:
+          - "build/logs/**"
+
+run_ios_{{ editor.version }}:
+  name: Run Tests on {{ editor.version }} on ios
+  agent:
+      type: Unity::mobile::iPhone
+      image: package-ci/macos-12:default
+      model: SE
+      flavor: b1.medium
+  skip_checkout: true
+  dependencies:
+    - .yamato/upm-ci.yml#build_ios_{{ editor.version }}  
+  commands:
+    - {{ utr_install_nix }}
+    - ./utr --suite=playmode --platform=iOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
+  artifacts:
+    logs:
+        paths:
+          - "build/test-results/**"
+
+build_tvos_{{ editor.version }}:
+  name: Build Tests on {{ editor.version }} on tvos
+  agent:
+    type: Unity::VM::osx
+    image: package-ci/macos-12:default
+    flavor: b1.large
+  commands:
+    - {{ utr_install_nix }}
+    - {{ unity_downloader_install }}
+    - unity-downloader-cli -c Editor -c AppleTV -u {{ editor.version }} --fast -w
+    - ./utr --suite=playmode --platform=tvOS --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --build-only --report-performance-data --performance-project-id=InputSystem
+  artifacts:
+    players:
+        paths:
+          - "build/players/**"
+    logs:
+        paths:
+          - "build/logs/**"
+
+run_tvos_{{ editor.version }}:
+  name: Run Tests on {{ editor.version }} on tvos
+  agent:
+      type: Unity::mobile::appletv
+      image: package-ci/macos-12:default
+      flavor: b1.medium
+  skip_checkout: true
+  dependencies:
+    - .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
+  commands:
+    - {{ utr_install_nix }}
+    - ./utr --suite=playmode --platform=tvOS --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
+  artifacts:
+    logs:
+        paths:
+          - "build/test-results/**"
+
+{% for backend in scripting_backends %}
+build_android_{{ editor.version }}_{{ backend.name }}:
+  name: Build Tests on {{ editor.version }} on android {{ backend.name }}
+  agent:
+      type: Unity::VM
+      image: package-ci/win10:default
+      flavor: b1.xlarge
+  commands:
+    - {{ utr_install_win }}
+    - {{ unity_downloader_install }}
+    - unity-downloader-cli -c Editor -c Android -u {{ editor.version }} --fast -w
+    - ./utr --suite=playmode --platform=Android --editor-location=.Editor --testproject=. --player-save-path=build/players --artifacts_path=build/logs --scripting-backend={{ backend.name }} --build-only --repository --performance-project-id=InputSystem
+  artifacts:
+    players:
+        paths:
+          - "build/players/**"
+    logs:
+        paths:
+          - "build/logs/**"
+
+run_android_{{ editor.version }}_{{ backend.name }}:
+  name: Run Tests on {{ editor.version }} on android {{ backend.name }}
+  agent:
+      type: Unity::mobile::shield
+      image: package-ci/win10:default
+      flavor: b1.medium
+  # Skip repository cloning
+  skip_checkout: true
+  # Set a dependency on the build job
+  dependencies:
+    - .yamato/upm-ci.yml#build_android_{{ editor.version }}_{{ backend.name }}  
+  commands:
+    - {{ utr_install_win }}
+    - |
+       # Set the IP of the device. In case device gets lost, UTR will try to recconect to ANDROID_DEVICE_CONNECTION
+       set ANDROID_DEVICE_CONNECTION=%BOKKEN_DEVICE_IP%
+       # Establish an ADB connection with the device
+       start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
+       # List the connected devices
+       start %ANDROID_SDK_ROOT%\platform-tools\adb.exe devices
+       ./utr --suite=playmode --platform=android --player-load-path=build/players --artifacts_path=build/test-results --report-performance-data --performance-project-id=InputSystem
+  after:
+    - start %ANDROID_SDK_ROOT%\platform-tools\adb.exe connect %BOKKEN_DEVICE_IP%
+    - if not exist build\test-results mkdir build\test-results
+    - powershell %ANDROID_SDK_ROOT%\platform-tools\adb.exe logcat -d > build/test-results/device_log.txt
+  # Set uploadable artifact paths
+  artifacts:
+    logs:
+      paths:
+        - "build/test-results/**"
+{% endfor %}
+
+{% endfor %}
+
+all_tests:
+  name: All Tests
+  dependencies:
+    {% for editor in editors %}
+    {% for platform in platforms_win %}
+    - .yamato/upm-ci.yml#{{ platform.name }}_{{ editor.version }}
+    {% endfor %}
+    {% for platform in platforms_nix %}
+    - .yamato/upm-ci.yml#{{ platform.name }}_{{ editor.version }}
+    {% endfor %}
+    {% for backend in scripting_backends %}
+    - .yamato/upm-ci.yml#run_android_{{ editor.version }}_{{ backend.name }}
+    {% endfor %}
+    - .yamato/upm-ci.yml#run_ios_{{ editor.version }}
+{% if editor.disable_tvos_run %}
+    - .yamato/upm-ci.yml#build_tvos_{{ editor.version }}
+{% else %}
+    - .yamato/upm-ci.yml#run_tvos_{{ editor.version }}
+{% endif %}
+    {% endfor %}
+    - .yamato/upm-ci.yml#publish_dryrun
+  triggers:
+    cancel_old_ci: true
+    pull_requests:
+      - targets:
+          only:
+            - "develop"
+            - "gh-readonly-queue/{base_branch}"
+
+{% for run in (1..2) %}
+publish{% cycle "", "_dryrun" %}:
+  name: Publish to Internal Registry {% cycle "", "(Dry Run)" %}
+  agent:
+    type: Unity::VM
+    image: package-ci/win10:default
+    flavor: b1.large
+  variables:
+    UPMCI_ENABLE_PACKAGE_SIGNING: 1
+  commands:
+    - {{ upm_ci_install }}
+    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
+    - move /Y .\Assets\Samples.meta .\Packages\com.unity.inputsystem
+    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u 2019.4
+    - upm-ci package publish --package-path ./Packages/com.unity.inputsystem/ {% cycle "", "--dry-run" %}
+  artifacts:
+    artifacts:
+      paths:
+        - "upm-ci~/packages/*.tgz"
+{% endfor %}

From 332cb316f8996b1861b0ae4bcb53885e741bbde3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Freire?= <joao.freire@unity3d.com>
Date: Thu, 9 Mar 2023 10:47:54 +0100
Subject: [PATCH 06/10] Fix CI for running merge queues

---
 .yamato/analyze.yml         |  2 +-
 .yamato/format.yml          |  2 +-
 .yamato/promotion.yml       | 48 ++++++++++++++++++-------------------
 .yamato/publish-samples.yml | 36 ++++++++++++++--------------
 .yamato/sonarqube.yml       |  2 +-
 .yamato/test-samples.yml    |  2 +-
 .yamato/upm-ci.yml          |  2 +-
 7 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/.yamato/analyze.yml b/.yamato/analyze.yml
index a9acda8033..bd875a8ff6 100644
--- a/.yamato/analyze.yml
+++ b/.yamato/analyze.yml
@@ -21,7 +21,7 @@ code_analyser:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/{base_branch}"
+            - "gh-readonly-queue/develop"
   artifacts:
     UTR_Output.zip:
       paths:
diff --git a/.yamato/format.yml b/.yamato/format.yml
index abaffd62a8..5d797f54e8 100644
--- a/.yamato/format.yml
+++ b/.yamato/format.yml
@@ -16,4 +16,4 @@ check_formatting:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/{base_branch}"
+            - "gh-readonly-queue/develop"
diff --git a/.yamato/promotion.yml b/.yamato/promotion.yml
index 5a9581602e..82f8693c2b 100644
--- a/.yamato/promotion.yml
+++ b/.yamato/promotion.yml
@@ -1,24 +1,24 @@
-#{% metadata_file .yamato/config.metadata %}
-#---
-#
-#promote:
-#  name: Promote to Production
-#  agent:
-#    type: Unity::VM
-#    image: package-ci/win10:default
-#    flavor: b1.large
-#  dependencies:
-#    - .yamato/publish-samples.yml 
-#  variables:
-#    UPMCI_PROMOTION: 1
-#  commands:
-#    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
-#    - xcopy /Y /H .\Assets\Samples.meta .\Packages\com.unity.inputsystem
-#    - del /AH .\Assets\Samples.meta
-#    - {{ upm_ci_install }}
-#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-#    - upm-ci package promote --package-path ./Packages/com.unity.inputsystem/
-#  artifacts:
-#    artifacts:
-#      paths:
-#        - "upm-ci~/**/*"
+{% metadata_file .yamato/config.metadata %}
+---
+
+promote:
+  name: Promote to Production
+  agent:
+    type: Unity::VM
+    image: package-ci/win10:default
+    flavor: b1.large
+  dependencies:
+    - .yamato/publish-samples.yml 
+  variables:
+    UPMCI_PROMOTION: 1
+  commands:
+    - move /Y .\Assets\Samples .\Packages\com.unity.inputsystem
+    - xcopy /Y /H .\Assets\Samples.meta .\Packages\com.unity.inputsystem
+    - del /AH .\Assets\Samples.meta
+    - {{ upm_ci_install }}
+    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+    - upm-ci package promote --package-path ./Packages/com.unity.inputsystem/
+  artifacts:
+    artifacts:
+      paths:
+        - "upm-ci~/**/*"
diff --git a/.yamato/publish-samples.yml b/.yamato/publish-samples.yml
index ed7c1843d3..548feaebcb 100644
--- a/.yamato/publish-samples.yml
+++ b/.yamato/publish-samples.yml
@@ -1,18 +1,18 @@
-#{% metadata_file .yamato/config.metadata %}
-#---
-#
-#test_sample_projects:
-#  name : Publish Sample Projects
-#  agent:
-#    type: Unity::VM::osx
-#    image: package-ci/macos-12:default
-#    flavor: m1.mac
-#  commands:
-#    - {{ upm_ci_install }}
-#    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
-#    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u 2019.4
-#    - Editor=.Editor/Unity.app/Contents/MacOS/Unity Method=Publish sh ExternalSampleProjects/publish.sh 
-#  artifacts:
-#    UTR_Output.zip:
-#      paths:
-#        - "upm-ci~/**/*"
+{% metadata_file .yamato/config.metadata %}
+---
+
+test_sample_projects:
+  name : Publish Sample Projects
+  agent:
+    type: Unity::VM::osx
+    image: package-ci/macos-12:default
+    flavor: m1.mac
+  commands:
+    - {{ upm_ci_install }}
+    - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
+    - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u 2019.4
+    - Editor=.Editor/Unity.app/Contents/MacOS/Unity Method=Publish sh ExternalSampleProjects/publish.sh 
+  artifacts:
+    UTR_Output.zip:
+      paths:
+        - "upm-ci~/**/*"
diff --git a/.yamato/sonarqube.yml b/.yamato/sonarqube.yml
index 7d3b4b2405..eb70974fd2 100644
--- a/.yamato/sonarqube.yml
+++ b/.yamato/sonarqube.yml
@@ -36,4 +36,4 @@ Windows-Dotnet-SonarScanner:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/{base_branch}"
\ No newline at end of file
+            - "gh-readonly-queue/develop"
\ No newline at end of file
diff --git a/.yamato/test-samples.yml b/.yamato/test-samples.yml
index bbf77e0adc..2d186f0324 100644
--- a/.yamato/test-samples.yml
+++ b/.yamato/test-samples.yml
@@ -18,7 +18,7 @@ test_sample_projects_{{ editor.version }}:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/{base_branch}"
+            - "gh-readonly-queue/develop"
   artifacts:
     UTR_Output.zip:
       paths:
diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml
index ff1df085d2..0a0fb1c735 100644
--- a/.yamato/upm-ci.yml
+++ b/.yamato/upm-ci.yml
@@ -228,7 +228,7 @@ all_tests:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/{base_branch}"
+            - "gh-readonly-queue/develop"
 
 {% for run in (1..2) %}
 publish{% cycle "", "_dryrun" %}:

From d29ae0163e751939f349db811d37e1bdb0b14ca4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Freire?= <joao.freire@unity3d.com>
Date: Thu, 9 Mar 2023 12:33:49 +0100
Subject: [PATCH 07/10] Fix yamato branch path to trigger CI on merge queue

---
 .yamato/analyze.yml      | 2 +-
 .yamato/format.yml       | 2 +-
 .yamato/sonarqube.yml    | 2 +-
 .yamato/test-samples.yml | 2 +-
 .yamato/upm-ci.yml       | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.yamato/analyze.yml b/.yamato/analyze.yml
index bd875a8ff6..f278b0b90f 100644
--- a/.yamato/analyze.yml
+++ b/.yamato/analyze.yml
@@ -21,7 +21,7 @@ code_analyser:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/develop"
+            - "gh-readonly-queue/develop/*"
   artifacts:
     UTR_Output.zip:
       paths:
diff --git a/.yamato/format.yml b/.yamato/format.yml
index 5d797f54e8..470375f797 100644
--- a/.yamato/format.yml
+++ b/.yamato/format.yml
@@ -16,4 +16,4 @@ check_formatting:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/develop"
+            - "gh-readonly-queue/develop/*"
diff --git a/.yamato/sonarqube.yml b/.yamato/sonarqube.yml
index eb70974fd2..f6bf74e27d 100644
--- a/.yamato/sonarqube.yml
+++ b/.yamato/sonarqube.yml
@@ -36,4 +36,4 @@ Windows-Dotnet-SonarScanner:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/develop"
\ No newline at end of file
+            - "gh-readonly-queue/develop/*"
\ No newline at end of file
diff --git a/.yamato/test-samples.yml b/.yamato/test-samples.yml
index 2d186f0324..a444c2476f 100644
--- a/.yamato/test-samples.yml
+++ b/.yamato/test-samples.yml
@@ -18,7 +18,7 @@ test_sample_projects_{{ editor.version }}:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/develop"
+            - "gh-readonly-queue/develop/*"
   artifacts:
     UTR_Output.zip:
       paths:
diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml
index 0a0fb1c735..6c51319960 100644
--- a/.yamato/upm-ci.yml
+++ b/.yamato/upm-ci.yml
@@ -228,7 +228,7 @@ all_tests:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/develop"
+            - "gh-readonly-queue/develop/*"
 
 {% for run in (1..2) %}
 publish{% cycle "", "_dryrun" %}:

From ac9a20b80e091a9891b3f0c007bcbb0d931892d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Freire?= <joao.freire@unity3d.com>
Date: Thu, 9 Mar 2023 12:40:56 +0100
Subject: [PATCH 08/10] Test triggering CI on push to merge queue branch

---
 .yamato/analyze.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.yamato/analyze.yml b/.yamato/analyze.yml
index f278b0b90f..80c0aa132b 100644
--- a/.yamato/analyze.yml
+++ b/.yamato/analyze.yml
@@ -17,11 +17,14 @@ code_analyser:
     - upm-ci project test --project-path Tools/CodeAnalyzerTestProject -u 2019.4
   triggers:
     cancel_old_ci: true
+    branches:
+      only:
+        - "gh-readonly-queue/develop/*"
     pull_requests:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/develop/*"
+
   artifacts:
     UTR_Output.zip:
       paths:

From 7d4d8965eb1996c5b783f928d0bde2469a4d5062 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Freire?= <joao.freire@unity3d.com>
Date: Thu, 9 Mar 2023 13:35:23 +0100
Subject: [PATCH 09/10] Try another CI trigger for merge queues

---
 .yamato/analyze.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.yamato/analyze.yml b/.yamato/analyze.yml
index 80c0aa132b..7a8c1a64a8 100644
--- a/.yamato/analyze.yml
+++ b/.yamato/analyze.yml
@@ -19,7 +19,7 @@ code_analyser:
     cancel_old_ci: true
     branches:
       only:
-        - "gh-readonly-queue/develop/*"
+        - "/gh-readonly-queue/develop/.*/"
     pull_requests:
       - targets:
           only:

From 749479e3693a13798e43fda11bf479c71f9d421e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Freire?= <joao.freire@unity3d.com>
Date: Thu, 9 Mar 2023 13:44:58 +0100
Subject: [PATCH 10/10] Add trigger for all CI jobs to run on GH Merge Queues

---
 .yamato/analyze.yml      | 1 -
 .yamato/format.yml       | 6 ++++--
 .yamato/sonarqube.yml    | 7 +++++--
 .yamato/test-samples.yml | 4 +++-
 .yamato/upm-ci.yml       | 4 +++-
 5 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/.yamato/analyze.yml b/.yamato/analyze.yml
index 7a8c1a64a8..894eca3348 100644
--- a/.yamato/analyze.yml
+++ b/.yamato/analyze.yml
@@ -24,7 +24,6 @@ code_analyser:
       - targets:
           only:
             - "develop"
-
   artifacts:
     UTR_Output.zip:
       paths:
diff --git a/.yamato/format.yml b/.yamato/format.yml
index 470375f797..00586fb19f 100644
--- a/.yamato/format.yml
+++ b/.yamato/format.yml
@@ -12,8 +12,10 @@ check_formatting:
     - perl unity-meta/Tools/Format/format.pl Assets Packages --dry-run
   triggers:
     cancel_old_ci: true
+    branches:
+      only:
+        - "/gh-readonly-queue/develop/.*/"
     pull_requests:
       - targets:
           only:
-            - "develop"
-            - "gh-readonly-queue/develop/*"
+            - "develop"
\ No newline at end of file
diff --git a/.yamato/sonarqube.yml b/.yamato/sonarqube.yml
index f6bf74e27d..444810ac2a 100644
--- a/.yamato/sonarqube.yml
+++ b/.yamato/sonarqube.yml
@@ -32,8 +32,11 @@ Windows-Dotnet-SonarScanner:
       paths:
         - "**/*.log"
   triggers:
+    cancel_old_ci: true
+    branches:
+      only:
+        - "/gh-readonly-queue/develop/.*/"
     pull_requests:
       - targets:
           only:
-            - "develop"
-            - "gh-readonly-queue/develop/*"
\ No newline at end of file
+            - "develop"
\ No newline at end of file
diff --git a/.yamato/test-samples.yml b/.yamato/test-samples.yml
index a444c2476f..7081fb4144 100644
--- a/.yamato/test-samples.yml
+++ b/.yamato/test-samples.yml
@@ -14,11 +14,13 @@ test_sample_projects_{{ editor.version }}:
     - Editor=.Editor/Unity.app/Contents/MacOS/Unity Method=DryRun sh ExternalSampleProjects/publish.sh 
   triggers:
     cancel_old_ci: true
+    branches:
+      only:
+        - "/gh-readonly-queue/develop/.*/"
     pull_requests:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/develop/*"
   artifacts:
     UTR_Output.zip:
       paths:
diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml
index 6c51319960..630f7d6476 100644
--- a/.yamato/upm-ci.yml
+++ b/.yamato/upm-ci.yml
@@ -224,11 +224,13 @@ all_tests:
     - .yamato/upm-ci.yml#publish_dryrun
   triggers:
     cancel_old_ci: true
+    branches:
+      only:
+        - "/gh-readonly-queue/develop/.*/"
     pull_requests:
       - targets:
           only:
             - "develop"
-            - "gh-readonly-queue/develop/*"
 
 {% for run in (1..2) %}
 publish{% cycle "", "_dryrun" %}: