Skip to content
Closed
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
21 changes: 21 additions & 0 deletions .yamato/_preview_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ promote_core:
UPMCI_PROMOTION: 1
dependencies:
- .yamato/_packages.yml#pack_core
- .yamato/_preview_publish.yml#publish_core
- .yamato/_packages.yml#test_core_OSX_trunk
- .yamato/_packages.yml#test_core_Win_trunk
commands:
- 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
Expand Down Expand Up @@ -118,6 +121,9 @@ promote_universal:
UPMCI_PROMOTION: 1
dependencies:
- .yamato/_packages.yml#pack_universal
- .yamato/_preview_publish.yml#publish_universal
- .yamato/_packages.yml#test_universal_OSX_trunk
- .yamato/_packages.yml#test_universal_Win_trunk
commands:
- 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
Expand Down Expand Up @@ -153,6 +159,9 @@ promote_hdrp:
UPMCI_PROMOTION: 1
dependencies:
- .yamato/_packages.yml#pack_hdrp
- .yamato/_preview_publish.yml#publish_hdrp
- .yamato/_packages.yml#test_hdrp_OSX_trunk
- .yamato/_packages.yml#test_hdrp_Win_trunk
commands:
- 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
Expand Down Expand Up @@ -188,6 +197,9 @@ promote_shadergraph:
UPMCI_PROMOTION: 1
dependencies:
- .yamato/_packages.yml#pack_shadergraph
- .yamato/_preview_publish.yml#publish_shadergraph
- .yamato/_packages.yml#test_shadergraph_OSX_trunk
- .yamato/_packages.yml#test_shadergraph_Win_trunk
commands:
- 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
Expand Down Expand Up @@ -223,6 +235,9 @@ promote_vfx:
UPMCI_PROMOTION: 1
dependencies:
- .yamato/_packages.yml#pack_vfx
- .yamato/_preview_publish.yml#publish_vfx
- .yamato/_packages.yml#test_vfx_OSX_trunk
- .yamato/_packages.yml#test_vfx_Win_trunk
commands:
- 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
Expand Down Expand Up @@ -258,6 +273,9 @@ promote_config:
UPMCI_PROMOTION: 1
dependencies:
- .yamato/_packages.yml#pack_config
- .yamato/_preview_publish.yml#publish_config
- .yamato/_packages.yml#test_config_OSX_trunk
- .yamato/_packages.yml#test_config_Win_trunk
commands:
- 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
Expand Down Expand Up @@ -293,6 +311,9 @@ promote_lwrp:
UPMCI_PROMOTION: 1
dependencies:
- .yamato/_packages.yml#pack_lwrp
- .yamato/_preview_publish.yml#publish_lwrp
- .yamato/_packages.yml#test_lwrp_OSX_trunk
- .yamato/_packages.yml#test_lwrp_Win_trunk
commands:
- 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
Expand Down
2 changes: 1 addition & 1 deletion .yamato/ruamel/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def create_preview_publish_jobs(metafile_name):
job = PreviewPublish_PublishJob(get_agent(metafile["agent_publish"]), package, metafile["platforms"], target_editor)
yml[job.job_id] = job.yml

job = PreviewPublish_PromoteJob(get_agent(metafile["agent_promote"]), package)
job = PreviewPublish_PromoteJob(get_agent(metafile["agent_promote"]), package, metafile["platforms"], target_editor)
yml[job.job_id] = job.yml

dump_yml(pb_filepath(), yml)
Expand Down
15 changes: 11 additions & 4 deletions .yamato/ruamel/jobs/preview_publish/pb_promote.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,29 @@

class PreviewPublish_PromoteJob():

def __init__(self, agent, package):
def __init__(self, agent, package, platforms, target_editor):
self.job_id = pb_job_id_promote(package["name"])
self.yml = self.get_job_definition(agent, package).get_yml()
self.yml = self.get_job_definition(agent, package, platforms, target_editor).get_yml()


def get_job_definition(self, agent, package):
def get_job_definition(self, agent, package, platforms, target_editor):

if package["publish_source"] != True:
raise Exception('Tried to promote package for which "publish_source" set to false.')

dependencies = [
f'{packages_filepath()}#{package_job_id_pack(package["name"])}',
f'{pb_filepath()}#{pb_job_id_publish(package["name"])}']

for platform in platforms:
dependencies.append(f'{packages_filepath()}#{package_job_id_test(package["name"], platform["os"], target_editor)}')

# construct job
job = YMLJob()
job.set_name(f'[{package["name"]}] Production Promote')
job.set_agent(agent)
job.add_var_custom('UPMCI_PROMOTION', 1)
job.add_dependencies([f'{packages_filepath()}#{package_job_id_pack(package["name"])}'])
job.add_dependencies(dependencies)
job.add_commands([
f'npm install upm-ci-utils@stable -g --registry {NPM_UPMCI_INSTALL_URL}',
f'upm-ci {package["type"]} promote --{package["type"]}-path {package["path"]}'])
Expand Down