Пример #1
0
        # check whether we can start the build.py script
        # i.e. whether another instance isn't already running
        if run():
            print "Building staging..."
            backend.build(source, staging_build, root, initiator)
            backend.create_staging(staging_build, production_path, build_path)
        else:
            print "Script is already running... setting repeat flag to staging..."
            # set_repeat('staging')
            queue.push(initiator, prerelease)
            exit()
    else:
        if run():
            print "Building production..."
            backend.build(source, register_path, root, initiator)
            backend.create_production(register_path, backups,
                                      script_entry_path, production_path)
        else:
            print "Script is already running... setting repeat flag to production..."
            # set_repeat('production')
            queue.push(initiator, prerelease)
            exit()

# check whether we need to run script once more
# repeat = get_repeat()

# while repeat != 'none':

while len(queue) > 0:
    initiator, prerelease = queue.pop()

    if prerelease == True:
Пример #2
0
        # check whether we can start the build.py script
        # i.e. whether another instance isn't already running
        if run():
            print "Building staging..."
            build(source, staging_build, root, initiator)
            backend.create_staging(staging_build)
        else:
            print "Script is already running... setting repeat flag to staging..."
            # set_repeat('staging')
            queue.push(initiator, prerelease)
            exit()
    else:
        if run():
            print "Building production..."
            build(source, production_build, root, initiator)
            backend.create_production(production_build, backups, script_dir)
        else:
            print "Script is already running... setting repeat flag to production..."
            # set_repeat('production')
            queue.push(initiator, prerelease)
            exit()

# check whether we need to run script once more
# repeat = get_repeat()

# while repeat != 'none':

while len(queue) > 0:
    initiator, prerelease = queue.pop()

    if prerelease == True:
Пример #3
0
        # check whether we can start the build.py script
        # i.e. whether another instance isn't already running
        if run():
            print "Building staging..."
            backend.build(source, staging_build, root, initiator)
            backend.create_staging(staging_build, production_path, build_path)
        else:
            print "Script is already running... setting repeat flag to staging..."
            # set_repeat('staging')
            queue.push(initiator, prerelease)
            exit()
    else:
        if run():
            print "Building production..."
            backend.build(source, register_path, root, initiator)
            backend.create_production(register_path, backups, script_entry_path, production_path)
        else:
            print "Script is already running... setting repeat flag to production..."
            # set_repeat('production')
            queue.push(initiator, prerelease)
            exit()

# check whether we need to run script once more
# repeat = get_repeat()

# while repeat != 'none':

while len(queue) > 0:
    initiator, prerelease = queue.pop()

    if prerelease == True:
Пример #4
0
import settings as s
from backend import fetch_repo, create_production, build
from utils import load_repos

root_fs = OSFS(s.root_path)
build_fs = root_fs.makeopendir(s.build_path)
build_fs.makedir(s.sources_path)
build_fs.makedir(s.staging_path)
build_fs.makedir(s.register_path)

# create production directory if needed
try:
    production_fs = OSFS(s.production_path)
except ResourceNotFoundError:
    # grap production dir's parent dir
    path = s.production_path.split('/')[-2]
    print path
    production_fs = OSFS(s.production_path[:len(s.production_path) - (len(path) + 1)]).makeopendir(path)
    print production_fs

if production_fs.exists(s.backups_path) == False:
    production_fs.makedir(s.backups_path)

# fetch repos from GitHub
for repo in load_repos(s.repos_path)[0].values():
    print 'Fetching %s for the first time' % repo['id']
    fetch_repo(root_fs, s.sources_path, repo['id'], repo['url'], s.build_path)
    build(s.sources_path, s.register_path, root_fs, repo['id'])

create_production(s.register_path, s.backups_path, s.script_entry_path, s.production_path)