From: Rohan Patel Date: Mon, 11 Nov 2019 21:30:46 +0000 (-0500) Subject: added updated dockerfiles and ric workflow X-Git-Tag: 0.0.1~5 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=e19624e8bb9e03bc1e6bd74baaef4ce5379afa77;hp=f9def9ae0717a0c39314e252a2b2d3d2df9211da;p=it%2Fotf.git added updated dockerfiles and ric workflow Change-Id: I28f4367307789418825deb5c81684d6fccbf3d32 Signed-off-by: Rohan Patel --- diff --git a/oran-ric-test-head/Dockerfile b/oran-ric-test-head/Dockerfile index 86f740d..7b6be0c 100644 --- a/oran-ric-test-head/Dockerfile +++ b/oran-ric-test-head/Dockerfile @@ -1,3 +1,18 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + FROM python:2.7 RUN python --version diff --git a/oran-ric-test-head/Jenkinsfile b/oran-ric-test-head/Jenkinsfile index f5defc2..a6ad06a 100644 --- a/oran-ric-test-head/Jenkinsfile +++ b/oran-ric-test-head/Jenkinsfile @@ -1,5 +1,19 @@ #!/usr/bin/env groovy +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"], diff --git a/oran-ric-test-head/mock_server/index.js b/oran-ric-test-head/mock_server/index.js index 255591a..d915ef9 100644 --- a/oran-ric-test-head/mock_server/index.js +++ b/oran-ric-test-head/mock_server/index.js @@ -1,3 +1,18 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + const express = require('express') const app = express() const port = 3000 diff --git a/oran-ric-test-head/ric-test-head.py b/oran-ric-test-head/ric-test-head.py index f80d3d3..9057678 100644 --- a/oran-ric-test-head/ric-test-head.py +++ b/oran-ric-test-head/ric-test-head.py @@ -17,6 +17,7 @@ import datetime import json import logging from logging import FileHandler +import os import requests from flask import Flask, request, jsonify @@ -82,7 +83,7 @@ def executeRicRequest(): responseData['vthResponse']['resultData']['statusCode'] = res.status_code responseData['vthResponse']['resultData']['resultOutput'] = res.json() elif action == 'deploy': - payload = {'name': requestData['name']} + payload = json.dumps({'name': requestData['name']}) res = requests.post(baseAddress+config['actions_path'][action], data=payload) responseData['vthResponse']['resultData']['statusCode'] = res.status_code responseData['vthResponse']['resultData']['resultOutput'] = res.json() diff --git a/oran-ric-test-head/workflows/Delete_xAPP_Test.bpmn b/oran-ric-test-head/workflows/Delete_xAPP_Test.bpmn new file mode 100644 index 0000000..98be1cc --- /dev/null +++ b/oran-ric-test-head/workflows/Delete_xAPP_Test.bpmn @@ -0,0 +1,214 @@ + + + + + SequenceFlow_03vt4gu + + + SequenceFlow_03vt4gu + SequenceFlow_1gceb7d + var System = java.lang.System + +var deleteVthId = 'delete' +var testData = execution.getVariable("testData") +var vthInput = execution.getVariable("vthInput") +var validInput = false; +var testResultMessage = ""; + +try{ + + var appName = testData['appName']; + + if(typeof appName !== 'string' || appName.trim() === ''){ + System.out.println("appName is not a string, or empty string") + throw Error("appName is not a string, or empty string") + } + + + validInput = true + + vthInput[deleteVthId].name = appName +} +catch(err){ + System.out.println(err) + validInput = false + testResultMessage = "Invalid input params. error: " + err; + execution.setVariable("testResult", "FAILED"); +} + +execution.setVariable("validInput", validInput) +execution.setVariable("testResultMessage", testResultMessage) + + + SequenceFlow_1gceb7d + SequenceFlow_1xykozf + SequenceFlow_035k1kv + + + + + ${validInput} + + + SequenceFlow_035k1kv + SequenceFlow_11htm0z + SequenceFlow_1ivi698 + execution.setVariable("testResult", "FAILED") + + + SequenceFlow_1fcorq2 + SequenceFlow_1s62i1u + execution.setVariable("testResult", "SUCCESS") + + + SequenceFlow_1czqxne + + + + + + + SequenceFlow_1hq011g + SequenceFlow_1fcorq2 + SequenceFlow_11htm0z + + + + ${deleted} + + + + + SequenceFlow_1rdc2w4 + SequenceFlow_1hq011g + var System = java.lang.System + +var deleteVthId = 'delete' +var testData = execution.getVariable("testData") +var vthInput = execution.getVariable("vthInput") +var deleted = false; +var testResultMessage = "RIC VTH reported that the xapp was not deleted." + + + +try { + //get output from delete call + var testExecution = execution.getVariable('otf-execution-testExecution'); + var data = null; + testExecution.testHeadResults.forEach(function(item, index, array) { + if(item.bpmnVthTaskId == deleteVthId ){ + data = item['testHeadResponse']['vthResponse']['resultData']['statusCode']; + } + }) + + if(data === 204){ + deleted = true + testResultMessage = "RIC VTH reported that the xapp was deleted." + } + +} +catch(err) { + deleted = false +} + +execution.setVariable("deleted", deleted); +execution.setVariable("testResultMessage", testResultMessage); + + + + SequenceFlow_1ivi698 + SequenceFlow_1s62i1u + SequenceFlow_1czqxne + + + SequenceFlow_1xykozf + SequenceFlow_1rdc2w4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/oran-ric-test-head/workflows/Deploy_xAPP_Test.bpmn b/oran-ric-test-head/workflows/Deploy_xAPP_Test.bpmn index bf2b3d9..9cefb0e 100644 --- a/oran-ric-test-head/workflows/Deploy_xAPP_Test.bpmn +++ b/oran-ric-test-head/workflows/Deploy_xAPP_Test.bpmn @@ -1,463 +1,463 @@ - - - - - SequenceFlow_0st7o3p - - - - - - ${ready} - - - - - - - - - - - - - ${deployed} - - - - ${validInput} - - - - ${!alreadyDeployed} - - - - - SequenceFlow_0j9397y - SequenceFlow_0e1kt1e - var System = java.lang.System - -var readyVthId = 'ready' -var testData = execution.getVariable("testData") -var vthInput = execution.getVariable("vthInput") -var ready = false; -var testResultMessage = "RIC VTH reported that xAppManager is not ready." - - - -try { - //get output from ready call - var testExecution = execution.getVariable('otf-execution-testExecution'); - var data = null; - testExecution.testHeadResults.forEach(function(item, index, array) { - if(item.bpmnVthTaskId == readyVthId ){ - data = item['testHeadResponse']['vthResponse']['resultData']['statusCode']; - } - }) - - if(data === 200){ - ready = true - testResultMessage = "RIC VTH reported that xAppManager is ready." - } - -} -catch(err) { - ready = false -} - -execution.setVariable("ready", ready); -execution.setVariable("testResultMessage", testResultMessage); - - - SequenceFlow_1chkfad - SequenceFlow_0nfij3v - SequenceFlow_0g7zkcv - SequenceFlow_0dscvt7 - SequenceFlow_1u9jrl1 - execution.setVariable("testResult", "FAILED") - - - SequenceFlow_08hkwrc - SequenceFlow_18bpwal - execution.setVariable("testResult", "SUCCESS") - - - SequenceFlow_07jnolr - SequenceFlow_08wazou - var System = java.lang.System - -var deploy = 'deploy' -var secondList = 'second_list' -var testData = execution.getVariable("testData") -var vthInput = execution.getVariable("vthInput") -var deployed = false; -var testResultMessage = "RIC VTH reported that xApp is not deployed." -var appName = testData['appName'] - - - -try { - //get output from deploy call - var testExecution = execution.getVariable('otf-execution-testExecution'); - data = null; - testExecution.testHeadResults.forEach(function(item, index, array) { - if(item.bpmnVthTaskId == deploy ){ - data = item['testHeadResponse']['vthResponse']['resultData']['statusCode']; - } - }) - - if(data === 201){ - testResultMessage = "RIC VTH reported that xAppManager deployment call succeeded." - - //get output from secondList call - var testExecution = execution.getVariable('otf-execution-testExecution'); - data = null; - testExecution.testHeadResults.forEach(function(item, index, array) { - if(item.bpmnVthTaskId == secondList ){ - data = item['testHeadResponse']['vthResponse']['resultData']['resultOutput']; - } - }) - - instance = null - data.forEach(function(item, index, array) { - if(item.name === appName){ - instance = item - testResultMessage = "RIC VTH reported that xApp is present." - } - }) - - if(instance !== null && instance.status === 'deployed'){ - deployed = true - testResultMessage = "RIC VTH reported that xApp is deployed." - testDetails = execution.getVariable("testDetails") - testDetails.put("instance", instance); - execution.setVariable("testDetails", testDetails) - } - else{ - deployed = false - testResultMessage = "RIC VTH reported that xApp was deployed, but xApp instance was either null or not deployed. See vth results for further information." - } - - } - -} -catch(err) { - deployed = false - testResultMessage = "Couldn't verify is xApp was deployed. Check Test Results" + err -} - -execution.setVariable("deployed", deployed); -execution.setVariable("testResultMessage", testResultMessage); - - - SequenceFlow_0st7o3p - SequenceFlow_18luk66 - var System = java.lang.System - -var deployVthId = 'deploy' -var testData = execution.getVariable("testData") -var vthInput = execution.getVariable("vthInput") -var validInput = false; -var testResultMessage = ""; - -try{ - - var appName = testData['appName']; - var waitDurationSec = testData['waitDurationSec']; - - if(typeof appName !== 'string' || appName.trim() === ''){ - System.out.println("appName is not a string, or empty string") - throw Error("appName is not a string, or empty string") - } - - if(typeof waitDurationSec !== 'number' || waitDurationSec < 0){ - System.out.println("not a number") - throw Error("waitDurationSec is not a number greater than 0") - } - - validInput = true - - vthInput[deployVthId].name = appName - var timer = "PT" + waitDurationSec + "S" - System.out.println("timer " + timer) - execution.setVariable("timer", timer) -} -catch(err){ - System.out.println(err) - validInput = false - testResultMessage = "Invalid input params. error: " + err; - execution.setVariable("testResult", "FAILED"); -} - -execution.setVariable("validInput", validInput) -execution.setVariable("testResultMessage", testResultMessage) - - - SequenceFlow_0s6ntyv - SequenceFlow_0i3et2n - var System = java.lang.System - -var firstList = 'first_list' -var testData = execution.getVariable("testData") -var vthInput = execution.getVariable("vthInput") -var alreadyDeployed = true; -var testResultMessage = "RIC VTH reported that xApp is already deployed." -var appName = testData['appName'] - - - -try { - //get output from firstList call - var testExecution = execution.getVariable('otf-execution-testExecution'); - var data = null; - testExecution.testHeadResults.forEach(function(item, index, array) { - if(item.bpmnVthTaskId == firstList ){ - data = item['testHeadResponse']['vthResponse']['resultData']['resultOutput']; - } - }) - - var instance = null - data.forEach(function(item, index, array) { - if(item.name === appName){ - instance = item - testResultMessage = "RIC VTH reported that xApp is already present." - } - }) - - if(instance === null){ - alreadyDeployed = false - testResultMessage = "RIC VTH reported that xApp is not present." - } - - -} -catch(err) { - alreadyDeployed = true - testResultMessage = "Couldn't verify is xApp was already deployed." -} - -execution.setVariable("alreadyDeployed", alreadyDeployed); -execution.setVariable("testResultMessage", testResultMessage); - - - SequenceFlow_0e1kt1e - SequenceFlow_0zxo4fr - SequenceFlow_1chkfad - - - SequenceFlow_08wazou - SequenceFlow_0nfij3v - SequenceFlow_08hkwrc - - - SequenceFlow_18luk66 - SequenceFlow_1y69zdb - SequenceFlow_0g7zkcv - - - SequenceFlow_0i3et2n - SequenceFlow_08v4jva - SequenceFlow_0dscvt7 - - - SequenceFlow_1oze54u - SequenceFlow_07rma3l - - ${timer} - - - - SequenceFlow_01cc25d - - - - SequenceFlow_1y69zdb - SequenceFlow_0j9397y - - - SequenceFlow_0zxo4fr - SequenceFlow_0s6ntyv - - - SequenceFlow_08v4jva - SequenceFlow_1oze54u - - - SequenceFlow_07rma3l - SequenceFlow_07jnolr - - - SequenceFlow_18bpwal - SequenceFlow_1u9jrl1 - SequenceFlow_01cc25d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + SequenceFlow_0st7o3p + + + + + + ${ready} + + + + + + + + + + + + + ${deployed} + + + + ${validInput} + + + + ${!alreadyDeployed} + + + + + SequenceFlow_0j9397y + SequenceFlow_0e1kt1e + var System = java.lang.System + +var readyVthId = 'ready' +var testData = execution.getVariable("testData") +var vthInput = execution.getVariable("vthInput") +var ready = false; +var testResultMessage = "RIC VTH reported that xAppManager is not ready." + + + +try { + //get output from ready call + var testExecution = execution.getVariable('otf-execution-testExecution'); + var data = null; + testExecution.testHeadResults.forEach(function(item, index, array) { + if(item.bpmnVthTaskId == readyVthId ){ + data = item['testHeadResponse']['vthResponse']['resultData']['statusCode']; + } + }) + + if(data === 200){ + ready = true + testResultMessage = "RIC VTH reported that xAppManager is ready." + } + +} +catch(err) { + ready = false +} + +execution.setVariable("ready", ready); +execution.setVariable("testResultMessage", testResultMessage); + + + SequenceFlow_1chkfad + SequenceFlow_0nfij3v + SequenceFlow_0g7zkcv + SequenceFlow_0dscvt7 + SequenceFlow_1u9jrl1 + execution.setVariable("testResult", "FAILED") + + + SequenceFlow_08hkwrc + SequenceFlow_18bpwal + execution.setVariable("testResult", "SUCCESS") + + + SequenceFlow_07jnolr + SequenceFlow_08wazou + var System = java.lang.System + +var deploy = 'deploy' +var secondList = 'second_list' +var testData = execution.getVariable("testData") +var vthInput = execution.getVariable("vthInput") +var deployed = false; +var testResultMessage = "RIC VTH reported that xApp is not deployed." +var appName = testData['appName'] + + + +try { + //get output from deploy call + var testExecution = execution.getVariable('otf-execution-testExecution'); + data = null; + testExecution.testHeadResults.forEach(function(item, index, array) { + if(item.bpmnVthTaskId == deploy ){ + data = item['testHeadResponse']['vthResponse']['resultData']['statusCode']; + } + }) + + if(data === 201){ + testResultMessage = "RIC VTH reported that xAppManager deployment call succeeded." + + //get output from secondList call + var testExecution = execution.getVariable('otf-execution-testExecution'); + data = null; + testExecution.testHeadResults.forEach(function(item, index, array) { + if(item.bpmnVthTaskId == secondList ){ + data = item['testHeadResponse']['vthResponse']['resultData']['resultOutput']; + } + }) + + instance = null + data.forEach(function(item, index, array) { + if(item.name === appName){ + instance = item + testResultMessage = "RIC VTH reported that xApp is present." + } + }) + + if(instance !== null && instance.status === 'deployed'){ + deployed = true + testResultMessage = "RIC VTH reported that xApp is deployed." + testDetails = execution.getVariable("testDetails") + testDetails.put("instance", instance); + execution.setVariable("testDetails", testDetails) + } + else{ + deployed = false + testResultMessage = "RIC VTH reported that xApp was deployed, but xApp instance was either null or not deployed. See vth results for further information." + } + + } + +} +catch(err) { + deployed = false + testResultMessage = "Couldn't verify is xApp was deployed. Check Test Results" + err +} + +execution.setVariable("deployed", deployed); +execution.setVariable("testResultMessage", testResultMessage); + + + SequenceFlow_0st7o3p + SequenceFlow_18luk66 + var System = java.lang.System + +var deployVthId = 'deploy' +var testData = execution.getVariable("testData") +var vthInput = execution.getVariable("vthInput") +var validInput = false; +var testResultMessage = ""; + +try{ + + var appName = testData['appName']; + var waitDurationSec = testData['waitDurationSec']; + + if(typeof appName !== 'string' || appName.trim() === ''){ + System.out.println("appName is not a string, or empty string") + throw Error("appName is not a string, or empty string") + } + + if(typeof waitDurationSec !== 'number' || waitDurationSec < 0){ + System.out.println("not a number") + throw Error("waitDurationSec is not a number greater than 0") + } + + validInput = true + + vthInput[deployVthId].name = appName + var timer = "PT" + waitDurationSec + "S" + System.out.println("timer " + timer) + execution.setVariable("timer", timer) +} +catch(err){ + System.out.println(err) + validInput = false + testResultMessage = "Invalid input params. error: " + err; + execution.setVariable("testResult", "FAILED"); +} + +execution.setVariable("validInput", validInput) +execution.setVariable("testResultMessage", testResultMessage) + + + SequenceFlow_0s6ntyv + SequenceFlow_0i3et2n + var System = java.lang.System + +var firstList = 'first_list' +var testData = execution.getVariable("testData") +var vthInput = execution.getVariable("vthInput") +var alreadyDeployed = true; +var testResultMessage = "RIC VTH reported that xApp is already deployed." +var appName = testData['appName'] + + + +try { + //get output from firstList call + var testExecution = execution.getVariable('otf-execution-testExecution'); + var data = null; + testExecution.testHeadResults.forEach(function(item, index, array) { + if(item.bpmnVthTaskId == firstList ){ + data = item['testHeadResponse']['vthResponse']['resultData']['resultOutput']; + } + }) + + var instance = null + data.forEach(function(item, index, array) { + if(item.name === appName){ + instance = item + testResultMessage = "RIC VTH reported that xApp is already present." + } + }) + + if(instance === null){ + alreadyDeployed = false + testResultMessage = "RIC VTH reported that xApp is not present." + } + + +} +catch(err) { + alreadyDeployed = true + testResultMessage = "Couldn't verify is xApp was already deployed." +} + +execution.setVariable("alreadyDeployed", alreadyDeployed); +execution.setVariable("testResultMessage", testResultMessage); + + + SequenceFlow_0e1kt1e + SequenceFlow_0zxo4fr + SequenceFlow_1chkfad + + + SequenceFlow_08wazou + SequenceFlow_0nfij3v + SequenceFlow_08hkwrc + + + SequenceFlow_18luk66 + SequenceFlow_1y69zdb + SequenceFlow_0g7zkcv + + + SequenceFlow_0i3et2n + SequenceFlow_08v4jva + SequenceFlow_0dscvt7 + + + SequenceFlow_1oze54u + SequenceFlow_07rma3l + + ${timer} + + + + SequenceFlow_01cc25d + + + + SequenceFlow_1y69zdb + SequenceFlow_0j9397y + + + SequenceFlow_0zxo4fr + SequenceFlow_0s6ntyv + + + SequenceFlow_08v4jva + SequenceFlow_1oze54u + + + SequenceFlow_07rma3l + SequenceFlow_07jnolr + + + SequenceFlow_18bpwal + SequenceFlow_1u9jrl1 + SequenceFlow_01cc25d + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/otf-aaf-credential-generator/Jenkinsfile b/otf-aaf-credential-generator/Jenkinsfile index c2d0b5c..622cdb1 100644 --- a/otf-aaf-credential-generator/Jenkinsfile +++ b/otf-aaf-credential-generator/Jenkinsfile @@ -1,5 +1,20 @@ #!/usr/bin/env groovy +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"], diff --git a/otf-camunda/.gitignore b/otf-camunda/.gitignore index 7f70bd4..308bebd 100644 --- a/otf-camunda/.gitignore +++ b/otf-camunda/.gitignore @@ -1,3 +1,18 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + /target/ tokens/ out/ diff --git a/otf-camunda/Jenkinsfile b/otf-camunda/Jenkinsfile index 1548993..2d38ef2 100644 --- a/otf-camunda/Jenkinsfile +++ b/otf-camunda/Jenkinsfile @@ -1,5 +1,19 @@ #!/usr/bin/env groovy +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"], diff --git a/otf-camunda/docker/Dockerfile b/otf-camunda/docker/Dockerfile index d63564e..1cecbe3 100644 --- a/otf-camunda/docker/Dockerfile +++ b/otf-camunda/docker/Dockerfile @@ -1,3 +1,18 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + FROM openjdk:8 ENV ENV=development @@ -25,10 +40,16 @@ ENV PRIVATE_KEY=opt/cert/cert.key ENV PRIVATE_KEY_USERNAME=username ENV PRIVATE_KEY_PASSPHRASE=password -COPY otf-camunda.jar app.jar - +RUN apt update +RUN apt install maven -y +COPY settings.xml settings.xml +COPY src src +COPY pom.xml pom.xml +RUN mvn clean install -s settings.xml -DskipTests +RUN rm /usr/share/maven/lib/* +RUN ls RUN mkdir -p /otf/logs +RUN mv target/otf-camunda.jar app.jar +RUN rm -r target -ADD src src - -ENTRYPOINT ["java", "-jar", "app.jar"] \ No newline at end of file +ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/otf-camunda/helm/forceDelete.sh b/otf-camunda/helm/forceDelete.sh index 9347939..541c39d 100644 --- a/otf-camunda/helm/forceDelete.sh +++ b/otf-camunda/helm/forceDelete.sh @@ -1,4 +1,20 @@ #/bin/bash +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + podName=$1 echo $podName podInfo=$(kubectl get pods -l app=$1 -o custom-columns=:metadata.name) diff --git a/otf-camunda/settings.xml b/otf-camunda/settings.xml new file mode 100644 index 0000000..5a4325d --- /dev/null +++ b/otf-camunda/settings.xml @@ -0,0 +1,215 @@ + + + /home/YOURUSERID/onap/.m2/repository + + + + openecomp-staging + + + openecomp-staging + openecomp-staging + https://nexus.onap.org/content/repositories/staging/ + + true + never + + + false + + + + + + openecomp-staging + openecomp-staging + https://nexus.onap.org/content/repositories/staging/ + + true + never + + + false + + + + + + openecomp-public + + + openecomp-public + openecomp-public + https://nexus.onap.org/content/repositories/public/ + + true + never + + + false + + + + + + openecomp-public + openecomp-public + https://nexus.onap.org/content/repositories/public/ + + true + never + + + false + + + + + + openecomp-release + + + openecomp-release + openecomp-release + https://nexus.onap.org/content/repositories/releases/ + + true + never + + + false + + + + + + openecomp-release + openecomp-release + https://nexus.onap.org/content/repositories/releases/ + + true + never + + + false + + + + + + + openecomp-snapshots + + + openecomp-snapshot + openecomp-snapshot + https://nexus.onap.org/content/repositories/snapshots/ + + false + + + true + + + + + + openecomp-snapshot + openecomp-snapshot + https://nexus.onap.org/content/repositories/snapshots/ + + false + + + true + + + + + + opendaylight-release + + + opendaylight-mirror + opendaylight-mirror + https://nexus.opendaylight.org/content/repositories/public/ + + true + never + + + false + + + + + + opendaylight-mirror + opendaylight-mirror + https://nexus.opendaylight.org/content/repositories/public/ + + true + never + + + false + + + + + + + opendaylight-snapshots + + + opendaylight-snapshot + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + opendaylight-snapshot + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + + default + + + default + default + https://repo.maven.org/maven2/ + + + + + + + + default + openecomp-staging + openecomp-public + openecomp-release + openecomp-snapshots + opendaylight-release + opendaylight-snapshots + + diff --git a/otf-cert-secret-builder/Jenkinsfile b/otf-cert-secret-builder/Jenkinsfile index e9f31ff..346164f 100644 --- a/otf-cert-secret-builder/Jenkinsfile +++ b/otf-cert-secret-builder/Jenkinsfile @@ -1,5 +1,19 @@ #!/usr/bin/env groovy +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"], diff --git a/otf-frontend/.gitignore b/otf-frontend/.gitignore index aef7f2b..f8cb990 100644 --- a/otf-frontend/.gitignore +++ b/otf-frontend/.gitignore @@ -1,3 +1,17 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ # Created by https://www.gitignore.io/api/node,angular diff --git a/otf-frontend/Dockerfile b/otf-frontend/Dockerfile index 6caf80d..de31829 100644 --- a/otf-frontend/Dockerfile +++ b/otf-frontend/Dockerfile @@ -1,3 +1,17 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ FROM node:8.16-alpine ENV ENV=development diff --git a/otf-frontend/Jenkinsfile b/otf-frontend/Jenkinsfile index 0cc1a01..ed47365 100644 --- a/otf-frontend/Jenkinsfile +++ b/otf-frontend/Jenkinsfile @@ -1,5 +1,20 @@ #!/usr/bin/env groovy +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"], [$class: 'hudson.model.StringParameterDefinition', name: 'ENV', defaultValue: "dev"], diff --git a/otf-frontend/client/.gitignore b/otf-frontend/client/.gitignore index f94aed4..d52d0c9 100644 --- a/otf-frontend/client/.gitignore +++ b/otf-frontend/client/.gitignore @@ -1,3 +1,18 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + # See http://help.github.com/ignore-files/ for more about ignoring files. # compiled output diff --git a/otf-frontend/client/config/karma.conf.js b/otf-frontend/client/config/karma.conf.js index 3be39c4..74664d0 100644 --- a/otf-frontend/client/config/karma.conf.js +++ b/otf-frontend/client/config/karma.conf.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html diff --git a/otf-frontend/client/config/protractor.conf.js b/otf-frontend/client/config/protractor.conf.js index b1a56c1..148a41f 100644 --- a/otf-frontend/client/config/protractor.conf.js +++ b/otf-frontend/client/config/protractor.conf.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + // Protractor configuration file, see link for more information // https://github.com/angular/protractor/blob/master/lib/config.ts diff --git a/otf-frontend/client/e2e/app.e2e-spec.ts b/otf-frontend/client/e2e/app.e2e-spec.ts index 64bb730..26e9389 100644 --- a/otf-frontend/client/e2e/app.e2e-spec.ts +++ b/otf-frontend/client/e2e/app.e2e-spec.ts @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + import { AppPage } from './app.po'; describe('test-ng4 App', () => { diff --git a/otf-frontend/client/e2e/app.po.ts b/otf-frontend/client/e2e/app.po.ts index 625420f..c922a9e 100644 --- a/otf-frontend/client/e2e/app.po.ts +++ b/otf-frontend/client/e2e/app.po.ts @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + import { browser, by, element } from 'protractor'; export class AppPage { diff --git a/otf-frontend/server/test/app.test.js b/otf-frontend/server/test/app.test.js index 67338c3..378377a 100644 --- a/otf-frontend/server/test/app.test.js +++ b/otf-frontend/server/test/app.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const rp = require('request-promise'); const url = require('url'); diff --git a/otf-frontend/server/test/hooks/group-filter.test.js b/otf-frontend/server/test/hooks/group-filter.test.js index 71d02c6..d6e352f 100644 --- a/otf-frontend/server/test/hooks/group-filter.test.js +++ b/otf-frontend/server/test/hooks/group-filter.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const feathers = require('@feathersjs/feathers'); const groupFilter = require('../../src/hooks/group-filter'); diff --git a/otf-frontend/server/test/services/bpmn-upload.test.js b/otf-frontend/server/test/services/bpmn-upload.test.js index 23d1ff0..7ade3b5 100644 --- a/otf-frontend/server/test/services/bpmn-upload.test.js +++ b/otf-frontend/server/test/services/bpmn-upload.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/bpmn-validate.test.js b/otf-frontend/server/test/services/bpmn-validate.test.js index fb00767..bebe886 100644 --- a/otf-frontend/server/test/services/bpmn-validate.test.js +++ b/otf-frontend/server/test/services/bpmn-validate.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/groups-m.test.js b/otf-frontend/server/test/services/groups-m.test.js index 6e46510..4a1af5a 100644 --- a/otf-frontend/server/test/services/groups-m.test.js +++ b/otf-frontend/server/test/services/groups-m.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/groups.test.js b/otf-frontend/server/test/services/groups.test.js index c66c9c7..59d13ad 100644 --- a/otf-frontend/server/test/services/groups.test.js +++ b/otf-frontend/server/test/services/groups.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/health.test.js b/otf-frontend/server/test/services/health.test.js index 212f034..5c6963b 100644 --- a/otf-frontend/server/test/services/health.test.js +++ b/otf-frontend/server/test/services/health.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/strategy-upload.test.js b/otf-frontend/server/test/services/strategy-upload.test.js index 034e933..8fa04e1 100644 --- a/otf-frontend/server/test/services/strategy-upload.test.js +++ b/otf-frontend/server/test/services/strategy-upload.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/test-definition.test.js b/otf-frontend/server/test/services/test-definition.test.js index 556d710..9b004b3 100644 --- a/otf-frontend/server/test/services/test-definition.test.js +++ b/otf-frontend/server/test/services/test-definition.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/test-heads.test.js b/otf-frontend/server/test/services/test-heads.test.js index 44fa679..f3b845a 100644 --- a/otf-frontend/server/test/services/test-heads.test.js +++ b/otf-frontend/server/test/services/test-heads.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/test-instances.test.js b/otf-frontend/server/test/services/test-instances.test.js index 2db66b9..e59da74 100644 --- a/otf-frontend/server/test/services/test-instances.test.js +++ b/otf-frontend/server/test/services/test-instances.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/test-requests.test.js b/otf-frontend/server/test/services/test-requests.test.js index 51304e5..8b96702 100644 --- a/otf-frontend/server/test/services/test-requests.test.js +++ b/otf-frontend/server/test/services/test-requests.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/test-strategies.test.js b/otf-frontend/server/test/services/test-strategies.test.js index 35bf0d5..7917e28 100644 --- a/otf-frontend/server/test/services/test-strategies.test.js +++ b/otf-frontend/server/test/services/test-strategies.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/tests.test.js b/otf-frontend/server/test/services/tests.test.js index 0d03d13..8594bdd 100644 --- a/otf-frontend/server/test/services/tests.test.js +++ b/otf-frontend/server/test/services/tests.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-frontend/server/test/services/users.test.js b/otf-frontend/server/test/services/users.test.js index bed24e0..aec91c4 100644 --- a/otf-frontend/server/test/services/users.test.js +++ b/otf-frontend/server/test/services/users.test.js @@ -1,3 +1,19 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + const assert = require('assert'); const app = require('../../src/app'); diff --git a/otf-installation.txt b/otf-installation.txt index f40437b..0e4e87f 100644 --- a/otf-installation.txt +++ b/otf-installation.txt @@ -32,21 +32,18 @@ otf-robot-test-head otf-frontend - + docker build -t otf-frontend:0.0.1-SNAPSHOT . + docker run -d --network="host" otf-frontend:0.0.1-SNAPSHOT otf-service-api Modify src/main/resources/application.properties according to needs (disable aaf/ssl, set ports) - Add settings.xml from onap website and add profile to use maven default repository and add settings.xml to ~/.m2/ if missing - mvn clean install (add flag -DskipTests if it causes the build to fail) - navigate to target folder and run "docker build -t otf-service-api:0.0.1-SNAPSHOT ." + navigate to otf-service-api folder and run "docker build -t otf-service-api:0.0.1-SNAPSHOT -f docker/Dockerfile ." (maven will run from inside the container, command is inside the Dockerfile) docker run -d --network="host" otf-service-api:0.0.1-SNAPSHOT otf-camunda Modify src/main/resources/application.yaml according to needs, and validate the yaml is correct format (disable aaf/ssl, set ports) - Add settings.xml from onap website and add profile to use maven default repository and add settings.xml to ~/.m2/ if missing - mvn clean install (add flag -DskipTests if it causes the build to fail) - navigate to target folder and run "docker build -t otf-camunda:0.0.1-SNAPSHOT ." + navigate to otf-camunda folder and run "docker build -t otf-camunda:0.0.1-SNAPSHOT -f docker/Dockerfile ." (maven will run from inside the container, command is inside the Dockerfile) docker run -d --network="host" otf-camunda:0.0.1-SNAPSHOT Database Notes diff --git a/otf-ping-test-head/.gitignore b/otf-ping-test-head/.gitignore index 28ca722..173d2e8 100644 --- a/otf-ping-test-head/.gitignore +++ b/otf-ping-test-head/.gitignore @@ -1,5 +1,20 @@ -otf.pem -privateKey.pem -*.log -*.pem -/otf +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +otf.pem +privateKey.pem +*.log +*.pem +/otf diff --git a/otf-ping-test-head/Dockerfile b/otf-ping-test-head/Dockerfile index 182eaa4..82bc83f 100644 --- a/otf-ping-test-head/Dockerfile +++ b/otf-ping-test-head/Dockerfile @@ -1,3 +1,18 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + FROM python:2.7 # ARG HTTP_PROXY="localhost:8080" diff --git a/otf-ping-test-head/Jenkinsfile b/otf-ping-test-head/Jenkinsfile index 8143fcf..a103bb8 100644 --- a/otf-ping-test-head/Jenkinsfile +++ b/otf-ping-test-head/Jenkinsfile @@ -1,5 +1,19 @@ #!/usr/bin/env groovy +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"], diff --git a/otf-robot-test-head/.gitignore b/otf-robot-test-head/.gitignore index d5f7c3d..484fedb 100644 --- a/otf-robot-test-head/.gitignore +++ b/otf-robot-test-head/.gitignore @@ -53,6 +53,21 @@ cmake-build-*/ # File-based project format *.iws +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + # IntelliJ out/ diff --git a/otf-robot-test-head/Dockerfile b/otf-robot-test-head/Dockerfile index ce801b7..3c481e0 100644 --- a/otf-robot-test-head/Dockerfile +++ b/otf-robot-test-head/Dockerfile @@ -1,3 +1,18 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + FROM python:2.7 # ARG HTTP_PROXY="http://localhost:8080" diff --git a/otf-robot-test-head/Jenkinsfile b/otf-robot-test-head/Jenkinsfile index 16fa274..57d0f03 100644 --- a/otf-robot-test-head/Jenkinsfile +++ b/otf-robot-test-head/Jenkinsfile @@ -1,5 +1,19 @@ #!/usr/bin/env groovy +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"], diff --git a/otf-robot-test-head/run.py b/otf-robot-test-head/run.py index c0c37dc..bbb27e9 100644 --- a/otf-robot-test-head/run.py +++ b/otf-robot-test-head/run.py @@ -1,3 +1,19 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + from app import create_app if __name__ == '__main__': diff --git a/otf-service-api/.gitignore b/otf-service-api/.gitignore index 681073c..f4fc740 100644 --- a/otf-service-api/.gitignore +++ b/otf-service-api/.gitignore @@ -1,3 +1,18 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + /target/ tokens/ out/ diff --git a/otf-service-api/Jenkinsfile b/otf-service-api/Jenkinsfile index 68e8d66..92511b5 100644 --- a/otf-service-api/Jenkinsfile +++ b/otf-service-api/Jenkinsfile @@ -1,5 +1,20 @@ #!/usr/bin/env groovy +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"], [$class: 'hudson.model.StringParameterDefinition', name: 'ENV', defaultValue: "dev"], diff --git a/otf-service-api/docker/Dockerfile b/otf-service-api/docker/Dockerfile index d1ef755..82be010 100644 --- a/otf-service-api/docker/Dockerfile +++ b/otf-service-api/docker/Dockerfile @@ -1,3 +1,18 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + FROM openjdk:8 ENV NAMESPACE=namespace @@ -14,8 +29,8 @@ ENV OTF_MONGO_USERNAME=username ENV OTF_MONGO_PASSWORD=password ENV OTF_MONGO_REPLICASET=rs0 ENV OTF_MONGO_DATABASE=otf -ENV otf.camunda.host=https://localhost -ENV otf.camunda.port=31313 +ENV otf.camunda.host=http://localhost +ENV otf.camunda.port=8080 ENV otf.camunda.executionUri=otf/tcu/execute-test/v1 ENV otf.camunda.pollingUri=otf/tcu/process-instance-completion-check/v1 ENV otf.camunda.deploymentUri=otf/tcu/deploy-test-strategy-zip/v1 @@ -34,10 +49,16 @@ ENV otf.api.poll-attempts=50 ENV OTF_CERT_PATH=opt/cert/cert.p12 ENV OTF_CERT_PASS=password -COPY otf-service-api.jar app.jar - +RUN apt update +RUN apt install maven -y +COPY settings.xml settings.xml +COPY src src +COPY pom.xml pom.xml +RUN mvn clean install -s settings.xml -DskipTests +RUN rm /usr/share/maven/lib/* +RUN ls RUN mkdir -p /otf/logs - -ADD src src +RUN mv target/otf-service-api.jar app.jar +RUN rm -r target ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/otf-service-api/settings.xml b/otf-service-api/settings.xml new file mode 100644 index 0000000..5a4325d --- /dev/null +++ b/otf-service-api/settings.xml @@ -0,0 +1,215 @@ + + + /home/YOURUSERID/onap/.m2/repository + + + + openecomp-staging + + + openecomp-staging + openecomp-staging + https://nexus.onap.org/content/repositories/staging/ + + true + never + + + false + + + + + + openecomp-staging + openecomp-staging + https://nexus.onap.org/content/repositories/staging/ + + true + never + + + false + + + + + + openecomp-public + + + openecomp-public + openecomp-public + https://nexus.onap.org/content/repositories/public/ + + true + never + + + false + + + + + + openecomp-public + openecomp-public + https://nexus.onap.org/content/repositories/public/ + + true + never + + + false + + + + + + openecomp-release + + + openecomp-release + openecomp-release + https://nexus.onap.org/content/repositories/releases/ + + true + never + + + false + + + + + + openecomp-release + openecomp-release + https://nexus.onap.org/content/repositories/releases/ + + true + never + + + false + + + + + + + openecomp-snapshots + + + openecomp-snapshot + openecomp-snapshot + https://nexus.onap.org/content/repositories/snapshots/ + + false + + + true + + + + + + openecomp-snapshot + openecomp-snapshot + https://nexus.onap.org/content/repositories/snapshots/ + + false + + + true + + + + + + opendaylight-release + + + opendaylight-mirror + opendaylight-mirror + https://nexus.opendaylight.org/content/repositories/public/ + + true + never + + + false + + + + + + opendaylight-mirror + opendaylight-mirror + https://nexus.opendaylight.org/content/repositories/public/ + + true + never + + + false + + + + + + + opendaylight-snapshots + + + opendaylight-snapshot + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + opendaylight-snapshot + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + + default + + + default + default + https://repo.maven.org/maven2/ + + + + + + + + default + openecomp-staging + openecomp-public + openecomp-release + openecomp-snapshots + opendaylight-release + opendaylight-snapshots + + diff --git a/otf-ssh-test-head/.gitignore b/otf-ssh-test-head/.gitignore index 815f98d..173d2e8 100644 --- a/otf-ssh-test-head/.gitignore +++ b/otf-ssh-test-head/.gitignore @@ -1,3 +1,18 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + otf.pem privateKey.pem *.log diff --git a/otf-ssh-test-head/Dockerfile b/otf-ssh-test-head/Dockerfile index d70565d..31a4fef 100644 --- a/otf-ssh-test-head/Dockerfile +++ b/otf-ssh-test-head/Dockerfile @@ -1,3 +1,18 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + FROM python:2.7 # ARG HTTP_PROXY="localhost:8080" diff --git a/otf-ssh-test-head/Jenkinsfile b/otf-ssh-test-head/Jenkinsfile index c19179c..fb42d01 100644 --- a/otf-ssh-test-head/Jenkinsfile +++ b/otf-ssh-test-head/Jenkinsfile @@ -1,5 +1,19 @@ #!/usr/bin/env groovy +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [ [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"],