Adding APPS as sources to the Bazel package build rule.

Change-Id: I9444d255d0ec2d6680ab8fd98567ed44d9a0c53f
This commit is contained in:
Thomas Vachuska 2018-06-27 16:01:36 -07:00
parent 5c9e2838e4
commit 41c652c6ef
3 changed files with 17 additions and 8 deletions

5
BUILD
View File

@ -1,5 +1,5 @@
load("//tools/build/bazel:generate_workspace.bzl", "ONOS_VERSION")
load(":modules.bzl", "APPS", "CORE")
load(":modules.bzl", "APPS", "CORE", )
filegroup(
name = "onos",
@ -37,13 +37,12 @@ genrule(
)
# Generates the principal onos.tar.gz bundle
# FIXME: Need to include OAR files as dependencies and feature bundles as well
genrule(
name = "onos-package",
srcs = [
"//tools/package/features:onos-features",
":onos-karaf",
],
] + APPS,
outs = ["onos.tar.gz"],
cmd = "$(location tools/package/onos_stage.py) $(location onos.tar.gz) %s $(location :onos-karaf) $(SRCS)" % ONOS_VERSION,
output_to_bindir = True,

View File

@ -4,14 +4,24 @@ COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + [
"//core/store/serializers:onos-core-serializers",
]
TEST_DEPS = TEST_ADAPTERS + [
"//core/api:onos-api-tests",
BUNDLES = [
":onos-drivers-default",
"@openflowj//jar",
"//protocols/openflow/api:onos-protocols-openflow-api",
]
osgi_jar_with_tests(
#resources_root = 'src/main/resources',
resources = glob(["src/main/resources/**"]),
test_deps = TEST_DEPS,
test_deps = TEST_ADAPTERS,
visibility = ["//visibility:public"],
deps = COMPILE_DEPS,
)
onos_app(
app_name = "org.onosproject.drivers",
category = "Drivers",
description = "Suite of default drivers.",
included_bundles = BUNDLES,
title = "Default Drivers",
url = "http://onosproject.org",
)

View File

@ -25,7 +25,7 @@ def addFile(tar, dest, file, file_size):
def addString(tar, dest, string):
if dest not in written_files:
print dest, string
# print dest, string
info = TarInfo(dest)
info.size = len(string)
info.mtime = now