Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
279 changes: 265 additions & 14 deletions .yamato/_packages.yml

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions .yamato/_preview_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ promote_core:
- .yamato/_packages.yml#test_core_windows_trunk
- .yamato/_packages.yml#test_core_macos_trunk
commands:
- copy packages_temp\core\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.render-pipelines.core
artifacts:
Expand Down Expand Up @@ -141,6 +142,7 @@ promote_core_dry:
- .yamato/_packages.yml#test_core_windows_trunk
- .yamato/_packages.yml#test_core_macos_trunk
commands:
- copy packages_temp\core\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.render-pipelines.core --dry-run
artifacts:
Expand All @@ -161,6 +163,7 @@ promote_universal:
- .yamato/_packages.yml#test_universal_windows_trunk
- .yamato/_packages.yml#test_universal_macos_trunk
commands:
- copy packages_temp\universal\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.render-pipelines.universal
artifacts:
Expand Down Expand Up @@ -221,6 +224,7 @@ promote_universal_dry:
- .yamato/_packages.yml#test_universal_windows_trunk
- .yamato/_packages.yml#test_universal_macos_trunk
commands:
- copy packages_temp\universal\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.render-pipelines.universal --dry-run
artifacts:
Expand All @@ -241,6 +245,7 @@ promote_hdrp:
- .yamato/_packages.yml#test_hdrp_windows_trunk
- .yamato/_packages.yml#test_hdrp_macos_trunk
commands:
- copy packages_temp\hdrp\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.render-pipelines.high-definition
artifacts:
Expand Down Expand Up @@ -301,6 +306,7 @@ promote_hdrp_dry:
- .yamato/_packages.yml#test_hdrp_windows_trunk
- .yamato/_packages.yml#test_hdrp_macos_trunk
commands:
- copy packages_temp\hdrp\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.render-pipelines.high-definition --dry-run
artifacts:
Expand All @@ -321,6 +327,7 @@ promote_shadergraph:
- .yamato/_packages.yml#test_shadergraph_windows_trunk
- .yamato/_packages.yml#test_shadergraph_macos_trunk
commands:
- copy packages_temp\shadergraph\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.shadergraph
artifacts:
Expand Down Expand Up @@ -381,6 +388,7 @@ promote_shadergraph_dry:
- .yamato/_packages.yml#test_shadergraph_windows_trunk
- .yamato/_packages.yml#test_shadergraph_macos_trunk
commands:
- copy packages_temp\shadergraph\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.shadergraph --dry-run
artifacts:
Expand All @@ -401,6 +409,7 @@ promote_vfx:
- .yamato/_packages.yml#test_vfx_windows_trunk
- .yamato/_packages.yml#test_vfx_macos_trunk
commands:
- copy packages_temp\vfx\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.visualeffectgraph
artifacts:
Expand Down Expand Up @@ -461,6 +470,7 @@ promote_vfx_dry:
- .yamato/_packages.yml#test_vfx_windows_trunk
- .yamato/_packages.yml#test_vfx_macos_trunk
commands:
- copy packages_temp\vfx\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.visualeffectgraph --dry-run
artifacts:
Expand All @@ -481,6 +491,7 @@ promote_config:
- .yamato/_packages.yml#test_config_windows_trunk
- .yamato/_packages.yml#test_config_macos_trunk
commands:
- copy packages_temp\config\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.render-pipelines.high-definition-config
artifacts:
Expand Down Expand Up @@ -541,6 +552,7 @@ promote_config_dry:
- .yamato/_packages.yml#test_config_windows_trunk
- .yamato/_packages.yml#test_config_macos_trunk
commands:
- copy packages_temp\config\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.render-pipelines.high-definition-config --dry-run
artifacts:
Expand All @@ -561,6 +573,7 @@ promote_lwrp:
- .yamato/_packages.yml#test_lwrp_windows_trunk
- .yamato/_packages.yml#test_lwrp_macos_trunk
commands:
- copy packages_temp\lwrp\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.render-pipelines.lightweight
artifacts:
Expand Down Expand Up @@ -621,6 +634,7 @@ promote_lwrp_dry:
- .yamato/_packages.yml#test_lwrp_windows_trunk
- .yamato/_packages.yml#test_lwrp_macos_trunk
commands:
- copy packages_temp\lwrp\upm-ci~\packages\packages.json upm-ci~\packages
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
- upm-ci package promote --package-path com.unity.render-pipelines.lightweight --dry-run
artifacts:
Expand Down
7 changes: 4 additions & 3 deletions .yamato/ruamel/jobs/packages/package_pack.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from ruamel.yaml.scalarstring import DoubleQuotedScalarString as dss
from ..shared.namer import package_job_id_pack
from ..shared.yml_job import YMLJob
from ..shared.constants import NPM_UPMCI_INSTALL_URL
from ..shared.constants import NPM_UPMCI_INSTALL_URL, PATH_PACKAGES_temp

class Package_PackJob():

Expand All @@ -19,8 +19,9 @@ def get_job_definition(self, package, agent):
job.set_agent(agent)
job.add_commands( [
f'npm install upm-ci-utils@stable -g --registry {NPM_UPMCI_INSTALL_URL}',
f'upm-ci package pack --package-path {package["packagename"]}'])
job.add_artifacts_packages()
f'mkdir {PATH_PACKAGES_temp}\\{package["id"]}',
f'upm-ci package pack --package-path {package["packagename"]} --artifacts-path {PATH_PACKAGES_temp}/{package["id"]}'])
job.add_artifacts_packages(package_id=package["id"])
return job


4 changes: 3 additions & 1 deletion .yamato/ruamel/jobs/packages/package_publish.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from ruamel.yaml.scalarstring import DoubleQuotedScalarString as dss
from ..shared.namer import package_job_id_publish, packages_filepath, package_job_id_pack, package_job_id_test
from ..shared.yml_job import YMLJob
from ..shared.constants import NPM_UPMCI_INSTALL_URL
from ..shared.constants import NPM_UPMCI_INSTALL_URL,PATH_PACKAGES_temp

class Package_PublishJob():

Expand All @@ -23,6 +23,8 @@ def get_job_definition(self, package, agent, platforms, target_editor):
job.set_agent(agent)
job.add_dependencies(dependencies)
job.add_commands([
f'mkdir upm-ci~\\packages',
f'copy {PATH_PACKAGES_temp}\\{package["id"]}\\upm-ci~\\packages\\* upm-ci~\\packages',
f'npm install upm-ci-utils@stable -g --registry {NPM_UPMCI_INSTALL_URL}',
f'upm-ci package publish --package-path {package["packagename"]}'])
job.add_artifacts_packages()
Expand Down
12 changes: 11 additions & 1 deletion .yamato/ruamel/jobs/packages/package_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
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
from ..shared.constants import PATH_UNITY_REVISION, NPM_UPMCI_INSTALL_URL, UNITY_DOWNLOADER_CLI_URL,PATH_PACKAGES_temp
from ..shared.yml_job import YMLJob


class Package_TestJob():

def __init__(self, package, platform, editor):
Expand All @@ -24,6 +25,15 @@ def get_job_definition(self, package, platform, editor):
f'pip install unity-downloader-cli --index-url {UNITY_DOWNLOADER_CLI_URL} --upgrade',
f'unity-downloader-cli --source-file {PATH_UNITY_REVISION} -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')
commands.append(f'copy {PATH_PACKAGES_temp}\\{package["id"]}\\upm-ci~\\packages\\packages.json upm-ci~\\packages')
commands.append(f'for /r {PATH_PACKAGES_temp} %%x in (*.tgz) do copy %%x upm-ci~\packages')
elif platform["os"].lower() == 'macos':
commands.append(f'mkdir upm-ci~ && mkdir upm-ci~/packages')
commands.append(f'cp {PATH_PACKAGES_temp}/{package["id"]}/upm-ci~/packages/packages.json upm-ci~/packages')
commands.append(f'cp {PATH_PACKAGES_temp}/**/upm-ci~/packages/*.tgz upm-ci~/packages')
commands.append(platform["copycmd"])
commands.append(f'upm-ci package test -u {platform["editorpath"]} --package-path {package["packagename"]} --extra-utr-arg="--compilation-errors-as-warnings"')

Expand Down
8 changes: 8 additions & 0 deletions .yamato/ruamel/jobs/packages/package_test_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ def get_job_definition(yml, package, platform, editor):
f'pip install unity-downloader-cli --index-url {UNITY_DOWNLOADER_CLI_URL} --upgrade',
f'unity-downloader-cli --source-file {PATH_UNITY_REVISION} -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')
commands.append(f'copy packages_temp\\{package["id"]}\\upm-ci~\\packages\\packages.json upm-ci~\\packages')
commands.append(f'for /r packages_temp %%x in (*.tgz) do copy %%x upm-ci~\packages')
elif platform["os"].lower() == 'macos':
commands.append(f'mkdir upm-ci~ && mkdir upm-ci~/packages')
commands.append(f'cp packages_temp/{package["id"]}/upm-ci~/packages/packages.json upm-ci~/packages')
commands.append(f'cp packages_temp/**/upm-ci~/packages/*.tgz upm-ci~/packages')
commands.append(platform["copycmd"])
commands.append(f'upm-ci package test -u {platform["editorpath"]} --type updated-dependencies-tests --package-path {package["packagename"]}')

Expand Down
3 changes: 2 additions & 1 deletion .yamato/ruamel/jobs/preview_publish/pb_promote.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from ruamel.yaml.scalarstring import DoubleQuotedScalarString as dss
from ..shared.namer import *
from ..shared.yml_job import YMLJob
from ..shared.constants import NPM_UPMCI_INSTALL_URL
from ..shared.constants import NPM_UPMCI_INSTALL_URL,PATH_PACKAGES_temp

class PreviewPublish_PromoteJob():

Expand Down Expand Up @@ -33,6 +33,7 @@ def get_job_definition(self, agent, package, platforms, target_editor, dry_run):
job.add_var_custom('UPMCI_PROMOTION', 1)
job.add_dependencies(dependencies)
job.add_commands([
f'copy {PATH_PACKAGES_temp}\\{package["name"]}\\upm-ci~\\packages\\packages.json upm-ci~\\packages',
f'npm install upm-ci-utils@stable -g --registry {NPM_UPMCI_INSTALL_URL}',
f'upm-ci {package["type"]} promote --{package["type"]}-path {package["path"]}'])
job.add_artifacts_packages()
Expand Down
3 changes: 2 additions & 1 deletion .yamato/ruamel/jobs/shared/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
PATH_TEST_RESULTS = 'test-results'
PATH_TEST_RESULTS_padded = '**/test-results/**'
PATH_PACKAGES = 'upm-ci~/packages/**/*'
PATH_PACKAGES_temp = 'packages_temp' # used in combination with packages_temp\\[packageid] followed by PATH_PACKAGES to have unique artifact paths
PATH_TEMPLATES = 'upm-ci~/templates/**/*'
PATH_UNITY_REVISION = 'unity_revision.txt'
PATH_PLAYERS_padded = 'players/**'
PATH_PLAYERS = 'players'
NPM_UPMCI_INSTALL_URL = 'https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm'
UTR_INSTALL_URL = 'https://artifactory.internal.unity3d.com/core-automation/tools/utr-standalone/utr'
UNITY_DOWNLOADER_CLI_URL = 'https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple'
UNITY_DOWNLOADER_CLI_URL = 'https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple'
9 changes: 6 additions & 3 deletions .yamato/ruamel/jobs/shared/yml_job.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .constants import VAR_UPM_REGISTRY, PATH_TEST_RESULTS_padded, PATH_PLAYERS_padded, PATH_PACKAGES, PATH_UNITY_REVISION, PATH_TEMPLATES
from .constants import VAR_UPM_REGISTRY, PATH_TEST_RESULTS_padded, PATH_PLAYERS_padded, PATH_PACKAGES, PATH_UNITY_REVISION, PATH_TEMPLATES, PATH_PACKAGES_temp
from ruamel.yaml.scalarstring import DoubleQuotedScalarString as dss
from collections import defaultdict
import pickle
Expand Down Expand Up @@ -61,8 +61,11 @@ def add_artifacts_test_results(self):
def add_artifacts_players(self):
self.yml['artifacts']['players']['paths'].append(dss(PATH_PLAYERS_padded))

def add_artifacts_packages(self):
self.yml['artifacts']['packages']['paths'].append(dss(PATH_PACKAGES))
def add_artifacts_packages(self,package_id=None):
if package_id is not None:
self.yml['artifacts']['packages']['paths'].append(dss(f'{PATH_PACKAGES_temp}/{package_id}/{PATH_PACKAGES}'))
else:
self.yml['artifacts']['packages']['paths'].append(dss(PATH_PACKAGES))

def add_artifacts_templates(self):
self.yml['artifacts']['packages']['paths'].append(dss(PATH_TEMPLATES))
Expand Down