~om26er/core-snap/improve_build_script

« back to all changes in this revision

Viewing changes to cron-scripts/lp-build-core

  • Committer: Oliver Grawert
  • Date: 2016-10-05 10:33:07 UTC
  • mto: This revision was merged to the branch mainline in revision 49.
  • Revision ID: ogra@ubuntu.com-20161005103307-p8r1s9c1u1x7beow
drop remaining references to ubuntu-core

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
# basic paths
21
21
home = os.getenv("HOME")
22
 
workdir = home+"/ubuntu-core-builds"
 
22
workdir = home+"/core-builds"
23
23
 
24
24
# we need to store credentials once for cronned builds
25
25
cachedir = workdir+"/cache"
29
29
    # send failure mails to defined recipients
30
30
    sender = 'ogra@canonical.com'
31
31
    if buildlog:
32
 
        mailtext = "ubuntu-core {} snap\nBuild requested at {}\nFailed for id: {}\nLink to build log: {}".format(arch, stamp, failure, buildlog)
33
 
    mailtext = "build-ubuntu-core: {} ".format(failure)
 
32
        mailtext = "core {} snap\nBuild requested at {}\nFailed for id: {}\nLink to build log: {}".format(arch, stamp, failure, buildlog)
 
33
    mailtext = "build-core: {} ".format(failure)
34
34
 
35
35
    message = MIMEText(mailtext)
36
 
    message['Subject'] = '%s ubuntu-core snap failed to build !' % arch
 
36
    message['Subject'] = '%s core snap failed to build !' % arch
37
37
    message['From'] = 'Snap Auto Builder <%s>' % sender
38
38
    message['To'] = ", ".join(mailreceivers)
39
39
    try:
49
49
pidfile = workdir+"/build.pid"
50
50
if os.path.isfile(pidfile):
51
51
    print "A pid file %s already exists, it seems like" % pidfile
52
 
    print "there is already a build-ubuntu-core running."
 
52
    print "there is already a lp-build-core running."
53
53
    print "exiting !"
54
54
    sendMail("","","pid exists","")
55
55
    sys.exit()
123
123
        if buildlog != 'None':
124
124
            print(buildlog)
125
125
            arch = str(buildlog).split('_')[4]
126
 
        print("ubuntu-core snap {} build at {} failed for id: {} log: {}".format(arch, stamp, failure, buildlog))
 
126
        print("core snap {} build at {} failed for id: {} log: {}".format(arch, stamp, failure, buildlog))
127
127
        sendMail(arch, stamp, failure, buildlog)
128
128
 
129
129