Skip to content

Commit d299a3e

Browse files
author
Mark Visser
authored
added promotion.yml, matched package-starter-kit upm-ci.yml (#480)
1 parent f26e9e5 commit d299a3e

File tree

2 files changed

+108
-34
lines changed

2 files changed

+108
-34
lines changed

.yamato/promotion.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
test_editors:
2+
- version: 2018.3
3+
- version: 2019.1
4+
- version: 2019.2
5+
- version: trunk
6+
test_platforms:
7+
- name: win
8+
type: Unity::VM
9+
image: package-ci/win10:stable
10+
flavor: b1.medium
11+
- name: mac
12+
type: Unity::VM::osx
13+
image: buildfarm/mac:stable
14+
flavor: m1.mac
15+
---
16+
{% for editor in test_editors %}
17+
{% for platform in test_platforms %}
18+
promotion_test_{{ platform.name }}_{{ editor.version }}:
19+
name : Promotion Test {{ editor.version }} on {{ platform.name }}
20+
agent:
21+
type: {{ platform.type }}
22+
image: {{ platform.image }}
23+
flavor: {{ platform.flavor}}
24+
variables:
25+
UPMCI_PROMOTION: 1
26+
commands:
27+
- npm install upm-ci-utils@latest -g --registry https://api.bintray.com/npm/unity/unity-npm
28+
- upm-ci package test --unity-version {{ editor.version }}
29+
artifacts:
30+
logs:
31+
paths:
32+
- "upm-ci~/test-results/**/*"
33+
dependencies:
34+
- .yamato/upm-ci.yml#pack
35+
{% endfor %}
36+
{% endfor %}
37+
38+
promotion_test_trigger:
39+
name: Promotion Tests Trigger
40+
agent:
41+
type: Unity::VM
42+
image: package-ci/win10:stable
43+
flavor: b1.small
44+
artifacts:
45+
logs:
46+
paths:
47+
- "upm-ci~/test-results/**/*"
48+
packages:
49+
paths:
50+
- "upm-ci~/packages/**/*"
51+
dependencies:
52+
{% for editor in test_editors %}
53+
{% for platform in test_platforms %}
54+
- .yamato/promotion.yml#promotion_test_{{platform.name}}_{{editor.version}}
55+
{% endfor %}
56+
{% endfor %}
57+
58+
promote:
59+
name: Promote to Production
60+
agent:
61+
type: Unity::VM
62+
image: package-ci/win10:stable
63+
flavor: b1.small
64+
variables:
65+
UPMCI_PROMOTION: 1
66+
commands:
67+
- npm install upm-ci-utils@latest -g --registry https://api.bintray.com/npm/unity/unity-npm
68+
- upm-ci package promote
69+
triggers:
70+
tags:
71+
only:
72+
- /^(r|R)elease-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
73+
artifacts:
74+
artifacts:
75+
paths:
76+
- "upm-ci~/packages/*.tgz"
77+
dependencies:
78+
- .yamato/upm-ci.yml#pack
79+
{% for editor in test_editors %}
80+
{% for platform in test_platforms %}
81+
- .yamato/promotion.yml#promotion_test_{{ platform.name }}_{{ editor.version }}
82+
{% endfor %}
83+
{% endfor %}

.yamato/upm-ci.yml

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ platforms:
66
- name: win
77
type: Unity::VM
88
image: package-ci/win10:stable
9-
flavor: m1.large
9+
flavor: b1.medium
1010
- name: mac
1111
type: Unity::VM::osx
1212
image: buildfarm/mac:stable
@@ -17,18 +17,16 @@ pack:
1717
agent:
1818
type: Unity::VM
1919
image: package-ci/ubuntu:latest
20-
flavor: m1.large
20+
flavor: b1.small
2121
commands:
2222
- ./build.sh
23-
- npm install -g upm-ci-utils@latest --registry https://api.bintray.com/npm/unity/unity-npm
23+
- npm install -g upm-ci-utils@stable --registry https://api.bintray.com/npm/unity/unity-npm
2424
- upm-ci package pack --package-path com.unity.formats.fbx
2525
artifacts:
2626
packages:
2727
paths:
28-
- "upm-ci~/packages/**/*"
29-
build:
30-
paths:
31-
- "com.unity.formats.fbx/*"
28+
- "upm-ci~/**/*"
29+
3230

3331
{% for editor in editors %}
3432
{% for platform in platforms %}
@@ -39,18 +37,15 @@ test_{{ platform.name }}_{{ editor.version }}:
3937
image: {{ platform.image }}
4038
flavor: {{ platform.flavor}}
4139
commands:
42-
- git clone --branch dev --single-branch [email protected]:upm-packages/project-templates/upm-template-utils.git upm-ci-utils
43-
- npm install upm-ci-utils/ -g
40+
- npm install -g upm-ci-utils@stable --registry https://api.bintray.com/npm/unity/unity-npm
4441
- upm-ci package test --unity-version {{ editor.version }} --package-path com.unity.formats.fbx
4542
artifacts:
46-
logs.zip:
43+
logs:
4744
paths:
48-
- "upm-ci~/logs/**/*"
4945
- "upm-ci~/test-results/**/*"
50-
artifacts.zip:
46+
packages:
5147
paths:
5248
- "upm-ci~/packages/**/*"
53-
- "upm-ci~/templates/**/*"
5449
dependencies:
5550
- .yamato/upm-ci.yml#pack
5651
{% endfor %}
@@ -61,7 +56,7 @@ test_trigger:
6156
agent:
6257
type: Unity::VM
6358
image: package-ci/win10:stable
64-
flavor: m1.large
59+
flavor: b1.small
6560
commands:
6661
- dir
6762
triggers:
@@ -79,37 +74,33 @@ test_trigger:
7974
- "upm-ci~/packages/**/*"
8075
dependencies:
8176
- .yamato/upm-ci.yml#pack
82-
{% for editor in editors %}
83-
{% for platform in platforms %}
77+
{% for editor in editors %}
78+
{% for platform in platforms %}
8479
- .yamato/upm-ci.yml#test_{{platform.name}}_{{editor.version}}
85-
{% endfor %}
86-
{% endfor %}
80+
{% endfor %}
81+
{% endfor %}
8782

8883
publish:
89-
name: Publish
84+
name: Publish to Internal Registry
9085
agent:
9186
type: Unity::VM
92-
image: package-ci/win10:latest
93-
flavor: m1.large
94-
name: Runner
87+
image: package-ci/win10:stable
88+
flavor: b1.small
9589
commands:
96-
- npm install upm-ci-utils -g --registry https://api.bintray.com/npm/unity/unity-npm
90+
- npm install upm-ci-utils@stable -g --registry https://api.bintray.com/npm/unity/unity-npm
9791
- upm-ci package publish
9892
triggers:
9993
tags:
10094
only:
101-
- /^(v|V)[0-9]+.[0-9]+.[0-9]+/
95+
- /^(r|R)(c|C)-\d+\.\d+\.\d+(-preview(\.\d+)?)?$/
10296
artifacts:
103-
logs.zip:
104-
paths:
105-
- "upm-ci~/logs/**/*"
106-
- "upm-ci~/test-results/**/*"
107-
Package.zip:
97+
artifacts:
10898
paths:
109-
- "upm-ci~/package/*.tgz"
99+
- "upm-ci~/packages/*.tgz"
110100
dependencies:
111-
{% for editor in editors %}
112-
{% for platform in platforms %}
101+
- .yamato/upm-ci.yml#pack
102+
{% for editor in test_editors %}
103+
{% for platform in test_platforms %}
113104
- .yamato/upm-ci.yml#test_{{ platform.name }}_{{ editor.version }}
114-
{% endfor %}
115-
{% endfor %}
105+
{% endfor %}
106+
{% endfor %}

0 commit comments

Comments
 (0)