-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-pipeline.yml
108 lines (103 loc) · 4.12 KB
/
build-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Copyright (c) 2019 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights
# not expressly granted therein are reserved by Shotgun Software Inc.
parameters:
# List of Python packages that need to be pip installed for testing.
- name: extra_test_dependencies
type: object
default: []
# Version of tk-toolchain to use.
- name: tk_toolchain_ref
type: string
default: master
# List of repositories to clone alongside this repository.
# To clone the tk-framework-shotgunutils's master branch
# and a specific tk-framework-qtwidget ref, you would
# set this parameter to the following:
# - name: tk-framework-shotgunutils
# - name: tk-framework-qtwidgets
# ref: <branch-or-tag>
- name: additional_repositories
type: object
default: []
# Git ref of tk-core to use.
- name: tk_core_ref
type: string
default: master
# Tells the build pipeline that the repository has unit tests to execute
- name: has_unit_tests
type: boolean
default: true
# Post test steps
# This is a list of Azure Pipeline steps that will be inserted
# right after the tests were run.
# If you wanted to run a non-standard suite of test as an extra
# you would specify post_tests_steps as:
# post_tests_steps:
# - bash: do_something
# - bash: do_something_else
- name: post_tests_steps
type: object
default: []
# Version of the release repository to use.
# This is meant for deployment to the Toolkit AppStore. This repository is private
# to the Shotgun team and cannot be accessed by external organizations. This is meant
# for internal use by the team for testing and should not be modified otherwise.
- name: release_repo_ref
type: string
default: master
# Tells the build pipeline that there are resources to validate
- name: has_ui_resources
type: boolean
default: true
# Git ref of tk-ci-tools to use.
- name: tk_ci_tools_ref
type: string
default: master
# This build pipeline will validate the code style and our test suite on
# multiple platforms.
jobs:
- template: "internal/code-style-validation.yml"
parameters:
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
tk_core_ref: ${{ parameters.tk_core_ref }}
# Check PNG profiles
- ${{ if eq(parameters.has_ui_resources, true) }}:
- template: "internal/resources-validation.yml"
parameters:
tk_ci_tools_ref: ${{ parameters.tk_ci_tools_ref }}
- ${{ if eq(parameters.has_unit_tests, true) }}:
- template: "internal/run-tests.yml"
parameters:
# pass through all parameters
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
# If the build was launched because a tag was created, we'll want to deploy
# this to the AppStore.
- ${{ if startsWith( variables['Build.SourceBranch'], 'refs/tags') }}:
# Repositories using our build pipeline outside of the
# shotgunsoftware organization can be tagged, but they can't
# use our deploy scripts as they do not have the necessary
# permissions to access our secrets, as they should.
#
# Therefore, we need to avoid including this template for repos that are
# not under the shotgunsoftware organization.
#
# FIXME: There is no way to tell if an Azure build is running under
# our organization or not. What we can do however is check the name
# of the Azure project from which this build is launched.
- ${{ if eq( variables['System.TeamProject'], 'Toolkit' ) }}:
- template: "internal/release.yml"
parameters:
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
release_repo_ref: ${{ parameters.release_repo_ref }}