Sha256: be132c18635af96a57e3386dad2db737e4ff7ef9a89b0ee7254e35f443fea95a

Contents?: true

Size: 1.5 KB

Versions: 15

Compression:

Stored size: 1.5 KB

Contents

#!/usr/bin/env python

from __future__ import print_function

import httplib
import json
import os

JSON = 'application/json'

def trigger_appveyor_build():
    payload = {
        'accountName': 'malept',
        'projectSlug': 'rusty-blank',
        'branch': 'master',
    }

    headers = {
        'Accept': JSON,
        'Authorization': 'Bearer {}'.format(os.environ['APPVEYOR_TOKEN']),
        'Content-Type': JSON,
    }

    http = httplib.HTTPSConnection('ci.appveyor.com')
    http.request('POST', '/api/builds', json.dumps(payload), headers)
    print(http.getresponse().read())

def trigger_travis_build():
    msg = "Triggered by {}@{} ({})".format(os.environ['TRAVIS_REPO_SLUG'],
                                           os.environ['TRAVIS_BRANCH'],
                                           os.environ['TRAVIS_COMMIT'])
    payload = {
        "request": {
            "branch": "master",
            "message": msg,
        }
    }

    headers = {
        'Accept': JSON,
        'Authorization': 'token {}'.format(os.environ['TRAVIS_TOKEN']),
        'Content-Type': JSON,
        'Travis-Api-Version': '3',
    }

    http = httplib.HTTPSConnection('api.travis-ci.org')
    http.request('POST', '/repo/malept%2Frusty_blank/requests', json.dumps(payload), headers)
    print(http.getresponse().read())

if __name__ == '__main__':
    if (os.environ['TRAVIS_OS_NAME'] == 'linux' and
        os.environ['TRAVIS_RUBY_VERSION'].startswith('2.3.')):
        trigger_appveyor_build()
        trigger_travis_build()

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
fluent-plugin-nuopenlineage-light-0.1.0 vendor/bundle/ruby/3.3.0/gems/thermite-0.13.0/ci/after_success.py
fluent-plugin-openlineage-light-0.1.4 vendor/bundle/ruby/3.3.0/gems/thermite-0.13.0/ci/after_success.py
fluent-plugin-openlineage-light-0.1.3 vendor/bundle/ruby/3.3.0/gems/thermite-0.13.0/ci/after_success.py
fluent-plugin-openlineage-0.1.0 vendor/bundle/ruby/3.3.0/gems/thermite-0.13.0/ci/after_success.py
thermite-0.13.0 ci/after_success.py
thermite-0.12.1 ci/after_success.py
thermite-0.12.0 ci/after_success.py
thermite-0.11.1 ci/after_success.py
thermite-0.11.0 ci/after_success.py
thermite-0.10.0 ci/after_success.py
thermite-0.9.0 ci/after_success.py
thermite-0.8.0 ci/after_success.py
thermite-0.7.0 ci/after_success.py
thermite-0.6.0 ci/after_success.py
thermite-0.5.0 ci/after_success.py