Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import argparse
import sys
import os
import shutil
import glob
from jinja2 import Environment, FileSystemLoader
from docker import Client
from tempfile import mkdtemp
# FROM {{ flavor }}:{{ distro }}
FROM ubuntu:trusty
MAINTAINER aasamble, [email protected]
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y dpkg-dev aptitude build-essential ; mkdir -p /usr/lib/pbuilder/
COPY pbuilder-satisfydepends* /usr/lib/pbuilder/
  1. mkdir /tmp/build; cd /tmp/build
  2. git clone https://github.com/jiocloud/puppet-rjil source
  3. run the docker-build.py (in the main part it is hardcoded with the above directories for now

Here is the output I get.

root@build1:~/rjil/python-dbuild/dbuild# python __init__.py --build_dir /tmp/build/ --source_dir source --flavor ubuntu --dist trusty
Starting source Package Build
(overcastvenv)hkumar@lap-devops:~/overcastvenv/src/overcast$ python manage.py createsuperuser
Username: hkumar
Error: That username is already taken.
Username: harish
Email address: [email protected]
Password:
Password (again):
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
ImportError at /admin/
cannot import name urlparse
Request Method: GET
Request URL: http://localhost:8000/admin/
Django Version: 1.8.4
Exception Type: ImportError
Exception Value:
cannot import name urlparse
Exception Location: /home/hkumar/overcastvenv/local/lib/python2.7/site-packages/rest_framework_nested/relations.py in <module>, line 15
Python Executable: /home/hkumar/overcastvenv/bin/python
AttributeError at /admin/
'Settings' object has no attribute 'GITHUB_AUTH_CALLBACK'
Request Method: GET
Request URL: http://localhost:8000/admin/
Django Version: 1.8.4
Exception Type: AttributeError
Exception Value:
'Settings' object has no attribute 'GITHUB_AUTH_CALLBACK'
Exception Location: /home/hkumar/overcastvenv/local/lib/python2.7/site-packages/django/conf/__init__.py in __getattr__, line 49
Python Executable: /home/hkumar/overcastvenv/bin/python
[2015-10-08 09:41:26,593: WARNING/Worker-4] Starting source Package Build
[2015-10-08 09:41:26,616: ERROR/MainProcess] Task overcast.django.apps.buildsvc.tasks.build[9bfe5884-79c7-46c7-9f92-1b671c76aea8] raised unexpected: ConnectionError(ProtocolError('Connection aborted.', error(13, 'Permission denied')),)
Traceback (most recent call last):
File "/home/hkumar/overcastvenv/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/hkumar/overcastvenv/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
return self.run(*args, **kwargs)
File "/home/hkumar/overcastvenv/src/overcast/overcast/django/apps/buildsvc/tasks.py", line 7, in build
ps.build_real()
File "/home/hkumar/overcastvenv/src/overcast/overcast/django/apps/buildsvc/models.py", line 267, in build_real
[2015-10-08 12:00:33,936: DEBUG/Worker-4] ['git', 'clone', u'https://github.com/sorenh/buildsvctest', '-b', u'python', 'build'], input=None, cwd='/tmp/tmpTMPS1K', override_env=None, discard_stderr=False
[2015-10-08 12:00:36,660: INFO/Worker-4] ['git', 'clone', u'https://github.com/sorenh/buildsvctest', '-b', u'python', 'build'] returned with returncode 0.
[2015-10-08 12:00:36,661: INFO/Worker-4] ['git', 'clone', u'https://github.com/sorenh/buildsvctest', '-b', u'python', 'build'] gave stdout: Cloning into 'build'...
.
[2015-10-08 12:00:36,661: INFO/Worker-4] ['git', 'clone', u'https://github.com/sorenh/buildsvctest', '-b', u'python', 'build'] gave stderr: None.
[2015-10-08 12:00:36,662: DEBUG/Worker-4] ['git', 'rev-parse', 'HEAD'], input=None, cwd='/tmp/tmpTMPS1K/build', override_env=None, discard_stderr=False
[2015-10-08 12:00:36,674: INFO/Worker-4] ['git', 'rev-parse', 'HEAD'] returned with returncode 0.
[2015-10-08 12:00:36,674: INFO/Worker-4] ['git', 'rev-parse', 'HEAD'] gave stdout: f887be9d39a46bfb9834b
[2015-10-09 11:14:29,241: ERROR/MainProcess] Task overcast.django.apps.buildsvc.tasks.build[b76260ee-75db-47e3-85e9-d466c3a25932] raised unexpected: CommandFailed("['reprepro', '-b', u'/home/hkumar/overcastvenv/src/overcast/data/repos/hkumarmk/hkumarmk', '--ignore=wrongdistribution', 'include', u'overcast', '/tmp/tmp6IGqLo/buildsvctest_0.1+72_source.changes'] returned 254. Output: ERROR: Unexpected content of file '/tmp/tmp6IGqLo/buildsvctest_0.1+72.tar.gz'!\nmd5 expected: a14fb06fb54160a7262c6602abd0b44d, got: 88b27617c849209164fa16bb85848005\nsha1 expected: d0d3f6d587c307e07099cd9df8e9d0155cebe40f, got: 1a936c399f4bb0bcb9c2f4a2e02691af3743efca\nsha256 expected: e2af4d982ca81114cd2b7308256650224992aea801c6771e811cbf1343fdf162, got: b0b6b2e3258df2fb4cc8e5cfdad2f6c10f984d93ca769c28970ca91d5dcd390d\nsize expected: 1310, got: 1305\nThere have been errors!\n (stderr: None)",)
Traceback (most recent call last):
File "/home/hkumar/overcastvenv/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in t
python -m testtools.run scripts.analytics.test_analytics.AnalyticsTestSanity3.test_verify_process_status_analytics_node
Log file : /contrail-test/logs/keystone_tests.log
Tests running...
Log file : /contrail-test/logs/analyticstestsanity3.log
2016-03-22 12:21:50,409 - INFO - Project ctest-AnalyticsTestSanity3-20973050 not found, creating it
2016-03-22 12:21:50,665 - INFO - Created Project:ctest-AnalyticsTestSanity3-20973050, ID : 38af4b35-ca50-4055-b36d-c268fc9c36c6