A simple app written in python for getting a build nr. This website was made for wercker a continuous deployment/delivery platform. The purpose of this application is to show how you can easily extend the platform.
Feel free to fork this site and/or deploy your own version of this app (buildnr.herokuapp.com is deployed to a free heroku instance .
NOTE: this is not an official wercker product.
You can easily register on the site: buildnr.herokuapp.com and create an app.
With a single REST call you can get the build number for an app/branch/commit hash combination. New branches by default start counting at 0.
- Fork this github repository.
- Clone the repository.
- Create a new app on heroku and add the following addons:
- Heroku Postgres Dev :: Ivory (free)
- Postmark 10,000 Messages (free)
- You could now either add the application to wercker and add a heroku deploy target or start pushing manually.
- After deploying you need to run
heroku run ./manage.py syncdb
to create the database structure and an admin login. - Login to the '/admin/' and update the site information to match the herokuapp domain.
Please update the DEFAULT_FROM_EMAIL email address in
versioning_service/settings.py
file.
- Create a new virtual environment and activate it.
- Run
pip install -r requirements.txt
- Initialize the database by running './manage.py syncdb'
- Start the django devserver by running:
./manage.py runserver 0.0.0.0:8000
- Go to http://localhost:8000/admin/ and
update the site from
example.com
tolocalhost:8000
You may want to set some environment variables to enable emailing (used in the registration/password reset flow). The environment variables are:
EMAIL_HOST
orPOSTMARK_SMTP_SERVER
EMAIL_USER
orPOSTMARK_API_KEY
EMAIL_PASSWORD
orPOSTMARK_API_KEY
EMAIL_PORT
EMAIL_TLS
And finally: please update DEFAULT_FROM_EMAIL the email address in
versioning_service/settings.py
file.
Happy coding!