summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--component-json-schemas/component-specification/dcae-cli-v1/component-spec-schema.json15
-rw-r--r--component-json-schemas/tests/component-spec-logging.json114
-rw-r--r--dcae-cli/tox.ini1
-rwxr-xr-xmvn-phase-script.sh9
4 files changed, 138 insertions, 1 deletions
diff --git a/component-json-schemas/component-specification/dcae-cli-v1/component-spec-schema.json b/component-json-schemas/component-specification/dcae-cli-v1/component-spec-schema.json
index 27d0403..46c2a2a 100644
--- a/component-json-schemas/component-specification/dcae-cli-v1/component-spec-schema.json
+++ b/component-json-schemas/component-specification/dcae-cli-v1/component-spec-schema.json
@@ -646,6 +646,21 @@
"items": {
"type": "string"
}
+ },
+ "logging": {
+ "description": "Component specific details for logging",
+ "type": "object",
+ "properties": {
+ "log_directory": {
+ "description": "The path in the container where the component writes its logs. If the component is following the EELF requirements, this would be the directory where the four EELF files are being written. (Other logs can be placed in the directory--if their names in '.log', they'll also be sent into ELK.)",
+ "type": "string"
+ },
+ "alternate_fb_path": {
+ "description": "By default, the log volume is mounted at /var/log/onap/<component_type> in the sidecar container's file system. 'alternate_fb_path' allows overriding the default. Will affect how the log data can be found in the ELK system.",
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
}
},
"required": [
diff --git a/component-json-schemas/tests/component-spec-logging.json b/component-json-schemas/tests/component-spec-logging.json
new file mode 100644
index 0000000..6b74050
--- /dev/null
+++ b/component-json-schemas/tests/component-spec-logging.json
@@ -0,0 +1,114 @@
+{
+ "self": {
+ "version": "0.5.0",
+ "name": "sandbox.platform.laika",
+ "description": "Web service used as a stand-alone test DCAE service component",
+ "component_type": "docker"
+ },
+ "streams": {
+ "subscribes": [],
+ "publishes": [
+ {
+ "format": "some.format",
+ "version": "1.0.0",
+ "config_key": "pub-foo",
+ "type": "message router"
+ },
+ {
+ "format": "some.format",
+ "version": "1.0.0",
+ "config_key": "pub-foo",
+ "type": "http"
+ }
+ ]
+ },
+ "services": {
+ "calls": [],
+ "provides": [
+ {
+ "route": "/rollcall",
+ "verb": "GET",
+ "request": {
+ "format": "sandbox.platform.any",
+ "version": "0.1.0"
+ },
+ "response": {
+ "format": "sandbox.platform.laika.rollcall.response",
+ "version": "0.1.0"
+ }
+ },
+ {
+ "route": "/identity",
+ "verb": "POST",
+ "request": {
+ "format": "sandbox.platform.laika.identity.request",
+ "version": "0.1.0"
+ },
+ "response": {
+ "format": "sandbox.platform.laika.identity.response",
+ "version": "0.1.0"
+ }
+ },
+ {
+ "route": "/health",
+ "verb": "GET",
+ "request": {
+ "format": "sandbox.platform.any",
+ "version": "0.1.0"
+ },
+ "response": {
+ "format": "sandbox.platform.laika.health",
+ "version": "0.1.0"
+ }
+ }
+ ]
+ },
+ "parameters": [
+ {
+ "name": "threshold",
+ "description": "Some fake threshold",
+ "type": "number",
+ "value": 2000
+ },
+ {
+ "name": "some-target-number",
+ "description": "Some fake target",
+ "type": "number",
+ "value": 10000,
+ "constraints": [
+ {
+ "greater_or_equal": 1
+ },
+ {
+ "less_than": 100000
+ }]
+ },
+ {
+ "name": "magic-word",
+ "description": "Some magic word",
+ "type": "string",
+ "value": "requirements",
+ "constraints": [
+ {
+ "valid_values": ["rally", "user story"]
+ }]
+ }
+ ],
+ "auxilary": {
+ "healthcheck": {
+ "type": "http",
+ "endpoint": "/foo"
+ },
+ "ports": ["8080:8080"],
+ "logging": {
+ "log_directory": "/tmp/yo",
+ "alternate_fb_path": "/tmp/path"
+ }
+ },
+ "artifacts": [
+ {
+ "uri": "some docker image path",
+ "type": "docker image"
+ }
+ ]
+}
diff --git a/dcae-cli/tox.ini b/dcae-cli/tox.ini
index 2d6491c..5c62fe9 100644
--- a/dcae-cli/tox.ini
+++ b/dcae-cli/tox.ini
@@ -10,6 +10,7 @@ deps=
mock
setenv =
PYTHONPATH={toxinidir}
+passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
commands=
pytest dcae_cli --junitxml xunit-results.xml --cov dcae_cli --cov-report xml --cov-report term
coverage xml
diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh
index bf0396b..bf8fe05 100755
--- a/mvn-phase-script.sh
+++ b/mvn-phase-script.sh
@@ -39,8 +39,15 @@ if [ -z "$SETTINGS_FILE" ]; then
fi
+set -e
+RELEASE_TAG=${MVN_RELEASE_TAG:-R3}
+if [ "$RELEASE_TAG" != "R1" ]; then
+ RELEASE_TAGGED_DIR="${RELEASE_TAG}/"
+else
+ RELEASE_TAGGED_DIR="releases"
+fi
if ! wget -O ${PROJECT_ROOT}/mvn-phase-lib.sh \
- "$MVN_RAWREPO_BASEURL_DOWNLOAD"/org.onap.dcaegen2.utils/R2/scripts/mvn-phase-lib.sh; then
+ "$MVN_RAWREPO_BASEURL_DOWNLOAD"/org.onap.dcaegen2.utils/${RELEASE_TAGGED_DIR}scripts/mvn-phase-lib.sh; then
echo "Fail to download mvn-phase-lib.sh"
exit 1
fi