Giter Club home page Giter Club logo

drone-discord's Introduction

Build Status

fleet

Leveraging Docker Engine's built-in Swarm Mode on Ubuntu Server LTS Virtual Machines. This is the first piece of code that should be executed against a fresh host on the diesel.net domain

Checking-In New Hosts

To add a new host (or set of hosts) create a new local branch name with the pattern check-in/*, add the new hosts and their configuration to the inventory, then push. Please delete your check-in/* branch after merging.

Bootstrapping Hosts

Pushes to stable branches will trigger the entire fleet to be bootstrapped.

Updating Hosts

You will need the following installed:

Python 3.11+

  1. Create a Python Virtual Environment (venv) and activate it.

    python3 -m venv venv
    source venv/bin/activate
  2. Install Ansible.

    pip install --upgrade pip setuptools wheel pip-tools
    pip install ansible==7.2.0
  3. Install Ansible roles.

    ansible-galaxy install --force --role-file .ansible/roles/check-in_requirements.yaml --roles-path .ansible/roles
  4. Update all the Ubuntu hosts's Apt packages and reboot if necessary.

    ansible-playbook --inventory .ansible/inventories/dev  --inventory .ansible/inventories/prod --extra-vars auto_reboot=yes .ansible/update.yaml

drone-discord's People

Contributors

tomdaley92 avatar

Stargazers

 avatar

Watchers

 avatar

drone-discord's Issues

Updating build status fails sometimes

Noticed there was a build that never changed from running status

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/api/discord.py", line 421, in post_build_updated
    if previous_post.get('status') == status:
AttributeError: 'NoneType' object has no attribute 'get'

gnome-shell-screenshot-4M6OD1

Discord Rate Limiting - Untested

One pretty important piece that I have not gotten around to implementing properly and testing thoroughly. This is just a reminder to get to this at some point.

This project was whipped up pretty quick with some best practices thrown out the window, hence dealt with rate limiting by using the quick sleep && recurse method...

Code blocks:

_verify_signature() sometimes failing

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/api/drone.py", line 85, in post_events
    if not _verify_signature(KEY, request.headers):
  File "/api/drone.py", line 58, in _verify_signature
    expected = re.search(
AttributeError: 'NoneType' object has no attribute 'group'

re.search() returns None if there is no match. Should add more error checks.

Support "Cancel" Event

Totally forgot about this. So far there is no color for "cancelled/killed" but thinking it should just be red as well

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.