218 219 r = Redirect ( path_to_builder ( req, self. The next-most 215 # preferred place is somewhere that the user can see tangible 216 # evidence of their build starting (or to see the reason that it 217 # didn't start). err, "while rebuilding a build" ) 208 # we're at 209 # 210 # Where should we send them? 211 # 212 # Ideally it would be to the per-build page that they just started, 213 # but we don't know the build number for it yet (besides, it might 214 # have to wait for a current build to finish). rebuildBuild ( b, reason, extraProperties ) 207 d. isFinished ( ) ) ) 204 # TODO: indicate an error 205 else : 206 d = bc. msg ( "could not rebuild: bc=%s, isFinished=%s" 203 % ( bc, b. isFinished ( ) or extraProperties is None : 202 log. get ( "comments", ) 198 reason = ( "The web-page 'rebuild' button was pressed by " 199 "'%s': %s\n" % ( name, comments ) ) 200 extraProperties = getAndCheckProperties ( req ) 201 if not bc or not b. msg ( "web rebuild of build %s:%s" % ( builder_name, b. getBuilder ( ) ) : 187 return Redirect ( path_to_authfail ( req ) ) 188 189 # get a control object 190 c = interfaces. actionAllowed ( 'forceBuild', req, self. callback, r ) 182 return DeferredResource ( d ) 183ġ85 # check auth 186 if not self. stopBuild ( reason ) 176 177 # we're at and 178 # we want to go to: 179 r = Redirect ( path_to_builder ( req, self. getName ( ) ) 172 if bldrc : 173 bldc = bldrc. escape ( comments ) ) ) 169 170 c = interfaces. get ( "comments", ) 166 # html-quote both the username and comments, just to be safe 167 reason = ( "The web-page 'stop build' button was pressed by " 168 "'%s': %s\n" % ( html. msg ( "web stopBuild of build %s:%s" % \ 163 ( b. build_status ) : 159 return Redirect ( path_to_authfail ( req ) ) 160 161 b = self. actionAllowed ( 'stopBuild', req, self. render ( ** cxt ) 154ġ56 # check if this is allowed 157 if not auth_ok : 158 if not self. get_template ( "build.html" ) 153 return template. getChanges ( ) 148 149 cxt = path_to_build ( req, b ) 150 cxt = self. formatInterval ( now - start ) 146 147 cxt = ( ss. formatInterval ( end - start ) 143 else : 144 now = util. ctime ( start ) 140 if end : 141 cxt = time. getResponsibleUsers ( ) ) 137 138 ( start, end ) = b. getSlavename ( ) ) ) 90 except KeyError : 91 pass 92 93 cxt = 94 95 for s in b. getProperty ( "got_revision" ) 83 except KeyError : 84 pass 85 if got_revision : 86 cxt = str ( got_revision ) 87 88 try : 89 cxt = path_to_slave ( req, status. changes : 77 cxt = True 78 79 80 got_revision = None 81 try : 82 got_revision = b. childLink ( "tests" ) 73 74 ss = cxt = b. time ( ) when ) ) 68 69 else : 70 cxt = css_classes 71 if b. getETA ( ) 64 if when is not None : 65 cxt = util. isWaitingForLocks ( ) : 60 cxt = "%s " % step. getCurrentStep ( ) 56 if not step : 57 cxt = "" 58 else : 59 if step. setHeader ( 'Cache-Control', 'no-cache' ) 50 51 cxt = b 52 cxt = path_to_builder ( req, b. tests import TestsResource 29 from buildbot import util, interfaces 30 31 32 33 # /builders/$builder/builds/$buildnumĤ7 b = self. ![]() step import StepsResource 28 from buildbot. base import HtmlResource, \ 24 css_classes, path_to_build, path_to_builder, path_to_slave, \ 25 getAndCheckProperties, path_to_authfail 26 27 from buildbot. internet import defer, reactor 20 21 import urllib, time 22 from twisted. util import Redirect, DeferredResource 19 from twisted. 13 # 14 # Copyright Buildbot Team Members 15 16 17 from twisted. 9 # 10 # You should have received a copy of the GNU General Public License along with 11 # this program if not, write to the Free Software Foundation, Inc., 51 12 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the GNU General Public License for more 8 # details. 4 # 5 # This program is distributed in the hope that it will be useful, but WITHOUT 6 # ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS 7 # FOR A PARTICULAR PURPOSE. Buildbot is free software: you can 2 # redistribute it and/or modify it under the terms of the GNU General Public 3 # License as published by the Free Software Foundation, version 2. Source Code for Module 1 # This file is part of Buildbot.
0 Comments
Leave a Reply. |