diff --git a/.yamato/_editor_priming.yml b/.yamato/_editor_priming.yml index 64165f46538..79622800695 100644 --- a/.yamato/_editor_priming.yml +++ b/.yamato/_editor_priming.yml @@ -3,42 +3,6 @@ # Introduce any changes under .yamato/config/*.metafile files (for most cases) or under .yamato/ruamel/* within Python (more elaborate cases), and rerun build.py to regenerate all .yml files. # Read more under .yamato/docs/readme.md -editor:priming:trunk:macos: - name: '[trunk,macos] Editor priming' - agent: - type: Unity::VM - image: cds-ops/ubuntu-16.04-base:stable - flavor: b1.small - skip_checkout: true - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - UPM_REGISTRY: https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u trunk -o macos --wait --skip-download -c editor -c il2cpp > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" -editor:priming:2020.2:macos: - name: '[2020.2,macos] Editor priming' - agent: - type: Unity::VM - image: cds-ops/ubuntu-16.04-base:stable - flavor: b1.small - skip_checkout: true - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - UPM_REGISTRY: https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u 2020.2 -o macos --wait --skip-download -c editor -c il2cpp > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" editor:priming:CUSTOM-REVISION:macos: name: '[CUSTOM-REVISION,macos] Editor priming' agent: @@ -77,42 +41,6 @@ editor:priming:test_min_editor:macos: unity_revision.zip: paths: - "unity_revision.txt" -editor:priming:trunk:android: - name: '[trunk,android] Editor priming' - agent: - type: Unity::VM - image: cds-ops/ubuntu-16.04-base:stable - flavor: b1.small - skip_checkout: true - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - UPM_REGISTRY: https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u trunk -o windows --wait --skip-download -c editor -c il2cpp -c android > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" -editor:priming:2020.2:android: - name: '[2020.2,android] Editor priming' - agent: - type: Unity::VM - image: cds-ops/ubuntu-16.04-base:stable - flavor: b1.small - skip_checkout: true - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - UPM_REGISTRY: https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u 2020.2 -o windows --wait --skip-download -c editor -c il2cpp -c android > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" editor:priming:CUSTOM-REVISION:android: name: '[CUSTOM-REVISION,android] Editor priming' agent: @@ -151,42 +79,6 @@ editor:priming:test_min_editor:android: unity_revision.zip: paths: - "unity_revision.txt" -editor:priming:trunk:windows: - name: '[trunk,windows] Editor priming' - agent: - type: Unity::VM - image: cds-ops/ubuntu-16.04-base:stable - flavor: b1.small - skip_checkout: true - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - UPM_REGISTRY: https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u trunk -o windows --wait --skip-download -c editor -c il2cpp > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" -editor:priming:2020.2:windows: - name: '[2020.2,windows] Editor priming' - agent: - type: Unity::VM - image: cds-ops/ubuntu-16.04-base:stable - flavor: b1.small - skip_checkout: true - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - UPM_REGISTRY: https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u 2020.2 -o windows --wait --skip-download -c editor -c il2cpp > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" editor:priming:CUSTOM-REVISION:windows: name: '[CUSTOM-REVISION,windows] Editor priming' agent: @@ -225,42 +117,6 @@ editor:priming:test_min_editor:windows: unity_revision.zip: paths: - "unity_revision.txt" -editor:priming:trunk:linux: - name: '[trunk,linux] Editor priming' - agent: - type: Unity::VM - image: cds-ops/ubuntu-16.04-base:stable - flavor: b1.small - skip_checkout: true - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - UPM_REGISTRY: https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u trunk -o linux --wait --skip-download -c editor -c il2cpp > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" -editor:priming:2020.2:linux: - name: '[2020.2,linux] Editor priming' - agent: - type: Unity::VM - image: cds-ops/ubuntu-16.04-base:stable - flavor: b1.small - skip_checkout: true - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - UPM_REGISTRY: https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u 2020.2 -o linux --wait --skip-download -c editor -c il2cpp > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" editor:priming:CUSTOM-REVISION:linux: name: '[CUSTOM-REVISION,linux] Editor priming' agent: @@ -299,42 +155,6 @@ editor:priming:test_min_editor:linux: unity_revision.zip: paths: - "unity_revision.txt" -editor:priming:trunk:ios: - name: '[trunk,ios] Editor priming' - agent: - type: Unity::VM - image: cds-ops/ubuntu-16.04-base:stable - flavor: b1.small - skip_checkout: true - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - UPM_REGISTRY: https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u trunk -o macos --wait --skip-download -c editor -c iOS > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" -editor:priming:2020.2:ios: - name: '[2020.2,ios] Editor priming' - agent: - type: Unity::VM - image: cds-ops/ubuntu-16.04-base:stable - flavor: b1.small - skip_checkout: true - variables: - PATH: /home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin - DISPLAY: ":0" - UPM_REGISTRY: https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates - commands: - - pip install unity-downloader-cli --user --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u 2020.2 -o macos --wait --skip-download -c editor -c iOS > unity_revision.txt - artifacts: - unity_revision.zip: - paths: - - "unity_revision.txt" editor:priming:CUSTOM-REVISION:ios: name: '[CUSTOM-REVISION,ios] Editor priming' agent: diff --git a/.yamato/_packages.yml b/.yamato/_packages.yml index 60aed51846d..39a94bc351a 100644 --- a/.yamato/_packages.yml +++ b/.yamato/_packages.yml @@ -1719,7 +1719,7 @@ test_core_windows_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - upm-ci package test -u .\.Editor --type updated-dependencies-tests --package-path com.unity.render-pipelines.core artifacts: logs: @@ -1768,7 +1768,7 @@ test_lwrp_windows_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~\packages - copy packages_temp\lwrp\upm-ci~\packages\packages.json upm-ci~\packages - for /r packages_temp %%x in (*.tgz) do copy %%x upm-ci~\packages @@ -1817,7 +1817,7 @@ test_shadergraph_windows_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~\packages - copy packages_temp\shadergraph\upm-ci~\packages\packages.json upm-ci~\packages - for /r packages_temp %%x in (*.tgz) do copy %%x upm-ci~\packages @@ -1872,7 +1872,7 @@ test_hdrp_windows_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~\packages - copy packages_temp\hdrp\upm-ci~\packages\packages.json upm-ci~\packages - for /r packages_temp %%x in (*.tgz) do copy %%x upm-ci~\packages @@ -1923,7 +1923,7 @@ test_universal_windows_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~\packages - copy packages_temp\universal\upm-ci~\packages\packages.json upm-ci~\packages - for /r packages_temp %%x in (*.tgz) do copy %%x upm-ci~\packages @@ -1974,7 +1974,7 @@ test_vfx_windows_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~\packages - copy packages_temp\vfx\upm-ci~\packages\packages.json upm-ci~\packages - for /r packages_temp %%x in (*.tgz) do copy %%x upm-ci~\packages @@ -2023,7 +2023,7 @@ test_config_windows_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~\packages - copy packages_temp\config\upm-ci~\packages\packages.json upm-ci~\packages - for /r packages_temp %%x in (*.tgz) do copy %%x upm-ci~\packages @@ -2069,7 +2069,7 @@ test_core_macos_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - upm-ci package test -u $(pwd)/.Editor/Unity.app/Contents/MacOS/Unity --type updated-dependencies-tests --package-path com.unity.render-pipelines.core artifacts: logs: @@ -2118,7 +2118,7 @@ test_lwrp_macos_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~ && mkdir upm-ci~/packages - cp packages_temp/lwrp/upm-ci~/packages/packages.json upm-ci~/packages - cp packages_temp/**/upm-ci~/packages/*.tgz upm-ci~/packages @@ -2167,7 +2167,7 @@ test_shadergraph_macos_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~ && mkdir upm-ci~/packages - cp packages_temp/shadergraph/upm-ci~/packages/packages.json upm-ci~/packages - cp packages_temp/**/upm-ci~/packages/*.tgz upm-ci~/packages @@ -2222,7 +2222,7 @@ test_hdrp_macos_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~ && mkdir upm-ci~/packages - cp packages_temp/hdrp/upm-ci~/packages/packages.json upm-ci~/packages - cp packages_temp/**/upm-ci~/packages/*.tgz upm-ci~/packages @@ -2273,7 +2273,7 @@ test_universal_macos_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~ && mkdir upm-ci~/packages - cp packages_temp/universal/upm-ci~/packages/packages.json upm-ci~/packages - cp packages_temp/**/upm-ci~/packages/*.tgz upm-ci~/packages @@ -2324,7 +2324,7 @@ test_vfx_macos_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~ && mkdir upm-ci~/packages - cp packages_temp/vfx/upm-ci~/packages/packages.json upm-ci~/packages - cp packages_temp/**/upm-ci~/packages/*.tgz upm-ci~/packages @@ -2373,7 +2373,7 @@ test_config_macos_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - mkdir upm-ci~ && mkdir upm-ci~/packages - cp packages_temp/config/upm-ci~/packages/packages.json upm-ci~/packages - cp packages_temp/**/upm-ci~/packages/*.tgz upm-ci~/packages diff --git a/.yamato/_templates.yml b/.yamato/_templates.yml index b556f9a7929..fca63ded22d 100644 --- a/.yamato/_templates.yml +++ b/.yamato/_templates.yml @@ -441,7 +441,7 @@ test_hdrp_template_windows_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - for /r packages_temp %%x in (*.tgz) do copy %%x upm-ci~\packages - copy upm-ci~\packages\*.tgz .Editor\Data\Resources\PackageManager\Editor - upm-ci template test -u .\.Editor --type updated-dependencies-tests --project-path com.unity.template-hd @@ -487,7 +487,7 @@ test_universal_template_windows_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - for /r packages_temp %%x in (*.tgz) do copy %%x upm-ci~\packages - copy upm-ci~\packages\*.tgz .Editor\Data\Resources\PackageManager\Editor - upm-ci template test -u .\.Editor --type updated-dependencies-tests --project-path com.unity.template-universal @@ -537,7 +537,7 @@ test_hdrp_template_macos_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - cp packages_temp/**/upm-ci~/packages/*.tgz upm-ci~/packages - cp ./upm-ci~/packages/*.tgz ./.Editor/Unity.app/Contents/Resources/PackageManager/Editor - upm-ci template test -u $(pwd)/.Editor/Unity.app/Contents/MacOS/Unity --type updated-dependencies-tests --project-path com.unity.template-hd @@ -583,7 +583,7 @@ test_universal_template_macos_CUSTOM-REVISION_dependencies: commands: - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - - unity-downloader-cli -u $CUSTOM_REVISION -c editor --wait --published-only + - unity-downloader-cli --source-file unity_revision.txt -c editor --wait --published-only - cp packages_temp/**/upm-ci~/packages/*.tgz upm-ci~/packages - cp ./upm-ci~/packages/*.tgz ./.Editor/Unity.app/Contents/Resources/PackageManager/Editor - upm-ci template test -u $(pwd)/.Editor/Unity.app/Contents/MacOS/Unity --type updated-dependencies-tests --project-path com.unity.template-universal diff --git a/.yamato/config/__shared.metafile b/.yamato/config/__shared.metafile index 13fb04c4e6b..3331067a206 100644 --- a/.yamato/config/__shared.metafile +++ b/.yamato/config/__shared.metafile @@ -3,12 +3,22 @@ target_branch_editor_ci: ci/editor-pinning # specifies the branch on which edito target_editor: trunk # specifies the target editor used for some package/preview publish jobs editors: # applied for all yml files - track: trunk + name: trunk rerun_strategy: on-new-revision + editor_pinning: True + nightly: True - track: 2020.2 + name: 2020.2 rerun_strategy: on-new-revision + editor_pinning: True + # fast: True + abv_pr: True + nightly: True - track: CUSTOM-REVISION + name: CUSTOM-REVISION rerun_strategy: always - cmd: -u $CUSTOM_REVISION + editor_pinning: False + fast: False platforms: Win: name: Win diff --git a/.yamato/config/_abv.metafile b/.yamato/config/_abv.metafile index 7a732d910cb..9a3b2ba1820 100644 --- a/.yamato/config/_abv.metafile +++ b/.yamato/config/_abv.metafile @@ -1,6 +1,4 @@ abv: # specify the editor versions for which to create the expression trigger for all_project_ci job - trigger_editors: - - 2020.2 projects: - name: Universal - name: ShaderGraph @@ -8,9 +6,6 @@ abv: # specify the editor versions for which to create the expression trigger fo - name: VFX_HDRP - name: VFX_URP nightly: - allowed_editors: # specify the editor versions for which to create nightly jobs - - trunk - - 2020.2 extra_dependencies: # additional project jobs to run nightly (in addition to ABV) - project: Smoke_Test platform: Win diff --git a/.yamato/docs/readme.md b/.yamato/docs/readme.md index d292d26307c..801b0634e59 100644 --- a/.yamato/docs/readme.md +++ b/.yamato/docs/readme.md @@ -45,9 +45,6 @@ The majority of changes are introduced within metafiles (*.yamato/config/\*.meta - Change `target_editor` to the target editor track for this branch (this is used e.g. for dependencies of *packages#publish_*, *preview_publish#publish_* and *preview_publish#wait_for_nightly*) (e.g. for 9.x.x this would correspond to `2020.1`) - Change `target_branch` to the current branch (this is used for ci triggers, such as ABV (*all_project_ci*) jobs) (e.g. for 9.x.x this would correspond to `9.x.x/release`) - Change `target_branch_editor_ci` to the correct ci branch (editor pinning branch) - - In *__abv.metafile* : - - Change `abv.trigger_editors` to the editor against which to trigger the ABV (*all_project_ci*) job (typically `fast-*` editor) (e.g. for 9.x.x this would correspond to `fast-2020.1`) - - Change `nightly.allowed_editors` to contain the editors for which to run nightly (*all_project_ci_nightly*) jobs (e.g. for 9.x.x this would correspond to `2020.1`) - In *__editor.metafile*: - Change `editor_tracks` to correct track (trunk, 2020.1, etc) - In *_packages.metafile*: @@ -157,13 +154,48 @@ target_branch: master # target editor version used for this branch target_editor: trunk -# editors applied for all yml files (overridable) (list) +# editors applied for all yml files (overridable) (bunch of examples) editors: - - version: trunk + # run editor pinning for trunk, and set up a recurrent nightly + - track: trunk + name: trunk #name used in job ids + rerun_strategy: on-new-revision + editor_pinning: True #use editor pinning for this track + nightly: True #run the _Nightly job nightly + + # run editor pinning for 2020.2, and set up a recurrent nightly + - track: 2020.2 + name: 2020.2 + rerun_strategy: on-new-revision + editor_pinning: True + nightly: True + + # don't use editor pinning for 2020.2, use --fast flag with editor priming instead. + # trigger ABV on fast-2020.2 on PRs, but disable the recurrent _Nightly job + - track: 2020.2 + name: fast-2020.2 + rerun_strategy: on-new-revision + editor_pinning: False #don't use editor pinning, let it use editor-priming instead + fast: True #use --fast flag (so get the latest built revision) + abv_pr: True #trigger ABV on PRs (so run fast-2020.2 like before editor pinning) + nightly: False #don't run nightly on this editor + + # don't use editor pinning for 2020.2, use editor priming instead + # don't trigger ABV on latest-2020.2 on PRs, and disable the recurrent _Nightly job + - track: 2020.2 + name: latest-2020.2 + rerun_strategy: on-new-revision + editor_pinning: False + fast: False #don't use --fast flag (get the latest possibly not-build revision) + abv_pr: False #dont trigger ABV on PRs for this editor + nightly: False #dont run nightly for this editor + + # run custom revision as usual (editor priming) + - track: CUSTOM-REVISION + name: CUSTOM-REVISION rerun_strategy: always - cmd: -u trunk # used only by editor job - - ... - + editor_pinning: False #custom revision always has editor pinning as false + fast: False #custom revision always has fast as false # specifies platform details for each platform platforms: Win: @@ -260,16 +292,12 @@ non_project_agents: ### _abv.metafile: contains configurations for ABV jobs ``` abv: # all_project_ci (ABV) job configuration - trigger_editors: # editor(s) for which to create a PR trigger - - fast-trunk projects: # projects to include in ABV by calling All_{project} jobs - name: Universal - name: Universal_Stereo - ... nightly: # all_project_ci_nightly job configuration - allowed_editors: # editor(s) for which to create nightly jobs - - trunk extra_dependencies: # project jobs to run in addition to ABV - project: Universal # use this format to run a specific job platform: Android diff --git a/.yamato/ruamel/build.py b/.yamato/ruamel/build.py index 86bc40bdb6f..5332aa029d5 100644 --- a/.yamato/ruamel/build.py +++ b/.yamato/ruamel/build.py @@ -78,7 +78,7 @@ def get_metafile(metafile_name, unfold_agents_root_keys=[], unfold_test_platform editor_tracks = shared['editors'] latest_editor_versions = {} for editor in editor_tracks: - if str(editor['track']).lower()!='custom-revision': + if editor['editor_pinning']: latest_editor_versions[editor['track']] = yml_load(os.path.join(config_dir,f'_latest_editor_versions_{str(editor["track"])}.metafile')) # create editor diff --git a/.yamato/ruamel/jobs/abv/abv_all_project_ci.py b/.yamato/ruamel/jobs/abv/abv_all_project_ci.py index 865caaa9849..3a29a6ccb06 100644 --- a/.yamato/ruamel/jobs/abv/abv_all_project_ci.py +++ b/.yamato/ruamel/jobs/abv/abv_all_project_ci.py @@ -4,29 +4,29 @@ class ABV_AllProjectCiJob(): - def __init__(self, editor, projects, abv_trigger_editors, target_branch): - self.job_id = abv_job_id_all_project_ci(editor["track"]) - self.yml = self.get_job_definition(editor, projects, abv_trigger_editors, target_branch).get_yml() + def __init__(self, editor, projects, target_branch): + self.job_id = abv_job_id_all_project_ci(editor["name"]) + self.yml = self.get_job_definition(editor, projects, target_branch).get_yml() - def get_job_definition(self, editor, projects, abv_trigger_editors, target_branch): + def get_job_definition(self, editor, projects, target_branch): # define dependencies dependencies = [{ - 'path': f'{projectcontext_filepath()}#{projectcontext_job_id_test_all(editor["track"])}', + 'path': f'{projectcontext_filepath()}#{projectcontext_job_id_test_all(editor["name"])}', 'rerun': editor["rerun_strategy"] }] for project in projects: dependencies.append({ - 'path': f'{project_filepath_all(project["name"])}#{project_job_id_all(project["name"], editor["track"])}', + 'path': f'{project_filepath_all(project["name"])}#{project_job_id_all(project["name"], editor["name"])}', 'rerun': editor["rerun_strategy"]}) # construct job job = YMLJob() - job.set_name(f'_ABV for SRP repository - {editor["track"]}') + job.set_name(f'_ABV for SRP repository - {editor["name"]}') job.add_dependencies(dependencies) job.add_var_custom_revision(editor["track"]) - if editor['track'] in abv_trigger_editors: + if editor.get("abv_pr"): job.set_trigger_on_expression(f'pull_request.target eq "{target_branch}" AND NOT pull_request.draft AND NOT pull_request.push.changes.all match ["**/*.md", "doc/**/*", "**/Documentation*/**/*", ".github/**/*", "Tools/**/*"]') return job \ No newline at end of file diff --git a/.yamato/ruamel/jobs/abv/abv_all_project_ci_nightly.py b/.yamato/ruamel/jobs/abv/abv_all_project_ci_nightly.py index 43c62724150..60a7e709df8 100644 --- a/.yamato/ruamel/jobs/abv/abv_all_project_ci_nightly.py +++ b/.yamato/ruamel/jobs/abv/abv_all_project_ci_nightly.py @@ -4,19 +4,17 @@ class ABV_AllProjectCiNightlyJob(): - def __init__(self, editor, projects, nightly_config, target_branch): - if editor["track"] not in nightly_config["allowed_editors"]: - raise Exception(f'Tried to construct nightly with PR trigger for version {editor["track"]}') - self.job_id = abv_job_id_all_project_ci_nightly(editor["track"]) - self.yml = self.get_job_definition(editor, projects, nightly_config.get("extra_dependencies",[]), target_branch).get_yml() + def __init__(self, editor, test_platforms, nightly_config, target_branch): + self.job_id = abv_job_id_all_project_ci_nightly(editor["name"]) + self.yml = self.get_job_definition(editor,test_platforms, nightly_config.get("extra_dependencies",[]), target_branch).get_yml() - def get_job_definition(self, editor, projects, extra_dependencies, target_branch): + def get_job_definition(self, editor, test_platforms, extra_dependencies, target_branch): # define dependencies dependencies = [ { - 'path': f'{abv_filepath()}#{abv_job_id_all_project_ci(editor["track"])}', + 'path': f'{abv_filepath()}#{abv_job_id_all_project_ci(editor["name"])}', 'rerun': editor["rerun_strategy"]}, # Todo: re-add template tests to the nightly once the publishing issue with upm-ci template test is fixed: # "(There has never been a full release of this package. The major must be 0 or 1.)" @@ -29,17 +27,17 @@ def get_job_definition(self, editor, projects, extra_dependencies, target_branch for dep in extra_dependencies: if dep.get("all"): dependencies.append({ - 'path': f'{project_filepath_all(dep["project"])}#{project_job_id_all(dep["project"], editor["track"])}', + 'path': f'{project_filepath_all(dep["project"])}#{project_job_id_all(dep["project"], editor["name"])}', 'rerun': editor["rerun_strategy"]}) else: for tp in dep["test_platforms"]: dependencies.append({ - 'path': f'{project_filepath_specific(dep["project"], dep["platform"], dep["api"])}#{project_job_id_test(dep["project"], dep["platform"], dep["api"], tp, editor["track"])}', + 'path': f'{project_filepath_specific(dep["project"], dep["platform"], dep["api"])}#{project_job_id_test(dep["project"], dep["platform"], dep["api"], tp, editor["name"])}', 'rerun': editor["rerun_strategy"]}) # construct job job = YMLJob() - job.set_name(f'_Nightly ABV against { editor["track"] }') + job.set_name(f'_Nightly ABV against { editor["name"] }') job.add_dependencies(dependencies) job.add_var_custom_revision(editor["track"]) job.add_trigger_recurrent(target_branch,'0 * * ?') diff --git a/.yamato/ruamel/jobs/abv/abv_trunk_verification.py b/.yamato/ruamel/jobs/abv/abv_trunk_verification.py index 946dbed9758..89f63e7e7be 100644 --- a/.yamato/ruamel/jobs/abv/abv_trunk_verification.py +++ b/.yamato/ruamel/jobs/abv/abv_trunk_verification.py @@ -5,7 +5,7 @@ class ABV_TrunkVerificationJob(): def __init__(self, editor, extra_dependencies): - self.job_id = abv_job_id_trunk_verification(editor["track"]) + self.job_id = abv_job_id_trunk_verification(editor["name"]) self.yml = self.get_job_definition(editor, extra_dependencies).get_yml() @@ -16,17 +16,17 @@ def get_job_definition(self, editor, extra_dependencies): for dep in extra_dependencies: if dep.get("all"): dependencies.append({ - 'path': f'{project_filepath_all(dep["project"])}#{project_job_id_all(dep["project"], editor["track"])}', + 'path': f'{project_filepath_all(dep["project"])}#{project_job_id_all(dep["project"], editor["name"])}', 'rerun': editor["rerun_strategy"]}) else: for tp in dep["test_platforms"]: dependencies.append({ - 'path': f'{project_filepath_specific(dep["project"], dep["platform"], dep["api"])}#{project_job_id_test(dep["project"], dep["platform"], dep["api"], tp, editor["track"])}', + 'path': f'{project_filepath_specific(dep["project"], dep["platform"], dep["api"])}#{project_job_id_test(dep["project"], dep["platform"], dep["api"], tp, editor["name"])}', 'rerun': editor["rerun_strategy"]}) # construct job job = YMLJob() - job.set_name(f'Trunk verification - {editor["track"]}') + job.set_name(f'Trunk verification - {editor["name"]}') job.add_dependencies(dependencies) job.add_var_custom_revision(editor["track"]) return job \ No newline at end of file diff --git a/.yamato/ruamel/jobs/abv/yml_abv.py b/.yamato/ruamel/jobs/abv/yml_abv.py index 1ba522cba43..88c4f311a3c 100644 --- a/.yamato/ruamel/jobs/abv/yml_abv.py +++ b/.yamato/ruamel/jobs/abv/yml_abv.py @@ -8,10 +8,10 @@ def create_abv_ymls(metafile): yml = {} for editor in metafile["editors"]: - job = ABV_AllProjectCiJob(editor, metafile["abv"]["projects"], metafile["abv"]["trigger_editors"], metafile["target_branch"]) + job = ABV_AllProjectCiJob(editor, metafile["abv"]["projects"],metafile["target_branch"]) yml[job.job_id] = job.yml - if editor["track"] in metafile["nightly"]["allowed_editors"]: + if editor.get("nightly"): job = ABV_AllProjectCiNightlyJob(editor, metafile["abv"]["projects"], metafile["nightly"], metafile["target_branch"]) yml[job.job_id] = job.yml diff --git a/.yamato/ruamel/jobs/editor/editor_pinning_merge_all.py b/.yamato/ruamel/jobs/editor/editor_pinning_merge_all.py index abe6a3ba3eb..35947184352 100644 --- a/.yamato/ruamel/jobs/editor/editor_pinning_merge_all.py +++ b/.yamato/ruamel/jobs/editor/editor_pinning_merge_all.py @@ -17,10 +17,10 @@ def get_job_definition(self, editors, agent, target_branch, target_branch_editor dependencies = [] for editor in editors: - if str(editor['track']).lower()=='custom-revision': + if not editor['editor_pinning']: continue - dependencies.append(f'{editor_pinning_filepath()}#{editor_job_id_merge_revisions(editor["track"], abv)}') + dependencies.append(f'{editor_pinning_filepath()}#{editor_job_id_merge_revisions(editor["name"], abv)}') commands = [ f'sudo pip3 install pipenv --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple',# Remove when the image has this preinstalled. diff --git a/.yamato/ruamel/jobs/editor/editor_pinning_merge_revisions.py b/.yamato/ruamel/jobs/editor/editor_pinning_merge_revisions.py index dfd40488082..8d11dd9fab0 100644 --- a/.yamato/ruamel/jobs/editor/editor_pinning_merge_revisions.py +++ b/.yamato/ruamel/jobs/editor/editor_pinning_merge_revisions.py @@ -7,7 +7,7 @@ class Editor_PinningMergeRevisionsJob(): def __init__(self, editor, agent, target_branch, target_branch_editor_ci, abv): - self.job_id = editor_job_id_merge_revisions(editor["track"], abv) + self.job_id = editor_job_id_merge_revisions(editor["name"], abv) self.yml_job = self.get_job_definition(editor, agent, target_branch, target_branch_editor_ci, abv) self.yml = self.yml_job.get_yml() @@ -38,7 +38,7 @@ def get_job_definition(self, editor, agent, target_branch, target_branch_editor_ if abv: job.set_name(f'Merge [{editor["track"]}] revisions to {target_branch} [ABV]') job.allow_failure() - job.add_dependencies([f'{abv_filepath()}#{abv_job_id_all_project_ci(editor["track"])}']) + job.add_dependencies([f'{abv_filepath()}#{abv_job_id_all_project_ci(editor["name"])}']) else: job.set_name(f'Merge [{editor["track"]}] revisions to {target_branch} [no ABV]') diff --git a/.yamato/ruamel/jobs/editor/editor_priming.py b/.yamato/ruamel/jobs/editor/editor_priming.py index 3c502b9481d..42bf7214536 100644 --- a/.yamato/ruamel/jobs/editor/editor_priming.py +++ b/.yamato/ruamel/jobs/editor/editor_priming.py @@ -6,7 +6,7 @@ class Editor_PrimingJob(): def __init__(self, platform, editor, agent): - self.job_id = editor_job_id(editor["track"], platform["os"]) + self.job_id = editor_job_id(editor["name"], platform["os"]) self.yml = self.get_job_definition(platform, editor, agent).get_yml() @@ -21,10 +21,18 @@ def get_job_definition(self, platform, editor, agent): else: platform_os = platform["os"] - editor_cli_rev = VAR_CUSTOM_REVISION if str(editor['track']).lower()=='custom-revision' else editor["track"] + if str(editor['track']).lower()=='custom-revision': + editor_cli_rev = VAR_CUSTOM_REVISION + else: + editor_cli_rev = str(editor["track"]) + if editor.get('fast'): + editor_cli_rev += " --fast" + + + # construct job job = YMLJob() - job.set_name(f'[{editor["track"]},{platform["os"]}] Editor priming') + job.set_name(f'[{editor["name"]},{platform["os"]}] Editor priming') job.set_agent(agent) job.set_skip_checkout(True) job.add_var_custom('PATH', '/home/bokken/bin:/home/bokken/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/home/bokken/.npm-global/bin') diff --git a/.yamato/ruamel/jobs/editor/yml_editor.py b/.yamato/ruamel/jobs/editor/yml_editor.py index 335a5033518..e438d06634d 100644 --- a/.yamato/ruamel/jobs/editor/yml_editor.py +++ b/.yamato/ruamel/jobs/editor/yml_editor.py @@ -15,6 +15,11 @@ def create_editor_yml(metafile): yml = {} for platform in metafile["platforms"]: for editor in metafile['editors']: + # only create editor priming jobs for editor configs which dont use editor_pinning: + # creating them causes no harm, but we just may end up with priming jobs with exactly the same content but different id, causing confusion of what's the difference + if editor['editor_pinning']: + continue + job = Editor_PrimingJob(platform, editor, metafile["editor_priming_agent"]) yml[job.job_id] = job.yml @@ -25,36 +30,38 @@ def create_editor_yml(metafile): #### editor pinning jobs - yml = {} + if any([editor['editor_pinning'] for editor in metafile['editors']]): # only enter this if there exists an track that needs editor pinning + + yml = {} - # sync job - job = Editor_PinningTargetToCIJob(metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"]) - yml[job.job_id] = job.yml + # sync job + job = Editor_PinningTargetToCIJob(metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"]) + yml[job.job_id] = job.yml - job = Editor_PinningUpdateJob(metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"]) - yml[job.job_id] = job.yml + job = Editor_PinningUpdateJob(metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"]) + yml[job.job_id] = job.yml - for editor in metafile['editors']: - if str(editor['track']).lower()=='custom-revision': - continue - - # no ci/abv - job = Editor_PinningMergeRevisionsJob(editor, metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"], abv=False) - yml[job.job_id] = job.yml + for editor in metafile['editors']: + if not editor['editor_pinning']: + continue - # ci + abv flow - job = Editor_PinningMergeRevisionsJob(editor, metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"], abv=True) - yml[job.job_id] = job.yml + # no ci/abv + job = Editor_PinningMergeRevisionsJob(editor, metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"], abv=False) + yml[job.job_id] = job.yml + + # ci + abv flow + job = Editor_PinningMergeRevisionsJob(editor, metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"], abv=True) + yml[job.job_id] = job.yml - # no ci/abv - job = Editor_PinningMergeAllJob(metafile['editors'], metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"], abv=False) - yml[job.job_id] = job.yml + # no ci/abv + job = Editor_PinningMergeAllJob(metafile['editors'], metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"], abv=False) + yml[job.job_id] = job.yml - # ci + abv - job = Editor_PinningMergeAllJob(metafile['editors'], metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"], abv=True) - yml[job.job_id] = job.yml + # ci + abv + job = Editor_PinningMergeAllJob(metafile['editors'], metafile["editor_pin_agent"], metafile["target_branch"], metafile["target_branch_editor_ci"], abv=True) + yml[job.job_id] = job.yml - yml_files[editor_pinning_filepath()] = yml + yml_files[editor_pinning_filepath()] = yml return yml_files \ No newline at end of file diff --git a/.yamato/ruamel/jobs/packages/package_publish_all.py b/.yamato/ruamel/jobs/packages/package_publish_all.py index d8c6a6dfaf4..19c56efd632 100644 --- a/.yamato/ruamel/jobs/packages/package_publish_all.py +++ b/.yamato/ruamel/jobs/packages/package_publish_all.py @@ -14,9 +14,7 @@ def get_job_definition(self, packages, target_branch, agent): # construct job job = YMLJob() job.set_name(f'Publish all packages [package context][manual]') - #job.set_agent(agent) job.add_dependencies([f'{packages_filepath()}#{package_job_id_publish(package["id"])}' for package in packages]) - #job.add_trigger_recurrent(target_branch, 'daily') return job diff --git a/.yamato/ruamel/jobs/packages/package_test.py b/.yamato/ruamel/jobs/packages/package_test.py index 9ba917374b0..2cb69ecdb63 100644 --- a/.yamato/ruamel/jobs/packages/package_test.py +++ b/.yamato/ruamel/jobs/packages/package_test.py @@ -8,7 +8,7 @@ class Package_TestJob(): def __init__(self, package, platform, editor): self.package_id = package["id"] - self.job_id = package_job_id_test(package["id"],platform["os"],editor["track"]) + self.job_id = package_job_id_test(package["id"],platform["os"],editor["name"]) self.yml = self.get_job_definition(package,platform, editor).get_yml() @@ -16,8 +16,8 @@ def get_job_definition(self, package, platform, editor): # define dependencies dependencies = [f'{packages_filepath()}#{package_job_id_pack(dep)}' for dep in package["dependencies"]] - if str(editor['track']).lower() == 'custom-revision': - dependencies.extend([f'{editor_priming_filepath()}#{editor_job_id(editor["track"], platform["os"]) }']) + if not editor['editor_pinning']: + dependencies.extend([f'{editor_priming_filepath()}#{editor_job_id(editor["name"], platform["os"]) }']) # define commands commands = [ @@ -40,7 +40,7 @@ def get_job_definition(self, package, platform, editor): # construct job job = YMLJob() - job.set_name(f'Test { package["name"] } {platform["name"]} {editor["track"]}') + job.set_name(f'Test { package["name"] } {platform["name"]} {editor["name"]}') job.set_agent(platform['agent_package']) job.add_dependencies(dependencies) job.add_commands(commands) diff --git a/.yamato/ruamel/jobs/packages/package_test_all.py b/.yamato/ruamel/jobs/packages/package_test_all.py index f1708866be4..5d86b6ac0dd 100644 --- a/.yamato/ruamel/jobs/packages/package_test_all.py +++ b/.yamato/ruamel/jobs/packages/package_test_all.py @@ -7,7 +7,7 @@ class Package_AllPackageCiJob(): def __init__(self, packages, agent, platforms, target_branch, editor): - self.job_id = package_job_id_test_all(editor["track"]) + self.job_id = package_job_id_test_all(editor["name"]) self.yml = self.get_job_definition(packages, agent, platforms, target_branch, editor).get_yml() @@ -17,12 +17,12 @@ def get_job_definition(self, packages, agent, platforms, target_branch, editor): dependencies = [] for platform in platforms: for package in packages: - dependencies.append(f'{packages_filepath()}#{package_job_id_test(package["id"],platform["os"],editor["track"])}') + dependencies.append(f'{packages_filepath()}#{package_job_id_test(package["id"],platform["os"],editor["name"])}') #dependencies.append(f'{packages_filepath()}#{package_job_id_test_dependencies(package["id"],platform["os"],editor["track"])}') # construct job job = YMLJob() - job.set_name(f'Pack and test all packages - { editor["track"] } [package context]') + job.set_name(f'Pack and test all packages - { editor["name"] } [package context]') job.set_agent(agent) job.add_dependencies(dependencies) job.add_var_custom_revision(editor["track"]) @@ -30,9 +30,6 @@ def get_job_definition(self, packages, agent, platforms, target_branch, editor): f'npm install upm-ci-utils@stable -g --registry {NPM_UPMCI_INSTALL_URL}', f'upm-ci package izon -t', f'upm-ci package izon -d']) - # if editor['track'] == f'fast-{target_editor}': - # # trigger the job when updating the docs to avoid merging jpg images (this is not allowed by the package validation suite) - # job.set_trigger_on_expression(f'pull_request.target eq "{target_branch}" AND NOT pull_request.draft AND pull_request.push.changes.any match ["**/Documentation*/**/*"]') return job \ No newline at end of file diff --git a/.yamato/ruamel/jobs/packages/package_test_dependencies.py b/.yamato/ruamel/jobs/packages/package_test_dependencies.py index 03b4f732b90..97c40e6e221 100644 --- a/.yamato/ruamel/jobs/packages/package_test_dependencies.py +++ b/.yamato/ruamel/jobs/packages/package_test_dependencies.py @@ -1,29 +1,29 @@ from ruamel.yaml.scalarstring import DoubleQuotedScalarString as dss from ..shared.namer import * -from ..shared.constants import PATH_UNITY_REVISION, NPM_UPMCI_INSTALL_URL, UNITY_DOWNLOADER_CLI_URL, get_editor_revision +from ..shared.constants import PATH_UNITY_REVISION, NPM_UPMCI_INSTALL_URL, UNITY_DOWNLOADER_CLI_URL, get_unity_downloader_cli_cmd from ..shared.yml_job import YMLJob class Package_TestDependenciesJob(): def __init__(self, package, platform, editor): self.package_id = package["id"] - self.job_id = package_job_id_test_dependencies(package["id"],platform["os"],editor["track"]) + self.job_id = package_job_id_test_dependencies(package["id"],platform["os"],editor["name"]) self.yml = self.get_job_definition(package,platform, editor).get_yml() def get_job_definition(yml, package, platform, editor): # define dependencies - dependencies = [f'{packages_filepath()}#{package_job_id_test(package["id"],platform["os"],editor["track"])}'] + dependencies = [f'{packages_filepath()}#{package_job_id_test(package["id"],platform["os"],editor["name"])}'] dependencies.extend([f'{packages_filepath()}#{package_job_id_pack(dep)}' for dep in package["dependencies"]]) - if str(editor['track']).lower() == 'custom-revision': - dependencies.extend([f'{editor_priming_filepath()}#{editor_job_id(editor["track"], platform["os"]) }']) + if not editor["editor_pinning"]: + dependencies.extend([f'{editor_priming_filepath()}#{editor_job_id(editor["name"], platform["os"]) }']) # define commands commands = [ f'npm install upm-ci-utils@stable -g --registry {NPM_UPMCI_INSTALL_URL}', f'pip install unity-downloader-cli --index-url {UNITY_DOWNLOADER_CLI_URL} --upgrade', - f'unity-downloader-cli -u { get_editor_revision(editor, platform["os"]) } -c editor --wait --published-only'] + f'unity-downloader-cli { get_unity_downloader_cli_cmd(editor, platform["os"]) } -c editor --wait --published-only'] if package.get('hascodependencies', None) is not None: if platform["os"].lower() == 'windows': commands.append(f'mkdir upm-ci~\\packages') @@ -39,7 +39,7 @@ def get_job_definition(yml, package, platform, editor): # construct job job = YMLJob() - job.set_name(f'Test { package["name"] } {platform["name"]} {editor["track"]} - dependencies') + job.set_name(f'Test { package["name"] } {platform["name"]} {editor["name"]} - dependencies') job.set_agent(platform['agent_package']) job.add_dependencies(dependencies) job.add_commands(commands) diff --git a/.yamato/ruamel/jobs/packages/project_publish_all.py b/.yamato/ruamel/jobs/packages/project_publish_all.py index 0783f83ae0a..0c21e38b9e3 100644 --- a/.yamato/ruamel/jobs/packages/project_publish_all.py +++ b/.yamato/ruamel/jobs/packages/project_publish_all.py @@ -14,9 +14,7 @@ def get_job_definition(self, packages, target_branch, agent): # construct job job = YMLJob() job.set_name(f'Publish all packages [project context][recurrent]') - #job.set_agent(agent) job.add_dependencies([f'{projectcontext_filepath()}#{projectcontext_job_id_publish(package["id"])}' for package in packages]) - # job.add_trigger_recurrent(target_branch, 'daily') return job diff --git a/.yamato/ruamel/jobs/packages/project_test.py b/.yamato/ruamel/jobs/packages/project_test.py index b82c1b85da0..1fe36973092 100644 --- a/.yamato/ruamel/jobs/packages/project_test.py +++ b/.yamato/ruamel/jobs/packages/project_test.py @@ -6,7 +6,7 @@ class Project_TestJob(): def __init__(self, platform, editor): - self.job_id = projectcontext_job_id_test(platform["os"],editor["track"]) + self.job_id = projectcontext_job_id_test(platform["os"],editor["name"]) self.yml = self.get_job_definition(platform, editor).get_yml() @@ -14,8 +14,8 @@ def get_job_definition(self, platform, editor): # define dependencies dependencies = [f'{projectcontext_filepath()}#{projectcontext_job_id_pack()}'] - if str(editor['track']).lower() == 'custom-revision': - dependencies.extend([f'{editor_priming_filepath()}#{editor_job_id(editor["track"], platform["os"]) }']) + if not editor['editor_pinning']: + dependencies.extend([f'{editor_priming_filepath()}#{editor_job_id(editor["name"], platform["os"]) }']) # define commands commands = [ @@ -27,7 +27,7 @@ def get_job_definition(self, platform, editor): # construct job job = YMLJob() - job.set_name(f'Test all packages [project context] {platform["name"]} {editor["track"]}') + job.set_name(f'Test all packages [project context] {platform["name"]} {editor["name"]}') job.set_agent(platform['agent_package']) job.add_dependencies(dependencies) job.add_commands(commands) diff --git a/.yamato/ruamel/jobs/packages/project_test_all.py b/.yamato/ruamel/jobs/packages/project_test_all.py index 1b781c1163a..07b0a18f9bb 100644 --- a/.yamato/ruamel/jobs/packages/project_test_all.py +++ b/.yamato/ruamel/jobs/packages/project_test_all.py @@ -7,7 +7,7 @@ class Project_AllPackageCiJob(): def __init__(self, packages, agent, platforms, target_branch, editor): - self.job_id = projectcontext_job_id_test_all(editor["track"]) + self.job_id = projectcontext_job_id_test_all(editor["name"]) self.yml = self.get_job_definition(packages, agent, platforms, target_branch, editor).get_yml() @@ -16,14 +16,14 @@ def get_job_definition(self, packages, agent, platforms, target_branch, editor): # define dependencies dependencies = [] for platform in platforms: - dependencies.append(f'{projectcontext_filepath()}#{projectcontext_job_id_test(platform["os"],editor["track"])}') + dependencies.append(f'{projectcontext_filepath()}#{projectcontext_job_id_test(platform["os"],editor["name"])}') if str(editor["track"]).lower() == "trunk": dependencies.append(f'{projectcontext_filepath()}#{projectcontext_job_id_test_min_editor(platform["os"])}') #dependencies.append(f'{packages_filepath()}#{package_job_id_test_dependencies(package["id"],platform["os"],editor["track"])}') # construct job job = YMLJob() - job.set_name(f'Pack and test all packages - { editor["track"] } [project context]') + job.set_name(f'Pack and test all packages - { editor["name"]} [project context]') job.set_agent(agent) job.add_dependencies(dependencies) job.add_var_custom_revision(editor["track"]) @@ -31,9 +31,6 @@ def get_job_definition(self, packages, agent, platforms, target_branch, editor): f'npm install upm-ci-utils@stable -g --registry {NPM_UPMCI_INSTALL_URL}', f'upm-ci package izon -t', f'upm-ci package izon -d']) - #if editor['track'] == f'{target_editor}': - # trigger the job when updating the docs to avoid merging jpg images (this is not allowed by the package validation suite) - # job.set_trigger_on_expression(f'pull_request.target eq "{target_branch}" AND NOT pull_request.draft AND pull_request.push.changes.any match ["**/Documentation*/**/*"]') return job \ No newline at end of file diff --git a/.yamato/ruamel/jobs/projects/_project_base.py b/.yamato/ruamel/jobs/projects/_project_base.py index dd6023c4bdd..6b22e8f89b9 100644 --- a/.yamato/ruamel/jobs/projects/_project_base.py +++ b/.yamato/ruamel/jobs/projects/_project_base.py @@ -9,9 +9,9 @@ def _job(project, test_platform_name, editor, platform, api, cmd): # define name if test_platform_name.lower() == 'standalone_build': - job_name = f'Build {project["name"]} on {platform["name"]}_{api["name"]}_Player on version {editor["track"]}' + job_name = f'Build {project["name"]} on {platform["name"]}_{api["name"]}_Player on version {editor["name"]}' else: - job_name = f'{project["name"]} on {platform["name"]}_{api["name"]}_{test_platform_name} on version {editor["track"]}' + job_name = f'{project["name"]} on {platform["name"]}_{api["name"]}_{test_platform_name} on version {editor["name"]}' # define agent platform_agents_project = platform.get(f'agents_project_{api["name"]}', platform.get('agents_project')) @@ -33,11 +33,9 @@ def _job(project, test_platform_name, editor, platform, api, cmd): - dependencies = [{ - 'path' : f'{editor_priming_filepath()}#{editor_job_id(editor["track"], platform["os"])}', - 'rerun' : editor["rerun_strategy"]}] - - if str(editor['track']).lower() == 'custom-revision': - job.add_dependencies(dependencies) + if not editor['editor_pinning']: + job.add_dependencies([{ + 'path' : f'{editor_priming_filepath()}#{editor_job_id(editor["name"], platform["os"])}', + 'rerun' : editor["rerun_strategy"]}]) return job diff --git a/.yamato/ruamel/jobs/projects/project_all.py b/.yamato/ruamel/jobs/projects/project_all.py index c26fafa6026..c053e85d4c5 100644 --- a/.yamato/ruamel/jobs/projects/project_all.py +++ b/.yamato/ruamel/jobs/projects/project_all.py @@ -6,7 +6,7 @@ class Project_AllJob(): def __init__(self, project, editor, dependencies_in_all): self.project = project - self.job_id = project_job_id_all(project, editor["track"]) + self.job_id = project_job_id_all(project, editor["name"]) self.yml = self.get_job_definition(project, editor, dependencies_in_all).get_yml() @@ -19,13 +19,13 @@ def get_job_definition(self, project, editor, dependencies_in_all): if dep.get("all"): dependencies.append({ - 'path': f'{project_filepath_all(project_dep)}#{project_job_id_all(project_dep, editor["track"])}', + 'path': f'{project_filepath_all(project_dep)}#{project_job_id_all(project_dep, editor["name"])}', 'rerun': editor["rerun_strategy"]}) else: for test_platform in dep["test_platforms"]: file = project_filepath_specific(project_dep, dep["platform"], dep["api"]) - job_id = project_job_id_test(project_dep,dep["platform"],dep["api"],test_platform,editor["track"]) + job_id = project_job_id_test(project_dep,dep["platform"],dep["api"],test_platform, editor["name"]) dependencies.append({ 'path' : f'{file}#{job_id}', @@ -33,7 +33,7 @@ def get_job_definition(self, project, editor, dependencies_in_all): # construct job job = YMLJob() - job.set_name(f'All {project} CI - {editor["track"]}') + job.set_name(f'All {project} CI - {editor["name"]}') job.add_dependencies(dependencies) job.add_var_custom_revision(editor["track"]) return job diff --git a/.yamato/ruamel/jobs/projects/project_not_standalone.py b/.yamato/ruamel/jobs/projects/project_not_standalone.py index 6ef37f12506..106baac2ce7 100644 --- a/.yamato/ruamel/jobs/projects/project_not_standalone.py +++ b/.yamato/ruamel/jobs/projects/project_not_standalone.py @@ -8,7 +8,7 @@ class Project_NotStandaloneJob(): def __init__(self, project, editor, platform, api, test_platform): self.project_name = project["name"] - self.job_id = project_job_id_test(project["name"],platform["name"],api["name"],test_platform["name"],editor["track"]) + self.job_id = project_job_id_test(project["name"],platform["name"],api["name"],test_platform["name"], editor["name"]) self.yml = self.get_job_definition(project, editor, platform, api, test_platform).get_yml() diff --git a/.yamato/ruamel/jobs/projects/project_standalone.py b/.yamato/ruamel/jobs/projects/project_standalone.py index af181c51dfc..2e9517d2bc7 100644 --- a/.yamato/ruamel/jobs/projects/project_standalone.py +++ b/.yamato/ruamel/jobs/projects/project_standalone.py @@ -11,7 +11,7 @@ def __init__(self, project, editor, platform, api, test_platform): self.build_job = self.get_StandaloneBuildJob(project, editor, platform, api, test_platform) self.project_name = project["name"] - self.job_id = project_job_id_test(project["name"],platform["name"],api["name"],test_platform["name"],editor["track"]) + self.job_id = project_job_id_test(project["name"],platform["name"],api["name"],test_platform["name"], editor["name"]) self.yml = self.get_job_definition(project, editor, platform, api, test_platform, self.build_job).get_yml() diff --git a/.yamato/ruamel/jobs/projects/project_standalone_build.py b/.yamato/ruamel/jobs/projects/project_standalone_build.py index 897a76826b4..5118e21997b 100644 --- a/.yamato/ruamel/jobs/projects/project_standalone_build.py +++ b/.yamato/ruamel/jobs/projects/project_standalone_build.py @@ -8,7 +8,7 @@ class Project_StandaloneBuildJob(): def __init__(self, project, editor, platform, api, test_platform): self.project_name = project["name"] - self.job_id = project_job_id_build(project["name"],platform["name"],api["name"],editor["track"]) + self.job_id = project_job_id_build(project["name"],platform["name"],api["name"], editor["name"]) self.yml = self.get_job_definition(project, editor, platform, api, test_platform).get_yml() diff --git a/.yamato/ruamel/jobs/projects/yml_project.py b/.yamato/ruamel/jobs/projects/yml_project.py index 305d451249a..3c4179077c7 100644 --- a/.yamato/ruamel/jobs/projects/yml_project.py +++ b/.yamato/ruamel/jobs/projects/yml_project.py @@ -22,8 +22,7 @@ def create_project_ymls(metafile): project = metafile["project"] for platform in metafile['platforms']: for api in platform['apis'] or [""]: - if platform["name"]=='Android': - m=5 + yml = {} for editor in metafile['editors']: for test_platform in metafile['test_platforms']: diff --git a/.yamato/ruamel/jobs/shared/constants.py b/.yamato/ruamel/jobs/shared/constants.py index 474bce36253..6b3afbfd110 100644 --- a/.yamato/ruamel/jobs/shared/constants.py +++ b/.yamato/ruamel/jobs/shared/constants.py @@ -17,6 +17,7 @@ DEFAULT_TIMEOUT = 1200 + def get_editor_revision(editor, platform_os): if str(editor['track']).lower()=='custom-revision': return VAR_CUSTOM_REVISION @@ -30,7 +31,7 @@ def get_unity_downloader_cli_cmd(editor, platform_os, cd=False, git_root=False): '''Returns the revision used by unity-downloader-cli. For custom revision, refers to --source-file flag. If cd, then revision file path is prepended by ../../; if git_root, then its prepended by ~/Graphics/. For normal tracks (not custom revision), retrieves the editor revision from latest_editor_versions file''' - if str(editor["track"]).lower() == 'custom-revision': + if not editor["editor_pinning"]: if cd: return f'--source-file ../../{PATH_UNITY_REVISION}' elif git_root: diff --git a/.yamato/ruamel/jobs/shared/namer.py b/.yamato/ruamel/jobs/shared/namer.py index c466e9ec0b7..12e7ffd9e99 100644 --- a/.yamato/ruamel/jobs/shared/namer.py +++ b/.yamato/ruamel/jobs/shared/namer.py @@ -8,8 +8,8 @@ def editor_priming_filepath(): def editor_pinning_filepath(): return f'{parent_dir}/_editor_pinning.yml'.lower() -def editor_job_id(editor_version, platform_os): - return f'editor:priming:{editor_version}:{platform_os}' +def editor_job_id(editor_name, platform_os): + return f'editor:priming:{editor_name}:{platform_os}' def editor_job_id_test_min_editor(platform_os): return f'editor:priming:test_min_editor:{platform_os}' @@ -30,11 +30,11 @@ def editor_job_id_merge_all(abv): def packages_filepath(): return f'{parent_dir}/_packages.yml'.lower() -def package_job_id_test(package_id, platform_os, editor_version): - return f'test_{ package_id }_{ platform_os }_{editor_version}' +def package_job_id_test(package_id, platform_os, editor_name): + return f'test_{ package_id }_{ platform_os }_{editor_name}' -def package_job_id_test_dependencies(package_id, platform_os, editor_version): - return f'test_{ package_id }_{ platform_os }_{editor_version}_dependencies' +def package_job_id_test_dependencies(package_id, platform_os, editor_name): + return f'test_{ package_id }_{ platform_os }_{editor_name}_dependencies' def package_job_id_pack(package_id): return f'pack_{package_id}' @@ -51,8 +51,8 @@ def package_job_id_publish_all(): def package_job_id_publish_all_tag(): return f'publish_all_tag' -def package_job_id_test_all(editor_version): - return f'all_package_ci_{editor_version}' +def package_job_id_test_all(editor_name): + return f'all_package_ci_{editor_name}' def projectcontext_filepath(): return f'{parent_dir}/_projectcontext.yml'.lower() @@ -60,8 +60,8 @@ def projectcontext_filepath(): def projectcontext_job_id_pack(): return f'pack_all_project' -def projectcontext_job_id_test(platform_os, editor_version): - return f'test_all_project_{ platform_os }_{editor_version}' +def projectcontext_job_id_test(platform_os, editor_name): + return f'test_all_project_{ platform_os }_{editor_name}' def projectcontext_job_id_test_min_editor(platform_os): return f'test_all_project_{ platform_os }_min_editor' @@ -78,8 +78,8 @@ def projectcontext_job_id_publish_all(): def projectcontext_job_id_publish_all_tag(): return f'publish_all_project_tag' -def projectcontext_job_id_test_all(editor_version): - return f'all_package_ci_project_{editor_version}' +def projectcontext_job_id_test_all(editor_name): + return f'all_package_ci_project_{editor_name}' def pb_projectcontext_job_id_promote(package_name): return f'promote_{package_name}_project' @@ -94,17 +94,17 @@ def pb_projectcontext_job_id_promote_all_preview(): def templates_filepath(): return f'{parent_dir}/_templates.yml'.lower() -def template_job_id_test(template_id, platform_os, editor_version): - return f'test_{ template_id }_{ platform_os }_{editor_version}' +def template_job_id_test(template_id, platform_os, editor_name): + return f'test_{ template_id }_{ platform_os }_{editor_name}' -def template_job_id_test_dependencies(template_id, platform_os, editor_version): - return f'test_{ template_id }_{ platform_os }_{editor_version}_dependencies' +def template_job_id_test_dependencies(template_id, platform_os, editor_name): + return f'test_{ template_id }_{ platform_os }_{editor_name}_dependencies' def template_job_id_pack(template_id): return f'pack_{template_id}' -def template_job_id_test_all(editor_version): - return f'all_template_ci_{editor_version}' +def template_job_id_test_all(editor_name): + return f'all_template_ci_{editor_name}' # project specific def project_filepath_specific(project_name, platform_name, api_name): @@ -115,28 +115,28 @@ def project_filepath_all(project_name): # return f'{parent_dir}/{project_name}/all-{project_name}.yml'.lower() return f'{parent_dir}/all-{project_name}.yml'.lower() -def project_job_id_test(project_name, platform_name, api_name, test_platform_name, editor_version): - return f'{project_name}_{platform_name}_{api_name}_{test_platform_name}_{editor_version}'.replace('__','_') +def project_job_id_test(project_name, platform_name, api_name, test_platform_name, editor_name): + return f'{project_name}_{platform_name}_{api_name}_{test_platform_name}_{editor_name}'.replace('__','_') -def project_job_id_build(project_name, platform_name, api_name, editor_version): - return f'Build_{project_name}_{platform_name}_{api_name}_Player_{editor_version}'.replace('__','_') +def project_job_id_build(project_name, platform_name, api_name, editor_name): + return f'Build_{project_name}_{platform_name}_{api_name}_Player_{editor_name}'.replace('__','_') -def project_job_id_all(project_name, editor_version): - return f'All_{project_name}_{ editor_version}' +def project_job_id_all(project_name, editor_name): + return f'All_{project_name}_{ editor_name}' # abv specific def abv_filepath(): return f'{parent_dir}/_abv.yml'.lower() -def abv_job_id_all_project_ci(editor_version): - return f'all_project_ci_{editor_version}' +def abv_job_id_all_project_ci(editor_name): + return f'all_project_ci_{editor_name}' -def abv_job_id_all_project_ci_nightly(editor_version): - return f'all_project_ci_nightly_{editor_version}' +def abv_job_id_all_project_ci_nightly(editor_name): + return f'all_project_ci_nightly_{editor_name}' -def abv_job_id_trunk_verification(editor_version): - return f'trunk_verification_{editor_version}' +def abv_job_id_trunk_verification(editor_name): + return f'trunk_verification_{editor_name}' # preview publish specific diff --git a/.yamato/ruamel/jobs/templates/template_test.py b/.yamato/ruamel/jobs/templates/template_test.py index 3f537d3604b..ae4f6a004dc 100644 --- a/.yamato/ruamel/jobs/templates/template_test.py +++ b/.yamato/ruamel/jobs/templates/template_test.py @@ -6,7 +6,7 @@ class Template_TestJob(): def __init__(self, template, platform, editor): - self.job_id = template_job_id_test(template["id"],platform["os"],editor["track"]) + self.job_id = template_job_id_test(template["id"],platform["os"],editor["name"]) self.yml = self.get_job_definition(template, platform, editor).get_yml() @@ -15,8 +15,8 @@ def get_job_definition(self, template, platform, editor): # define dependencies dependencies = [f'{templates_filepath()}#{template_job_id_pack(template["id"])}'] dependencies.extend([f'{packages_filepath()}#{package_job_id_pack(dep)}' for dep in template["dependencies"]]) - if str(editor['track']).lower() == 'custom-revision': - dependencies.extend([f'{editor_priming_filepath()}#{editor_job_id(editor["track"], platform["os"]) }']) + if not editor['editor_pinning']: + dependencies.extend([f'{editor_priming_filepath()}#{editor_job_id(editor["name"], platform["os"]) }']) # define commands commands = [ @@ -36,7 +36,7 @@ def get_job_definition(self, template, platform, editor): # construct job job = YMLJob() - job.set_name(f'Test { template["name"] } {platform["name"]} {editor["track"]}') + job.set_name(f'Test { template["name"] } {platform["name"]} {editor["name"]}') job.set_agent(platform['agent_package']) job.add_dependencies(dependencies) job.add_commands(commands) diff --git a/.yamato/ruamel/jobs/templates/template_test_dependencies.py b/.yamato/ruamel/jobs/templates/template_test_dependencies.py index fd1f67182a8..98996055821 100644 --- a/.yamato/ruamel/jobs/templates/template_test_dependencies.py +++ b/.yamato/ruamel/jobs/templates/template_test_dependencies.py @@ -1,12 +1,12 @@ from ruamel.yaml.scalarstring import DoubleQuotedScalarString as dss from ..shared.namer import * -from ..shared.constants import PATH_UNITY_REVISION, NPM_UPMCI_INSTALL_URL, UNITY_DOWNLOADER_CLI_URL, get_editor_revision, PATH_PACKAGES_temp +from ..shared.constants import PATH_UNITY_REVISION, NPM_UPMCI_INSTALL_URL, UNITY_DOWNLOADER_CLI_URL, get_unity_downloader_cli_cmd, PATH_PACKAGES_temp from ..shared.yml_job import YMLJob class Template_TestDependenciesJob(): def __init__(self, template, platform, editor): - self.job_id = template_job_id_test_dependencies(template["id"],platform["os"],editor["track"]) + self.job_id = template_job_id_test_dependencies(template["id"],platform["os"],editor["name"]) self.yml = self.get_job_definition(template,platform, editor).get_yml() @@ -15,14 +15,14 @@ def get_job_definition(yml, template, platform, editor): # define dependencies dependencies = [f'{templates_filepath()}#{template_job_id_pack(template["id"])}'] dependencies.extend([f'{packages_filepath()}#{package_job_id_pack(dep)}' for dep in template["dependencies"]]) - if str(editor['track']).lower() == 'custom-revision': - dependencies.extend([f'{editor_priming_filepath()}#{editor_job_id(editor["track"], platform["os"]) }']) + if not editor["editor_pinning"]: + dependencies.extend([f'{editor_priming_filepath()}#{editor_job_id(editor["name"], platform["os"]) }']) # define commands commands = [ f'npm install upm-ci-utils@stable -g --registry {NPM_UPMCI_INSTALL_URL}', f'pip install unity-downloader-cli --index-url {UNITY_DOWNLOADER_CLI_URL} --upgrade', - f'unity-downloader-cli -u {get_editor_revision(editor, platform["os"])} -c editor --wait --published-only'] + f'unity-downloader-cli {get_unity_downloader_cli_cmd(editor, platform["os"])} -c editor --wait --published-only'] if platform["os"].lower() == 'windows': commands.append(f'for /r {PATH_PACKAGES_temp} %%x in (*.tgz) do copy %%x upm-ci~\packages') @@ -36,7 +36,7 @@ def get_job_definition(yml, template, platform, editor): # construct job job = YMLJob() - job.set_name(f'Test { template["name"] } {platform["name"]} {editor["track"]} - dependencies') + job.set_name(f'Test { template["name"] } {platform["name"]} {editor["name"]} - dependencies') job.set_agent(platform['agent_package']) job.add_dependencies(dependencies) job.add_commands(commands) diff --git a/.yamato/ruamel/jobs/templates/test_all.py b/.yamato/ruamel/jobs/templates/test_all.py index a51744dcef5..3df2444abe7 100644 --- a/.yamato/ruamel/jobs/templates/test_all.py +++ b/.yamato/ruamel/jobs/templates/test_all.py @@ -6,7 +6,7 @@ class Template_AllTemplateCiJob(): def __init__(self, templates, agent, platforms, editor): - self.job_id = template_job_id_test_all(editor["track"]) + self.job_id = template_job_id_test_all(editor["name"]) self.yml = self.get_job_definition(templates, agent, platforms, editor).get_yml() @@ -16,12 +16,12 @@ def get_job_definition(self, templates, agent, platforms, editor): dependencies = [] for platform in platforms: for template in templates: - dependencies.append(f'{templates_filepath()}#{template_job_id_test(template["id"],platform["os"],editor["track"])}') - dependencies.append(f'{templates_filepath()}#{template_job_id_test_dependencies(template["id"],platform["os"],editor["track"])}') + dependencies.append(f'{templates_filepath()}#{template_job_id_test(template["id"],platform["os"],editor["name"])}') + dependencies.append(f'{templates_filepath()}#{template_job_id_test_dependencies(template["id"],platform["os"],editor["name"])}') # construct job job = YMLJob() - job.set_name(f'Pack and test all templates - { editor["track"] }') + job.set_name(f'Pack and test all templates - { editor["name"] }') job.set_agent(agent) job.add_dependencies(dependencies) job.add_commands([ diff --git a/.yamato/ruamel/metafile_parser.py b/.yamato/ruamel/metafile_parser.py index b3e11e914ec..4ab0919d41d 100644 --- a/.yamato/ruamel/metafile_parser.py +++ b/.yamato/ruamel/metafile_parser.py @@ -16,7 +16,7 @@ def _get_editors(metafile, shared, latest_editor_versions): '''Retrieves the editors from shared metafile, if not overriden by 'override_editors' in metafile.''' editors = shared['editors'] for editor in editors: - if str(editor['track']).lower() != 'CUSTOM-REVISION'.lower(): + if editor["editor_pinning"]: editor['revisions'] = {} revisions = [{k:v} for k,v in latest_editor_versions[editor['track']]['editor_versions'].items() if str(editor['track']) in k] # get all revisions for this track for rev in revisions: