forked from LuxCoreRender/BlendLuxCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
103 lines (93 loc) · 3.83 KB
/
azure-pipelines.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
# Azure build pipeline script
# Add steps that build, run tests, deploy, and more: https://aka.ms/yaml
# This script processes daily and official releases (alpha/beta/RC and final)
# To trigger an official release, add a commit tagged in the form "blendluxcore_v*"
# The "version_string" after the "_" in the tag is used in following steps
# to generate binary names like "blendluxcore-<version_string>-<platform>-..."
# One, and only one, tag in the form "blendluxcore_v*" is needed,
# otherwise the official release build aborts.
variables:
- group: BuildPipelinesGroup
trigger:
branches:
include:
- '*'
tags:
include:
- 'blendluxcore_v*'
jobs:
- job: DetectBuildType
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu-20.04'
steps:
- task: Bash@3 # Useful for debug only, comment out for normal usage
inputs:
targetType: 'inline'
script: 'env | sort'
displayName: Print environment variables
- script: ./scripts/azurepipeline/detect-release-type.sh
displayName: Detecting release type (daily, alpha, beta or final)
name: setvarStep
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: BlendLuxCore
displayName: 'Upload github_release_title'
condition: eq(variables['System.PullRequest.IsFork'], 'False')
#==========================================================================
# Packaging BlendLuxCore
#==========================================================================
- job: BlendLuxCoreLinux
dependsOn: DetectBuildType
condition: succeeded()
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu-20.04'
variables:
version_string: $[ dependencies.DetectBuildType.outputs['setvarStep.version_string'] ]
steps:
- script: ./scripts/azurepipeline/deps-setup.sh
displayName: Setting up deps
- script: ./scripts/azurepipeline/package.sh
displayName: Packaging BlendLuxCore add-on
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: BlendLuxCore
displayName: 'Upload BlendLuxCore packages'
condition: eq(variables['System.PullRequest.IsFork'], 'False')
#==========================================================================
# Preparing for GitHub release
#==========================================================================
# This job deletes "latest" tag from BlendLuxCore repo, so that it is then
# recreated at the current commit by the following release pipeline
# Runs only if:
# - this is a daily build
# - at least one of the build jobs was successful
# - the pipeline has been triggered by master branch and not by a pull request
- job: DeleteLatestTag
dependsOn:
- DetectBuildType
- BlendLuxCoreLinux
variables:
version_string: $[ dependencies.DetectBuildType.outputs['setvarStep.version_string'] ]
condition: |
and
(
eq(variables['System.PullRequest.IsFork'], 'False'),
eq(variables['Build.SourceBranchName'], 'master'),
eq(dependencies.DetectBuildType.outputs['setvarStep.version_string'], 'latest'),
in(dependencies.BlendLuxCoreLinux.result, 'Succeeded', 'SucceededWithIssues')
)
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu-20.04'
steps:
- task: InstallSSHKey@0
inputs:
hostName: github.com,140.82.118.3 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
sshPublicKey: $(PubKey)
sshKeySecureFile: luxcore_id_rsa
- script: ./scripts/azurepipeline/delete-latest-tag.sh
displayName: Deleting tag to update latest build