tasks.py 文件源码

python
阅读 38 收藏 0 点赞 0 评论 0

项目:django-zerodowntime 作者: rentlytics 项目源码 文件源码
def nightly_build(ctx, project_name, branch_name, circle_token):
    url = 'https://circleci.com/api/v1/project/{}/tree/{}?circle-token={}'.format(
        project_name,
        branch_name,
        circle_token
    )

    headers = {
        'Accept': 'application/json',
        'Content-Type': 'application/json',
    }

    body = {
        'build_parameters': {
            'RUN_NIGHTLY_BUILD': "true",
        }
    }

    response = requests.post(url, json=body, headers=headers)

    print("Nightly Build queued on CircleCI: http_status={}, response={}".format(
        response.status_code,
        response.json()
    ))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号