mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-11-01 18:58:20 +00:00
Add automatic build execution.
This commit is contained in:
6
.bashrc
6
.bashrc
@@ -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
|
||||
|
2
Makefile
2
Makefile
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user