Merge "Split OMEC c3po jobs apart"
diff --git a/jjb/cord-test/nightly-build-pipeline.yaml b/jjb/cord-test/nightly-build-pipeline.yaml
index 1483403..a8764d8 100644
--- a/jjb/cord-test/nightly-build-pipeline.yaml
+++ b/jjb/cord-test/nightly-build-pipeline.yaml
@@ -87,6 +87,11 @@
description: ''
- bool:
+ name: installMonitoringAndLogging
+ default: false
+ description: "Wether to install prometheus and Elk-stack"
+
+ - bool:
name: configurePod
default: true
description: "Configure POD via TOSCA post build"
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index f7770bb..0d96475 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -71,7 +71,9 @@
seba-branches-regexp: '^(master|seba-1.0)$'
# for matching repos that build docker images with imagebuilder
- imagebuilder-projects-regexp: '^(xos.*|cord-tester|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric|fabric-crossconnect|globalxos|hippie-oss|hss_db|hypercache|internetemulator|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|att-workflow-driver|tt-workflow-driver)$'
+ # As of 2019-04-16 most of the services actively being developed use the
+ # make-based image generation process managed by the `docker-publish` job
+ imagebuilder-projects-regexp: '^(cord-tester|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|globalxos|hippie-oss|hss_db|hypercache|internetemulator|monitoring|openstack|progran|sdn-controller|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr)$'
# strictness of version checks
semver-strict: 0
diff --git a/jjb/docker-publish.yaml b/jjb/docker-publish.yaml
index 1c7d190..8315872 100644
--- a/jjb/docker-publish.yaml
+++ b/jjb/docker-publish.yaml
@@ -42,6 +42,16 @@
description: 'git ref to build (commit hash or tag)'
- string:
+ name: projectName
+ default: '$GERRIT_PROJECT'
+ description: 'Name of the project in Gerrit'
+
+ - string:
+ name: branchName
+ default: '$GERRIT_BRANCH'
+ description: 'Branch of the project in Gerrit'
+
+ - string:
name: dockerRepo
default: '{docker-repo}'
description: "Docker repository to push to ('opencord', 'xosproject', etc.)"
diff --git a/jjb/pipeline/docker-publish.groovy b/jjb/pipeline/docker-publish.groovy
index e9f05a3..9279635 100644
--- a/jjb/pipeline/docker-publish.groovy
+++ b/jjb/pipeline/docker-publish.groovy
@@ -17,12 +17,12 @@
]],
extensions: [
[$class: 'WipeWorkspace'],
- [$class: 'RelativeTargetDirectory', relativeTargetDir: "${params.GERRIT_PROJECT}"],
+ [$class: 'RelativeTargetDirectory', relativeTargetDir: "${params.projectName}"],
[$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
],
])
script {
- git_tags = sh(script:"cd $GERRIT_PROJECT; git tag -l --points-at HEAD", returnStdout: true).trim()
+ git_tags = sh(script:"cd $projectName; git tag -l --points-at HEAD", returnStdout: true).trim()
}
}
}
@@ -34,7 +34,7 @@
set -eu -o pipefail
# checked out in a subdir so the log can be in WORKSPACE
- cd "$GERRIT_PROJECT"
+ cd "$projectName"
# set registry/repository variables
export DOCKER_REGISTRY="$dockerRegistry"
@@ -42,7 +42,7 @@
# Build w/branch
echo "Building image with branch"
- make DOCKER_TAG="$GERRIT_BRANCH" docker-build 2>&1 | tee "$WORKSPACE/docker-build.log"
+ make DOCKER_TAG="$branchName" docker-build 2>&1 | tee "$WORKSPACE/docker-build.log"
# Build w/tags if they exist
if [ -n "$git_tags" ]
@@ -69,7 +69,7 @@
set -eu -o pipefail
# checked out in a subdir so the log can be in WORKSPACE
- cd "$GERRIT_PROJECT"
+ cd "$projectName"
# set registry/repository variables
export DOCKER_REGISTRY="$dockerRegistry"
@@ -77,7 +77,7 @@
# Push w/branch
echo "Pushing image with branch"
- make DOCKER_TAG="$GERRIT_BRANCH" docker-push 2>&1 | tee "$WORKSPACE/docker-push.log"
+ make DOCKER_TAG="$branchName" docker-push 2>&1 | tee "$WORKSPACE/docker-push.log"
# Push w/tags if they exist
if [ -n "$git_tags" ]
diff --git a/jjb/pipeline/xos-core.groovy b/jjb/pipeline/xos-core.groovy
index dca5f16..f7bc99e 100644
--- a/jjb/pipeline/xos-core.groovy
+++ b/jjb/pipeline/xos-core.groovy
@@ -96,11 +96,13 @@
export DOCKER_REPOSITORY=xosproject/
export DOCKER_TAG=\$(cat $WORKSPACE/cord/orchestration/xos/VERSION)
+ export DOCKER_BUILD_ARGS=--no-cache
- cd $WORKSPACE/cord/orchestration/xos/containers/xos
- make build
+ cd $WORKSPACE/cord/orchestration/xos
+ make docker-build
+
cd $WORKSPACE/cord/orchestration/xos/testservice
- make DOCKER_BUILD_ARGS=--no-cache docker-build
+ make docker-build
"""
}
}
@@ -147,6 +149,7 @@
set -eu -o pipefail
pushd cord/test/cord-tester/src/test/cord-api/
source setup_venv.sh
+
cd Tests/xos-test-service
robot -e notready test-service.robot || true
popd
diff --git a/jjb/shell/xos-unit.sh b/jjb/shell/xos-unit.sh
index 53af6b6..26b28a2 100644
--- a/jjb/shell/xos-unit.sh
+++ b/jjb/shell/xos-unit.sh
@@ -21,20 +21,22 @@
WORKSPACE=${WORKSPACE:-.}
GERRIT_PROJECT=${GERRIT_PROJECT:-xos}
-# create python virtual env
-export XOS_DIR=${WORKSPACE}/cord/orchestration/xos
-$XOS_DIR/scripts/setup_venv.sh
-source venv-xos/bin/activate
-
# find the path to the project that is checked out
PROJECT_PATH=$(xmllint --xpath "string(//project[@name=\"$GERRIT_PROJECT\"]/@path)" cord/.repo/manifest.xml)
if [ -f "$WORKSPACE/cord/$PROJECT_PATH/Makefile" ]; then
+ # assume newer testing method which uses Makefile
pushd "$WORKSPACE/cord/$PROJECT_PATH"
make test
+
else
+ # assume older branch, so set up the venv the old way
echo "No Makefile present"
+ export XOS_DIR=${WORKSPACE}/cord/orchestration/xos
+ "$XOS_DIR/scripts/setup_venv.sh"
+ source "$XOS_DIR/venv-xos/bin/activate"
+
if [ "$GERRIT_PROJECT" = 'xos' ] ; then
pushd "$WORKSPACE/cord/$PROJECT_PATH"
else
@@ -43,9 +45,9 @@
echo "Checking Migrations"
if [ "$GERRIT_PROJECT" = 'xos' ] ; then
- xos-migrate -r $WORKSPACE/cord -s core --check
+ xos-migrate -r "$WORKSPACE/cord" -s core --check
else
- xos-migrate -r $WORKSPACE/cord -s $GERRIT_PROJECT --check
+ xos-migrate -r "$WORKSPACE/cord" -s "$GERRIT_PROJECT" --check
fi
echo "Performing nose2 tests"
diff --git a/jjb/verify/att-workflow-driver.yaml b/jjb/verify/att-workflow-driver.yaml
index 0c915f2..4a75876 100644
--- a/jjb/verify/att-workflow-driver.yaml
+++ b/jjb/verify/att-workflow-driver.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-att-workflow-driver-jobs':
branch-regexp: '{all-branches-regexp}'
+ - 'publish-att-workflow-driver-jobs'
- job-group:
name: 'verify-att-workflow-driver-jobs'
@@ -22,3 +23,10 @@
- 'api-test':
dependency-jobs: 'verify_att-workflow-driver_unit-test'
pipeline_script: 'all-xos-api-test-helm.groovy'
+
+- job-group:
+ name: 'publish-att-workflow-driver-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/chameleon.yaml b/jjb/verify/chameleon.yaml
index 02bb32c..f5fc3ae 100644
--- a/jjb/verify/chameleon.yaml
+++ b/jjb/verify/chameleon.yaml
@@ -18,7 +18,9 @@
- 'tag-collision-reject':
dependency-jobs: 'verify_chameleon_licensed'
- 'python-unit-test':
- dependency-jobs: 'verify_chameleon_sonarqube'
+ dependency-jobs: 'verify_chameleon_tag-collision'
+ - 'xos-auth':
+ dependency-jobs: 'verify_chameleon_unit-test'
- job-group:
name: 'publish-chameleon-jobs'
diff --git a/jjb/verify/fabric-crossconnect.yaml b/jjb/verify/fabric-crossconnect.yaml
index 17716dc..fab4042 100644
--- a/jjb/verify/fabric-crossconnect.yaml
+++ b/jjb/verify/fabric-crossconnect.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-fabric-crossconnect-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'publish-fabric-crossconnect-jobs'
- job-group:
name: 'verify-fabric-crossconnect-jobs'
@@ -22,3 +23,10 @@
- 'api-test':
dependency-jobs: 'verify_fabric-crossconnect_unit-test'
pipeline_script: 'all-xos-api-test-helm.groovy'
+
+- job-group:
+ name: 'publish-fabric-crossconnect-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/fabric.yaml b/jjb/verify/fabric.yaml
index 778ffe3..46a6ed0 100644
--- a/jjb/verify/fabric.yaml
+++ b/jjb/verify/fabric.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-fabric-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'publish-fabric-jobs'
- job-group:
name: 'verify-fabric-jobs'
@@ -22,3 +23,10 @@
- 'api-test':
dependency-jobs: 'verify_fabric_unit-test'
pipeline_script: 'all-xos-api-test-helm.groovy'
+
+- job-group:
+ name: 'publish-fabric-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/olt-service.yaml b/jjb/verify/olt-service.yaml
index b891963..3035803 100644
--- a/jjb/verify/olt-service.yaml
+++ b/jjb/verify/olt-service.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-olt-service-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'publish-olt-service-jobs'
- job-group:
name: 'verify-olt-service-jobs'
@@ -22,3 +23,10 @@
- 'api-test':
dependency-jobs: 'verify_olt-service_unit-test'
pipeline_script: 'all-xos-api-test-helm.groovy'
+
+- job-group:
+ name: 'publish-olt-service-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/onos-service.yaml b/jjb/verify/onos-service.yaml
index da64670..f61b384 100644
--- a/jjb/verify/onos-service.yaml
+++ b/jjb/verify/onos-service.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-onos-service-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'publish-onos-service-jobs'
- job-group:
name: 'verify-onos-service-jobs'
@@ -22,3 +23,10 @@
- 'api-test':
dependency-jobs: 'verify_onos-service_unit-test'
pipeline_script: 'all-xos-api-test-helm.groovy'
+
+- job-group:
+ name: 'publish-onos-service-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/rcord.yaml b/jjb/verify/rcord.yaml
index 1472f7e..b2d6484 100644
--- a/jjb/verify/rcord.yaml
+++ b/jjb/verify/rcord.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-rcord-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'publish-rcord-jobs'
- job-group:
name: 'verify-rcord-jobs'
@@ -22,3 +23,10 @@
- 'api-test':
dependency-jobs: 'verify_rcord_unit-test'
pipeline_script: 'all-xos-api-test-helm.groovy'
+
+- job-group:
+ name: 'publish-rcord-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/simpleexampleservice.yaml b/jjb/verify/simpleexampleservice.yaml
index 7f93703..95ba4d3 100644
--- a/jjb/verify/simpleexampleservice.yaml
+++ b/jjb/verify/simpleexampleservice.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-simpleexampleservice-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'publish-simpleexampleservice-jobs'
- job-group:
name: 'verify-simpleexampleservice-jobs'
@@ -22,3 +23,10 @@
- 'api-test':
dependency-jobs: 'verify_simpleexampleservice_unit-test'
pipeline_script: 'all-xos-api-test-helm.groovy'
+
+- job-group:
+ name: 'publish-simpleexampleservice-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/tt-workflow-driver.yaml b/jjb/verify/tt-workflow-driver.yaml
index 6a0b070..e913d62 100644
--- a/jjb/verify/tt-workflow-driver.yaml
+++ b/jjb/verify/tt-workflow-driver.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-tt-workflow-driver-jobs':
branch-regexp: '{all-branches-regexp}'
+ - 'publish-tt-workflow-driver-jobs'
- job-group:
name: 'verify-tt-workflow-driver-jobs'
@@ -23,3 +24,10 @@
# - 'api-test':
# dependency-jobs: 'verify_tt-workflow-driver_unit-test'
# pipeline_script: 'all-xos-api-test-helm.groovy'
+
+- job-group:
+ name: 'publish-tt-workflow-driver-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/vrouter.yaml b/jjb/verify/vrouter.yaml
index d801e06..0217beb 100644
--- a/jjb/verify/vrouter.yaml
+++ b/jjb/verify/vrouter.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-vrouter-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'publish-vrouter-jobs'
- job-group:
name: 'verify-vrouter-jobs'
@@ -22,3 +23,10 @@
- 'api-test':
dependency-jobs: 'verify_vrouter_unit-test'
pipeline_script: 'all-xos-api-test-helm.groovy'
+
+- job-group:
+ name: 'publish-vrouter-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/xos-gui.yaml b/jjb/verify/xos-gui.yaml
index e88b61d..facb429 100644
--- a/jjb/verify/xos-gui.yaml
+++ b/jjb/verify/xos-gui.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-xos-gui-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'publish-xos-gui-jobs'
- job-group:
name: 'verify-xos-gui-jobs'
@@ -19,3 +20,10 @@
dependency-jobs: 'verify_xos-gui_tag-collision'
- 'gui-unit-test':
dependency-jobs: 'verify_xos-gui_sonarqube'
+
+- job-group:
+ name: 'publish-xos-gui-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/xos-rest-gw.yaml b/jjb/verify/xos-rest-gw.yaml
index 0eb70a4..892dbc5 100644
--- a/jjb/verify/xos-rest-gw.yaml
+++ b/jjb/verify/xos-rest-gw.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-xos-rest-gw-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'publish-xos-rest-gw-jobs'
- job-group:
name: 'verify-xos-rest-gw-jobs'
@@ -19,3 +20,10 @@
dependency-jobs: 'verify_xos-rest-gw_tag-collision'
- 'xos-rest-gw-unit':
dependency-jobs: 'verify_xos-rest-gw_sonarqube'
+
+- job-group:
+ name: 'publish-xos-rest-gw-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/xos-tosca.yaml b/jjb/verify/xos-tosca.yaml
index 1eaeeab..9ad3bf0 100644
--- a/jjb/verify/xos-tosca.yaml
+++ b/jjb/verify/xos-tosca.yaml
@@ -8,6 +8,7 @@
jobs:
- 'verify-xos-tosca-jobs':
branch-regexp: '{supported-branches-regexp}'
+ - 'publish-xos-tosca-jobs'
- job-group:
name: 'verify-xos-tosca-jobs'
@@ -15,12 +16,15 @@
- 'verify-licensed'
- 'tag-collision-reject':
dependency-jobs: 'verify_xos-tosca_licensed'
- - 'verify-sonarqube':
+ - 'python-unit-test':
dependency-jobs: 'verify_xos-tosca_tag-collision'
- 'api-test':
- dependency-jobs: 'verify_xos-tosca_sonarqube'
pipeline_script: 'all-xos-api-test-helm.groovy'
- - 'xos-tosca-unit-test':
- dependency-jobs: 'verify_xos-tosca_sonarqube'
- - 'xos-tosca-e2e-test':
- dependency-jobs: 'verify_xos-tosca_sonarqube'
+ dependency-jobs: 'verify_xos-tosca_unit-test'
+
+- job-group:
+ name: 'publish-xos-tosca-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/xos.yaml b/jjb/verify/xos.yaml
index 0faaf33..05f18d5 100644
--- a/jjb/verify/xos.yaml
+++ b/jjb/verify/xos.yaml
@@ -10,7 +10,7 @@
branch-regexp: '{supported-branches-regexp}'
- 'verify-xos-jobs-code':
branch-regexp: '{supported-branches-regexp}'
- - 'post-merge-publish-xos':
+ - 'publish-xos-jobs':
branch-regexp: '{supported-branches-regexp}'
# these two job groups are split so that documentation-only patches can go into
@@ -29,20 +29,20 @@
- job-group:
name: 'verify-xos-jobs-code'
jobs:
-# - 'verify-sonarqube':
-# build-timeout: 45
- 'python-unit-test':
build-timeout: 45
build-node: 'ubuntu16.04-basebuild-2c-4g'
-# - 'synchronizer-update'
- 'api-test':
pipeline_script: 'xos-core.groovy'
- job-group:
- name: 'post-merge-publish-xos'
+ name: 'publish-xos-jobs'
jobs:
- 'pypi-publish':
pypi-module-dirs: 'lib/xos-config|lib/xos-genx|lib/xos-util|lib/xos-api|lib/xos-migrate|lib/xos-synchronizer|lib/xos-kafka'
project-regexp: '^{name}$'
pypi-index: 'pypi'
dependency-jobs: 'version-tag'
+ - 'docker-publish':
+ docker-repo: 'xosproject'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/xos-auth.yaml b/jjb/xos-auth.yaml
new file mode 100644
index 0000000..6b035f9
--- /dev/null
+++ b/jjb/xos-auth.yaml
@@ -0,0 +1,85 @@
+---
+# xos auth test
+
+- job-template:
+ id: 'xos-auth-test'
+ name: 'verify_{project}_auth-test'
+
+ description: |
+ Created by {id} job-template from ci-management/jjb/xos-auth.yaml
+
+ triggers:
+ - cord-infra-gerrit-trigger-patchset:
+ gerrit-server-name: '{gerrit-server-name}'
+ project-regexp: '^{project}$'
+ branch-regexp: '{branch-regexp}'
+ dependency-jobs: '{dependency-jobs}'
+ file-include-regexp: '{all-files-regexp}'
+
+ properties:
+ - cord-infra-properties:
+ build-days-to-keep: '{build-days-to-keep}'
+ artifact-num-to-keep: '{artifact-num-to-keep}'
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: '20'
+ jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+ scm:
+ - cord-infra-gerrit-repo-scm:
+ manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
+ branch: '$GERRIT_BRANCH'
+ destination-dir: 'cord'
+
+ node: 'ubuntu16.04-basebuild-4c-8g'
+ project-type: freestyle
+ concurrent: true
+
+ builders:
+ - cord-infra-gerrit-repo-patch:
+ destination-dir: 'cord'
+ project: '$GERRIT_PROJECT'
+ change-number: '$GERRIT_CHANGE_NUMBER'
+ patchset-number: '$GERRIT_PATCHSET_NUMBER'
+ - shell: |
+ #!/usr/bin/env bash
+ set -ex -o pipefail
+
+ export XOS_DIR=$WORKSPACE/cord/orchestration/xos
+ export CHAMELEON_DIR=$WORKSPACE/cord/component/chameleon
+
+ #install minikube+helm
+ export MINIKUBE_WANTUPDATENOTIFICATION=false
+ export MINIKUBE_WANTREPORTERRORPROMPT=false
+ export CHANGE_MINIKUBE_NONE_USER=true
+ export MINIKUBE_HOME=$HOME
+ mkdir -p $HOME/.kube || true
+ touch $HOME/.kube/config
+ export KUBECONFIG=$HOME/.kube/config
+ sudo -E /usr/bin/minikube start --vm-driver=none
+ sleep 300
+
+ helm init
+ sleep 60
+ helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
+
+ # build chameleon container
+ cd $CHAMELEON_DIR
+ make DOCKER_REPOSITORY=xosproject/ docker-build
+
+ #deploy xos core
+ cd $WORKSPACE/cord/helm-charts
+ helm dep update xos-core
+ helm install --set images.xos_chameleon.tag=candidate -f examples/imagePullPolicy-IfNotPresent.yaml -n xos-core xos-core
+
+ #wait for xos-core and models to be loaded
+ timeout 300 bash -c "until http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/core/sites |jq '.items[0].name'|grep -q mysite; do echo 'Waiting for API To be up'; sleep 10; done"
+
+ #test apis
+ curl -Is -u admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/core/sites | grep -q '200 OK'
+ curl -Is -u wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/core/sites | grep '403 Forbidden'
+ curl -Is -u admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/utility/auth_noop | grep '405 Method Not Allowed'
+ curl -Is -u wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/utility/auth_noop | grep '405 Method Not Allowed'
+ curl -Is -u wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/utility/noop | grep '405 Method Not Allowed'
+ curl -Is GET http://127.0.0.1:30001/xosapi/v1/utility/noop | grep '405 Method Not Allowed'
diff --git a/jjb/xos-tosca-e2e.yaml b/jjb/xos-tosca-e2e.yaml
deleted file mode 100644
index dff9bea..0000000
--- a/jjb/xos-tosca-e2e.yaml
+++ /dev/null
@@ -1,85 +0,0 @@
----
-# xos tosca e2e test
-
-- job-template:
- id: 'xos-tosca-e2e-test'
- name: 'verify_{project}_e2e-test'
-
- description: |
- Created by {id} job-template from ci-management/jjb/xos-tosca-e2e.yaml
-
- triggers:
- - cord-infra-gerrit-trigger-patchset:
- gerrit-server-name: '{gerrit-server-name}'
- project-regexp: '^{project}$'
- branch-regexp: '{branch-regexp}'
- dependency-jobs: '{dependency-jobs}'
- file-include-regexp: '{all-files-regexp}'
-
- properties:
- - cord-infra-properties:
- build-days-to-keep: '{build-days-to-keep}'
- artifact-num-to-keep: '{artifact-num-to-keep}'
-
- wrappers:
- - lf-infra-wrappers:
- build-timeout: '20'
- jenkins-ssh-credential: '{jenkins-ssh-credential}'
-
- scm:
- - cord-infra-gerrit-repo-scm:
- manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
- branch: '$GERRIT_BRANCH'
- destination-dir: 'cord'
-
- node: 'ubuntu16.04-basebuild-4c-8g'
- project-type: freestyle
- concurrent: true
-
- builders:
- - cord-infra-gerrit-repo-patch:
- destination-dir: 'cord'
- project: '$GERRIT_PROJECT'
- change-number: '$GERRIT_CHANGE_NUMBER'
- patchset-number: '$GERRIT_PATCHSET_NUMBER'
- - shell: |
- #!/usr/bin/env bash
- set -ex -o pipefail
-
- export XOS_DIR=$WORKSPACE/cord/orchestration/xos
- export TOSCA_DIR=$WORKSPACE/cord/orchestration/xos-tosca
-
- #install minikube+helm
- export MINIKUBE_WANTUPDATENOTIFICATION=false
- export MINIKUBE_WANTREPORTERRORPROMPT=false
- export CHANGE_MINIKUBE_NONE_USER=true
- export MINIKUBE_HOME=$HOME
- mkdir -p $HOME/.kube || true
- touch $HOME/.kube/config
- export KUBECONFIG=$HOME/.kube/config
- sudo -E /usr/bin/minikube start --vm-driver=none
- sleep 300
-
- helm init
- sleep 60
- helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
-
- # build tosca container
- cd $TOSCA_DIR
- make build
-
- #deploy xos core
- cd $WORKSPACE/cord/helm-charts
- helm dep update xos-core
- helm install --set images.xos_tosca.tag=candidate -f examples/imagePullPolicy-IfNotPresent.yaml -n xos-core xos-core
-
- #wait for xos-core and models to be loaded
- timeout 300 bash -c "until http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/core/sites |jq '.items[0].name'|grep -q mysite; do echo 'Waiting for API To be up'; sleep 10; done"
-
- #test apis
- curl -Is -u admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/core/sites | grep -q '200 OK'
- curl -Is -u wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/core/sites | grep '403 Forbidden'
- curl -Is -u admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/utility/auth_noop | grep '405 Method Not Allowed'
- curl -Is -u wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/utility/auth_noop | grep '405 Method Not Allowed'
- curl -Is -u wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/utility/noop | grep '405 Method Not Allowed'
- curl -Is GET http://127.0.0.1:30001/xosapi/v1/utility/noop | grep '405 Method Not Allowed'
diff --git a/jjb/xos-tosca-unit.yaml b/jjb/xos-tosca-unit.yaml
deleted file mode 100644
index 2259350..0000000
--- a/jjb/xos-tosca-unit.yaml
+++ /dev/null
@@ -1,76 +0,0 @@
----
-# xos tosca unit test
-
-- job-template:
- id: 'xos-tosca-unit-test'
- name: 'verify_{project}_unit-test'
-
- description: |
- Created by {id} job-template from ci-management/jjb/xos-tosca-unit.yaml
-
- triggers:
- - cord-infra-gerrit-trigger-patchset:
- gerrit-server-name: '{gerrit-server-name}'
- project-regexp: '^{project}$'
- branch-regexp: '{branch-regexp}'
- dependency-jobs: '{dependency-jobs}'
- file-include-regexp: '{all-files-regexp}'
-
- properties:
- - cord-infra-properties:
- build-days-to-keep: '{build-days-to-keep}'
- artifact-num-to-keep: '{artifact-num-to-keep}'
-
- wrappers:
- - lf-infra-wrappers:
- build-timeout: '{build-timeout}'
- jenkins-ssh-credential: '{jenkins-ssh-credential}'
-
- scm:
- - cord-infra-gerrit-repo-scm:
- manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
- branch: '$GERRIT_BRANCH'
- destination-dir: 'cord'
-
- node: '{build-node}'
- project-type: freestyle
- concurrent: true
-
- builders:
- - cord-infra-gerrit-repo-patch:
- destination-dir: 'cord'
- project: '$GERRIT_PROJECT'
- change-number: '$GERRIT_CHANGE_NUMBER'
- patchset-number: '$GERRIT_PATCHSET_NUMBER'
- - shell: |
- #!/usr/bin/env bash
- set -ex -o pipefail
-
- export XOS_DIR=$WORKSPACE/cord/orchestration/xos
- export TOSCA_DIR=$WORKSPACE/cord/orchestration/xos-tosca
-
- # setup virtual env
- $XOS_DIR/scripts/setup_venv.sh
- source "$WORKSPACE/venv-xos/bin/activate"
- set -u
-
- # Run the tests
- pushd "$WORKSPACE/cord/orchestration/xos-tosca"
- make tests
- popd
-
- publishers:
- - junit:
- results: "**/nose2-junit.xml"
- - cobertura:
- report-file: "**/coverage.xml"
- targets:
- - files:
- healthy: 80
- unhealthy: 0
- failing: 0
- - method:
- healthy: 50
- unhealthy: 0
- failing: 0
-