OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 | 6 |
7 """ | 7 """ |
8 Buildbot steps for src tarball generation and debian package generation | 8 Buildbot steps for src tarball generation and debian package generation |
9 | 9 |
10 Package up the src of the dart repo and create a debian package. | 10 Package up the src of the dart repo and create a debian package. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 print 'Validating that we are on %s' % build_info.builder_tag | 111 print 'Validating that we are on %s' % build_info.builder_tag |
112 args = ['cat', '/etc/os-release'] | 112 args = ['cat', '/etc/os-release'] |
113 (stdout, stderr, exitcode) = bot_utils.run(args) | 113 (stdout, stderr, exitcode) = bot_utils.run(args) |
114 if exitcode != 0: | 114 if exitcode != 0: |
115 print "Could not find linux system, exiting" | 115 print "Could not find linux system, exiting" |
116 sys.exit(1) | 116 sys.exit(1) |
117 | 117 |
118 if build_info.builder_tag == "debian_wheezy": | 118 if build_info.builder_tag == "debian_wheezy": |
119 if not "wheezy" in stdout: | 119 if not "wheezy" in stdout: |
120 print "Trying to build debian bits on a non debian system" | 120 print "Trying to build debian bits on a non debian system" |
| 121 print "You can't fix this, please contact ricow@ or whesse@" |
121 sys.exit(1) | 122 sys.exit(1) |
122 if build_info.builder_tag == "ubuntu_precise": | 123 if build_info.builder_tag == "ubuntu_precise": |
123 if not "precise" in stdout: | 124 if not "precise" in stdout: |
124 print "Trying to build ubuntu bits on a non ubuntu system" | 125 print "Trying to build ubuntu bits on a non ubuntu system" |
| 126 print "You can't fix this, please contact ricow@ or whesse@" |
125 sys.exit(1) | 127 sys.exit(1) |
126 | 128 |
127 with bot.BuildStep('Create src tarball'): | 129 with bot.BuildStep('Create src tarball'): |
128 print 'Building src tarball' | 130 print 'Building src tarball' |
129 Run([sys.executable, './tools/create_tarball.py', | 131 Run([sys.executable, './tools/create_tarball.py', |
130 '--tar_filename', tarfile]) | 132 '--tar_filename', tarfile]) |
131 | 133 |
132 print 'Building Debian packages' | 134 print 'Building Debian packages' |
133 Run([sys.executable, './tools/create_debian_packages.py', | 135 Run([sys.executable, './tools/create_debian_packages.py', |
134 '--tar_filename', tarfile, | 136 '--tar_filename', tarfile, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 bot_name, _ = bot.GetBotName() | 175 bot_name, _ = bot.GetBotName() |
174 channel = bot_utils.GetChannelFromName(bot_name) | 176 channel = bot_utils.GetChannelFromName(bot_name) |
175 if channel != bot_utils.Channel.BLEEDING_EDGE: | 177 if channel != bot_utils.Channel.BLEEDING_EDGE: |
176 ArchiveArtifacts(tarfile, builddir, channel, build_info.builder_tag) | 178 ArchiveArtifacts(tarfile, builddir, channel, build_info.builder_tag) |
177 else: | 179 else: |
178 print 'Not uploading artifacts on bleeding edge' | 180 print 'Not uploading artifacts on bleeding edge' |
179 | 181 |
180 if __name__ == '__main__': | 182 if __name__ == '__main__': |
181 # We pass in None for build_step to avoid building the sdk. | 183 # We pass in None for build_step to avoid building the sdk. |
182 bot.RunBot(SrcConfig, SrcSteps, build_step=None) | 184 bot.RunBot(SrcConfig, SrcSteps, build_step=None) |
OLD | NEW |