Welcome to mirror list, hosted at ThFree Co, Russian Federation.

master.cfg « docker « buildbot-lts « build_files - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1dfa8bbdf7c67885b253a5cfae8306c8c99536f8 (plain)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# -*- python -*-
# ex: set filetype=python:

import os

from buildbot.plugins import *

# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory.

# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}

####### WORKERS

# The 'workers' list defines the set of recognized workers. Each element is
# a Worker object, specifying a unique worker name and password.  The same
# worker name and password must be configured on the worker.

c['workers'] = [worker.Worker("lts-worker", 'secret')]

if 'BUILDBOT_MQ_URL' in os.environ:
    c['mq'] = {
        'type' : 'wamp',
        'router_url': os.environ['BUILDBOT_MQ_URL'],
        'realm': os.environ.get('BUILDBOT_MQ_REALM', 'buildbot').decode('utf-8'),
        'debug' : 'BUILDBOT_MQ_DEBUG' in os.environ,
        'debug_websockets' : 'BUILDBOT_MQ_DEBUG' in os.environ,
        'debug_lowlevel' : 'BUILDBOT_MQ_DEBUG' in os.environ,
    }
# 'protocols' contains information about protocols which master will use for
# communicating with workers. You must define at least 'port' option that workers
# could connect to your master with this protocol.
# 'port' must match the value configured into the workers (with their
# --master option)
c['protocols'] = {'pb': {'port': os.environ.get("BUILDBOT_WORKER_PORT", 9989)}}

####### CHANGESOURCES

# the 'change_source' setting tells the buildmaster how it should find out
# about source code changes.  We don't build when sources change.
c['change_source'] = []

####### SCHEDULERS

# Configure the Schedulers, which decide how to react to incoming changes.  In this
# case, just kick off a 'runtests' build

c['schedulers'] = [
    schedulers.ForceScheduler(
        name="build",
        builderNames=["release-blender-283"],
        properties=[
            util.StringParameter(
                name="blender_version",
                label="Version of blender.",
                default="2.83"),
            util.StringParameter(
                name="blender_version_full",
                label="Version of blender (Full).",
                default="2.83.1")
        ]
    ),

    schedulers.Triggerable(
        name="deploy-source-archive",
        builderNames=["deploy-source-archive"]
    ),

    schedulers.Triggerable(
        name="deploy-buildbot-packages",
        builderNames=["deploy-buildbot-packages"]
    ),
]

####### BUILDERS

# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
# what steps, and which workers can execute them.  Note that any particular build will
# only take place on one worker.

deploy_source_archive_factory = util.BuildFactory()
deploy_source_archive_factory.addStep(steps.Git(name="Checkout Blender Source", repourl='https://git.blender.org/blender.git', branch=util.Interpolate('blender-v%(prop:blender_version)s-release'), mode='full'))
deploy_source_archive_factory.addStep(steps.ShellSequence(name="Make source archive", commands=[
    util.ShellArg(command=["make", "source_archive"], logfile='make_source_archive'),
    # The next two shell commands are only needed during development
    util.ShellArg(command=["mv", "blender-2.83.2-beta.tar.xz", util.Interpolate('blender-v%(prop:blender_version_full)s.tar.xz')]),
    util.ShellArg(command=["mv", "blender-2.83.2-beta.tar.xz.md5sum", util.Interpolate('blender-v%(prop:blender_version_full)s.tar.xz.md5sum')]),
]))
deploy_source_archive_factory.addStep(steps.FileUpload(
    name="Upload source archive",
    workersrc=util.Interpolate('blender-v%(prop:blender_version_full)s.tar.xz'),
    masterdest=util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-v%(prop:blender_version_full)s.tar.xz')))
deploy_source_archive_factory.addStep(steps.FileUpload(
    name="Upload source archive checksum",
    workersrc=util.Interpolate('blender-v%(prop:blender_version_full)s.tar.xz.md5sum'),
    masterdest=util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-v%(prop:blender_version_full)s.tar.xz.md5sum')))
deploy_source_archive_factory.addStep(steps.MasterShellCommand(
    name="Upload source archive",
    command=[
        'sh', '-C', '/var/lib/buildbot/bin/upload_file.sh',
        util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-v%(prop:blender_version_full)s.tar.xz'), 
        util.Interpolate('/data/www/vhosts/download.blender.org/ftp/jeroen/')]))
deploy_source_archive_factory.addStep(steps.MasterShellCommand(
    name="Upload windows64.zip build",
    command=[
        'sh', '-C', '/var/lib/buildbot/bin/upload_file.sh',
        util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-v%(prop:blender_version_full)s.tar.xz.md5sum'), 
        util.Interpolate('/data/www/vhosts/download.blender.org/ftp/jeroen/')]))

deploy_buildbot_packages_factory = util.BuildFactory()
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Download linux64 build",
    command=[
        'wget', util.Interpolate('https://builder.blender.org/download/blender-%(prop:blender_version_full)s-linux64.tar.xz'),
        "-O", util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s-linux64.tar.xz')]))
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Download windows64.msi build",
    command=[
        'wget', util.Interpolate('https://builder.blender.org/download/blender-%(prop:blender_version_full)s-windows64.msi'),
        "-O", util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s-windows64.msi')]))
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Download windows64.zip build",
    command=[
        'wget', util.Interpolate('https://builder.blender.org/download/blender-%(prop:blender_version_full)s-windows64.zip'),
        "-O", util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s-windows64.zip')]))
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Download macOS build",
    command=[
        'wget', util.Interpolate('https://builder.blender.org/download/blender-%(prop:blender_version_full)s-macOS.dmg'),
        "-O", util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s-macOS.dmg')]))
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Create checksum (md5/sha256)",
    command=[
        'sh',
        '-C',
        '/var/lib/buildbot/bin/create_checksum.sh',
        util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s-*'),
        util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s'),
]))
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Upload linux64 build",
    command=[
        'sh', '-C', '/var/lib/buildbot/bin/upload_file.sh',
        util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s-linux64.tar.xz'), 
        util.Interpolate('/data/www/vhosts/download.blender.org/ftp/jeroen/')]))
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Upload windows64.msi build",
    command=[
        'sh', '-C', '/var/lib/buildbot/bin/upload_file.sh',
        util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s-windows64.msi'), 
        util.Interpolate('/data/www/vhosts/download.blender.org/ftp/jeroen/')]))
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Upload windows64.zip build",
    command=[
        'sh', '-C', '/var/lib/buildbot/bin/upload_file.sh',
        util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s-windows64.zip'), 
        util.Interpolate('/data/www/vhosts/download.blender.org/ftp/jeroen/')]))
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Upload macOS build",
    command=[
        'sh', '-C', '/var/lib/buildbot/bin/upload_file.sh',
        util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s-macOS.dmg'), 
        util.Interpolate('/data/www/vhosts/download.blender.org/ftp/jeroen/')]))
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Upload md5 checksum",
    command=[
        'sh', '-C', '/var/lib/buildbot/bin/upload_file.sh',
        util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s.md5'), 
        util.Interpolate('/data/www/vhosts/download.blender.org/ftp/jeroen/')]))
deploy_buildbot_packages_factory.addStep(steps.MasterShellCommand(
    name="Upload sha256 checksum",
    command=[
        'sh', '-C', '/var/lib/buildbot/bin/upload_file.sh',
        util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s/blender-%(prop:blender_version_full)s.sha256'), 
        util.Interpolate('/data/www/vhosts/download.blender.org/ftp/jeroen/')]))

factory = util.BuildFactory()
factory.addStep(steps.MasterShellCommand(name="Init release folder", command=["mkdir", "-p", util.Interpolate('/var/lib/buildbot/builds//blender-v%(prop:blender_version_full)s')]))
factory.addStep(steps.Trigger(
    name='Deploy',
    schedulerNames=[
        'deploy-source-archive',
        'deploy-buildbot-packages',
    ],
    waitForFinish=True,
    set_properties={
        'blender_version_full': util.Property('blender_version_full'),
        'blender_version': util.Property('blender_version'),
    }
))

# Download builds from builder.blender.org
c['builders'] = [
    util.BuilderConfig(name="release-blender-283",
      workernames=["lts-worker"],
      factory=factory),
    util.BuilderConfig(name="deploy-source-archive",
      workernames=["lts-worker"],
      factory=deploy_source_archive_factory),
    util.BuilderConfig(name="deploy-buildbot-packages",
      workernames=["lts-worker"],
      factory=deploy_buildbot_packages_factory),
]

####### STATUS TARGETS

# 'status' is a list of Status Targets. The results of each build will be
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
# like IRC bots.

# c['status'] = []

####### PROJECT IDENTITY

# the 'title' string will appear at the top of this buildbot installation's
# home pages (linked to the 'titleURL').

c['title'] = "Blender Release LTS"
c['titleURL'] = "https://www.blender.org/download/lts/"

# the 'buildbotURL' string should point to the location where the buildbot's
# internal web server is visible. This typically uses the port number set in
# the 'www' entry below, but with an externally-visible host name which the
# buildbot cannot figure out without some help.

c['buildbotURL'] = os.environ.get("BUILDBOT_WEB_URL", "http://localhost:8010/")

# minimalistic config to activate new web UI
c['www'] = dict(port=os.environ.get("BUILDBOT_WEB_PORT", 8010),
                plugins=dict(waterfall_view={}, console_view={}))

####### DB URL

c['db'] = {
    # This specifies what database buildbot uses to store its state.  You can leave
    # this at its default for all but the largest installations.
    'db_url' : os.environ.get("BUILDBOT_DB_URL", "sqlite://").format(**os.environ),
}