Add automatic build execution.

This commit is contained in:
Jeffrey Townsend
2016-01-27 10:18:34 -08:00
parent db7554d4d1
commit 8d6cfd9fc1
3 changed files with 13 additions and 2 deletions

View File

@@ -13,4 +13,8 @@
. setup.env
echo Ready to build OpenNetworkLinux.
if [ -n "$ONL_AUTOBUILD" ]; then
make all
else
echo Ready to build OpenNetworkLinux.
fi

View File

@@ -42,4 +42,4 @@ docker_check:
@which docker > /dev/null || (echo "*** Docker appears to be missing. Please install docker.io in order to build OpenNetworkLinux." && exit 1)
docker: docker_check
@docker/tools/onlbuilder -$(VERSION) --isolate --hostname onlbuilder$(VERSION) --pull
@docker/tools/onlbuilder -$(VERSION) --isolate --hostname onlbuilder$(VERSION) --pull --autobuild

View File

@@ -96,6 +96,10 @@ ap.add_argument("--volumes",
metavar='DIRECTORY',
default=[])
ap.add_argument("--autobuild",
help="Automatic build in isolation mode.",
action='store_true')
ap.add_argument("--command", "-c",
help="Explicit command to run. All arguments after -c are considered to be part of the command.",
nargs=argparse.REMAINDER,
@@ -171,6 +175,9 @@ else:
if ops.hostname:
g_docker_arguments += " -h %s" % ops.hostname
if ops.autobuild:
g_docker_arguments += " -e ONL_AUTOBUILD=1 "
else:
# Development host mode
g_docker_arguments += "-e USER=%(username)s --net host -w %(workdir)s " % g_arg_d