Skip to content

Commit b57004d

Browse files
committed
project-pack comments
1 parent d16e93e commit b57004d

File tree

1 file changed

+32
-14
lines changed

1 file changed

+32
-14
lines changed

.yamato/project-pack.yml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
1-
{% metadata_file .yamato/project.metafile %}
1+
{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file.
22
---
33

4-
# Jobs that iterate through and packs all NGO projects listed (to use in different jobs)
5-
# For this job no specific platform support and no running Unity instance is required so small agent (as per project.metafile definition) coul be used to save resources and speed up the process
6-
# If everyone adheres to this rule it can create bottlenecks (since everyone would use this machine) so we decided to pack project with the same platform as the given job runs on
7-
{% for project in projects.all -%}
8-
{% for platform in test_platforms.desktop -%}
9-
project_pack_-_{{ project.name }}_{{ platform.name }}:
10-
name: Project Pack - {{ project.name }} [{{ platform.name }}]
4+
# DESCRIPTION--------------------------------------------------------------------------
5+
# Defines project packaging jobs for NGO projects
6+
# These jobs prepare project packages that will be consumed by other pipeline jobs
7+
# While these jobs don't require Unity Editor, they're distributed across platforms to prevent bottlenecks that would occur if all packaging was done on minimal VMs
8+
9+
# CONFIGURATION STRUCTURE--------------------------------------------------------------
10+
# Jobs are generated using nested loops through:
11+
# 1. All NGO projects (from project.metafile)
12+
# 2. Desktop platforms (Windows, Ubuntu, macOS)
13+
# This allows even distribution of packaging workload across different platforms
14+
# Each configuration creates a separate packaging job for better parallelization
15+
16+
# TECHNICAL CONSTRAINTS----------------------------------------------------------------
17+
# - No Unity Editor instance required
18+
# - No specific platform dependencies
19+
# - Could use minimal VM resources but distributed for better throughput
20+
# - Requires npm and upm-ci-utils package
21+
# - Generates artifacts in upm-ci~/packages directory
22+
23+
24+
#--------------------------------------------------------------------------------------
25+
26+
{% for project in projects.all -%} # Jobs are being defined per each project as in project.metafile (testproject, minimalproject, testproject-tools-integration).
27+
{% for platform in test_platforms.desktop -%} # Jobs are being defined per each desktop platform as in project.metafile declaration (Win, Ubuntu, Mac)
28+
project_pack_-_{{ project.name }}_{{ platform.name }}: # This is a job name when querying from code (for example in _run-all.yml). Notice that parts of it will be filled in from for loops. For example there will be a configuration "project_pack_-_testproject_win" and when querying for this job we could for example change some values to get a given job (for example change platform value) and this will query different job configuration.
29+
name: Project Pack - {{ project.name }} [{{ platform.name }}] # This is a job name visible in Yamato (notice that here we also use "generated" fields from for loops
1130
agent:
12-
type: {{ platform.type }}
13-
image: {{ platform.image }}
14-
flavor: {{ platform.flavor }}
31+
type: {{ platform.type }} # Defines type from platform configuration (for example Unity::VM). For packing no GPU extension is needed
32+
image: {{ platform.image }} # Bokken image specification
33+
flavor: {{ platform.flavor }} # Memory/CPU allocation configuration
1534
commands:
16-
- npm install -g upm-ci-utils@stable --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
17-
- upm-ci project pack --project-path {{ project.path }}
35+
- upm-ci project pack --project-path {{ project.path }} # upm-ci version of packing command (will be replaced by upm-pvp in the future)
1836
artifacts:
1937
packages:
2038
paths:
21-
- "upm-ci~/packages/**/*"
39+
- "upm-ci~/packages/**/*" # Generates artifacts in upm-ci~/packages directory
2240
{% endfor -%}
2341
{% endfor -%}

0 commit comments

Comments
 (0)