balanced / bob Goto Github PK
View Code? Open in Web Editor NEWBob the Builder - package your software into a deb/rpm/tar, publishes to a repository, and notifies you all by using a simple yaml file
Home Page: https://balancedpayments.com/
Bob the Builder - package your software into a deb/rpm/tar, publishes to a repository, and notifies you all by using a simple yaml file
Home Page: https://balancedpayments.com/
regex types: http://www.gnu.org/software/findutils/manual/html_node/find_html/Regular-Expressions.html
find /root/work/bob -depth -regex ".*\.pyc" -delete
These aren't https://github.com/balanced/precog/blob/omnibussed/build.yml#L8-L9 globs
Ideally these resources would be cached somehow so it doesn't have to compile the dependencies every time we want to deploy. Perhaps we could use python wheels so that we aren't wasting so much time building.
Currently the after_install
, before_install
hooks are ignored.
https://github.com/jordansissel/fpm/wiki
--provides PROVIDES What this package provides (usually a name). This flag can be specified multiple times.
allows us to give hints when a package is not installed.
When bob is used to build bob, there is no going back if it fails to build. This is due to https://github.com/balanced/bob/blob/master/bob/builders/ubuntu/__init__.py#L81-L85
for directory in (self.tmp_dir, self.target):
self.run_command('sudo rm -rf {}'.format(directory))
self.run_command('sudo mkdir -p {}'.format(directory))
self.run_command('sudo chown {} {}'.format(
getpass.getuser(), directory)
)
Bob will blow away /opt/bob
when it's trying to build the debian file.
Use @bninja/pilo
Looks like even the pip install fails, the build continues, please see
No distributions at all found for balog[sqs]==1.0.1 (fro m justitia==0.0.0)
in following log records
21:28:38,265 INFO [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] Downloading/unpacking balog[sqs]==1.0.1 (from justitia==
0.0.0)
21:28:38,265 INFO [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] Could not find any downloads that satisfy the requirem
ent balog[sqs]==1.0.1 (from justitia==0.0.0)
21:28:38,266 INFO [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] Cleaning up...
21:28:38,266 INFO [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] No distributions at all found for balog[sqs]==1.0.1 (fro
m justitia==0.0.0)
21:28:38,266 INFO [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] Storing debug log for failure in /root/.pip/pip.log
21:28:38,267 DEBUG [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] [u'\n fpm -s dir -t deb -n justitia -v 1.0.36 -x
"*.pyc" --iteration=1 -d libxml2 -d libxslt1.1 -d libpq5 -d ipython --after-install=/root/wo
rk/justitia/scripts/after-install.sh --before-remove=/root/work/justitia/scripts/before-remove.sh /opt/justitia\n ']
21:28:38,267 DEBUG [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] {}
21:28:39,101 INFO [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] {:timestamp=>"2014-10-01T21:28:39.068233+0000", :message
=>"Created package", :path=>"justitia_1.0.36-1_amd64.deb"}
21:28:39,101 DEBUG [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] [u'\n depot -s s3://apt.vandelay.io -c precis
e -k 277E7787 --component=unstable --no-public --force justitia_1.0.36-1_amd64.deb\n ']
21:28:39,102 DEBUG [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] {'env': {u'AWS_ACCESS_KEY_ID': 'xxxxxxxxxxxxxxxxxxxxxxx', u
'AWS_SECRET_ACCESS_KEY': 'xxxxxxxxxxxxxxxxxxxxxxx'}}
21:29:02,475 INFO [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] Uploading package justitia_1.0.36-1_amd64.deb
21:29:02,476 INFO [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] Uploading metadata
21:29:03,243 INFO [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] built justitia version v1.0.36 and uploaded to unstable
21:29:03,243 INFO [bob.builders] [13439] [MainThread] [0.4.5] [guru_id=] ***finished***
delete those debs and build tmp files after each upload
for future modifications
Our test fixtures look like they will get unwieldily quickly.
Trying to figure out the easiest way to stream log output to the response since building is a slow process.
I'm thinking of
messages_to_yield = []
if result['build']:
builder = forms.background_build(
result['organization'], result['name'], result['commit'],
log_stream=logger
)
class Handler(logging.Handler):
def emit(self, record):
msg = self.format(record)
messages_to_yield.append(msg)
logger.addHandler(Handler())
def iterate_response():
import time
builder.start_build()
while builder.building:
time.sleep(1)
for msg in messages_to_yield.pop():
yield msg
return api.Response(app_iter=iterate_response())
Any opinions about the simplest way to do this?
How to setup the configuration? Should be able to to read from --config=/path/to/settings.ini
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.