Ejemplo n.º 1
0
 def test_config(self):
     config = get_config(config_dir)
     assert config.external_disk()
     assert config.ci_dir()
     assert config.ci_cmd()
     assert config.lock_dir()
     assert config.crontab_cmd()
     assert config.ci_last_revision()
Ejemplo n.º 2
0
import logging
from flask import Flask, jsonify, send_from_directory
from mock import MagicMock
import convertible
from syncloud.app import logger
from os.path import dirname, join, abspath
from syncloud.ci.config import get_config
from syncloud.ci.manager import Manager, Job

app = Flask(__name__)
config = get_config()
manager_mock = None


@app.route('/<path:filename>')
def static_file(filename):
    return send_from_directory(config.www_dir(), filename)


@app.route('/')
def index():
    return static_file('index.html')


@app.route('/log/<path:filename>')
def log(filename):
    return send_from_directory(config.artifacts_dir(), filename, mimetype="text/plain")


@app.route("/jobs", methods=["GET"])
def jobs():