summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/compass4nfv/compass-dovetail-jobs.yml209
-rw-r--r--jjb/doctor/doctor.yml8
-rw-r--r--jjb/global/releng-macros.yml6
-rwxr-xr-xprototypes/bifrost/scripts/destroy-env.sh2
-rw-r--r--utils/test/vnfcatalogue/helpers/README.md22
-rw-r--r--utils/test/vnfcatalogue/helpers/migrate.js78
-rw-r--r--utils/test/vnfcatalogue/helpers/schema.js51
7 files changed, 371 insertions, 5 deletions
diff --git a/jjb/compass4nfv/compass-dovetail-jobs.yml b/jjb/compass4nfv/compass-dovetail-jobs.yml
new file mode 100644
index 000000000..3337cd0ca
--- /dev/null
+++ b/jjb/compass4nfv/compass-dovetail-jobs.yml
@@ -0,0 +1,209 @@
+- project:
+
+ name: 'compass-dovetail-jobs'
+ installer: 'compass'
+ project: 'compass4nfv'
+#----------------------------------
+# BRANCH ANCHORS
+#----------------------------------
+ colorado: &colorado
+ stream: colorado
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+ disabled: false
+ dovetail-branch: master
+#------------------------------------
+# POD, INSTALLER, AND BRANCH MAPPING
+#------------------------------------
+# CI PODs
+#------------------------------------
+ pod:
+ - baremetal:
+ slave-label: compass-baremetal
+ os-version: 'trusty'
+ <<: *colorado
+#-----------------------------------
+# scenarios
+#-----------------------------------
+ scenario:
+ - 'os-nosdn-nofeature-ha':
+ disabled: false
+ auto-trigger-name: 'weekly-trigger-disabled'
+
+ jobs:
+ - 'compass-{scenario}-{pod}-weekly-{stream}'
+ - 'compass-deploy-{pod}-weekly-{stream}'
+
+########################
+# job templates
+########################
+- job-template:
+ name: 'compass-{scenario}-{pod}-weekly-{stream}'
+
+ disabled: '{obj:disabled}'
+
+ concurrent: false
+
+ properties:
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - 'compass-os-.*?-{pod}-daily-.*?'
+ - 'compass-os-.*?-{pod}-weekly-.*?'
+ block-level: 'NODE'
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+
+ triggers:
+ - '{auto-trigger-name}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - compass-ci-parameter:
+ installer: '{installer}'
+ gs-pathname: '{gs-pathname}'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: '{scenario}'
+ - '{slave-label}-defaults'
+ - '{installer}-defaults'
+
+ triggers:
+ - '{auto-trigger-name}'
+
+ builders:
+ - description-setter:
+ description: "POD: $NODE_NAME"
+ - trigger-builds:
+ - project: 'compass-deploy-{pod}-weekly-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ DEPLOY_SCENARIO={scenario}
+ COMPASS_OS_VERSION={os-version}
+ same-node: true
+ block: true
+ - trigger-builds:
+ - project: 'dovetail-compass-{pod}-compliance_set-weekly-{stream}'
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO={scenario}
+ block: true
+ same-node: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
+ - trigger-builds:
+ - project: 'dovetail-compass-{pod}-debug-weekly-{stream}'
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO={scenario}
+ block: true
+ same-node: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
+ - trigger-builds:
+ - project: 'dovetail-compass-{pod}-proposed_tests-weekly-{stream}'
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO={scenario}
+ block: true
+ same-node: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
+
+- job-template:
+ name: 'compass-deploy-{pod}-weekly-{stream}'
+
+ disabled: false
+
+ concurrent: true
+
+ properties:
+ - logrotate-default
+ - throttle:
+ enabled: true
+ max-total: 4
+ max-per-node: 1
+ option: 'project'
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - 'compass-deploy-{pod}-daily-.*?'
+ - 'compass-deploy-{pod}-weekly-.*'
+ - 'compass-verify-deploy-.*?'
+ block-level: 'NODE'
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+ - timeout:
+ timeout: 120
+ abort: true
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - compass-ci-parameter:
+ installer: '{installer}'
+ gs-pathname: '{gs-pathname}'
+ - '{slave-label}-defaults'
+ - '{installer}-defaults'
+
+ scm:
+ - git-scm
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+
+
+ builders:
+ - description-setter:
+ description: "POD: $NODE_NAME"
+ - shell:
+ !include-raw-escape: ./compass-download-artifact.sh
+ - shell:
+ !include-raw-escape: ./compass-deploy.sh
+
+ publishers:
+ - archive:
+ artifacts: 'ansible.log'
+ allow-empty: 'true'
+ fingerprint: true
+
+########################
+# parameter macros
+########################
+- parameter:
+ name: compass-dovetail-parameter
+ parameters:
+ - string:
+ name: BUILD_DIRECTORY
+ default: $WORKSPACE/build_output
+ description: "Directory where the build artifact will be located upon the completion of the build."
+ - string:
+ name: GS_URL
+ default: '$GS_BASE{gs-pathname}'
+ description: "URL to Google Storage."
+ - choice:
+ name: COMPASS_OPENSTACK_VERSION
+ choices:
+ - 'mitaka'
+
+########################
+# trigger macros
+########################
+- trigger:
+ name: 'compass-os-nosdn-nofeature-ha-baremetal-weekly-colorado-trigger'
+ triggers:
+ - timed: ''
diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml
index 11b4ffbc2..2333fca14 100644
--- a/jjb/doctor/doctor.yml
+++ b/jjb/doctor/doctor.yml
@@ -22,10 +22,9 @@
- fuel:
slave-label: 'ool-virtual2'
pod: 'ool-virtual2'
- # TODO(r-mibu): enable this once joid is ready
- #- joid:
- # slave-label: 'ool-virtual3'
- # pod: 'ool-virtual3'
+ - joid:
+ slave-label: 'ool-virtual3'
+ pod: 'ool-virtual3'
inspector:
- 'sample'
@@ -145,6 +144,7 @@
branch: '{branch}'
builders:
+ - 'clean-workspace-log'
- 'functest-suite-builder'
- shell: |
functest_log="$HOME/opnfv/functest/results/{stream}/{project}.log"
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index e6440966a..7e11d92f6 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -423,6 +423,12 @@
sed -r -i '4,$s/^/ /g' lint.log
fi
+- builder:
+ name: clean-workspace-log
+ builders:
+ - shell: |
+ find $WORKSPACE -type f -print -name '*.log' | xargs rm -f
+
- publisher:
name: archive-artifacts
publishers:
diff --git a/prototypes/bifrost/scripts/destroy-env.sh b/prototypes/bifrost/scripts/destroy-env.sh
index 9920046e1..f6c66a876 100755
--- a/prototypes/bifrost/scripts/destroy-env.sh
+++ b/prototypes/bifrost/scripts/destroy-env.sh
@@ -33,7 +33,7 @@ fi
echo "removing leases"
[[ -e /var/lib/misc/dnsmasq/dnsmasq.leases ]] && > /var/lib/misc/dnsmasq/dnsmasq.leases
echo "removing logs"
-rm -rf /var/log/libvirt/baremetal_logs/*.log
+rm -rf /var/log/libvirt/baremetal_logs/*
# clean up dib images only if requested explicitly
CLEAN_DIB_IMAGES=${CLEAN_DIB_IMAGES:-false}
diff --git a/utils/test/vnfcatalogue/helpers/README.md b/utils/test/vnfcatalogue/helpers/README.md
new file mode 100644
index 000000000..6c0ca78c3
--- /dev/null
+++ b/utils/test/vnfcatalogue/helpers/README.md
@@ -0,0 +1,22 @@
+# Helper Directory
+
+## Helper to migrate database
+
+First make sure nodejs and mysql are installed. Then use
+
+```bash
+npm install bookshelf mysql knex when lodash --save
+```
+
+Create a database named **vnf_catalogue**.
+Enter the mysql credentials in migrate.js.
+
+Then use
+
+```bash
+node migrate
+```
+
+If successful the script will return success message. The current script is
+idempotent is nature, if run twice it will just return error and write nothing.
+
diff --git a/utils/test/vnfcatalogue/helpers/migrate.js b/utils/test/vnfcatalogue/helpers/migrate.js
new file mode 100644
index 000000000..ec209053c
--- /dev/null
+++ b/utils/test/vnfcatalogue/helpers/migrate.js
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Kumar Rishabh(penguinRaider) and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License, Version 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *******************************************************************************/
+
+var knex = require('knex')({
+ client: 'mysql',
+ connection: {
+ host : 'localhost',
+ user : '*',
+ password : '*',
+ database : 'vnf_catalogue',
+ charset : 'utf8'
+ }
+});
+var Schema = require('./schema');
+var sequence = require('when/sequence');
+var _ = require('lodash');
+function createTable(tableName) {
+ return knex.schema.createTable(tableName, function (table) {
+ var column;
+ var columnKeys = _.keys(Schema[tableName]);
+ _.each(columnKeys, function (key) {
+ if (Schema[tableName][key].type === 'text' && Schema[tableName][key].hasOwnProperty('fieldtype')) {
+ column = table[Schema[tableName][key].type](key, Schema[tableName][key].fieldtype);
+ }
+ else if (Schema[tableName][key].type === 'string' && Schema[tableName][key].hasOwnProperty('maxlength')) {
+ column = table[Schema[tableName][key].type](key, Schema[tableName][key].maxlength);
+ }
+ else {
+ column = table[Schema[tableName][key].type](key);
+ }
+ if (Schema[tableName][key].hasOwnProperty('nullable') && Schema[tableName][key].nullable === true) {
+ column.nullable();
+ }
+ else {
+ column.notNullable();
+ }
+ if (Schema[tableName][key].hasOwnProperty('primary') && Schema[tableName][key].primary === true) {
+ column.primary();
+ }
+ if (Schema[tableName][key].hasOwnProperty('unique') && Schema[tableName][key].unique) {
+ column.unique();
+ }
+ if (Schema[tableName][key].hasOwnProperty('unsigned') && Schema[tableName][key].unsigned) {
+ column.unsigned();
+ }
+ if (Schema[tableName][key].hasOwnProperty('references')) {
+ column.references(Schema[tableName][key].references);
+ }
+ if (Schema[tableName][key].hasOwnProperty('defaultTo')) {
+ column.defaultTo(Schema[tableName][key].defaultTo);
+ }
+ });
+ });
+}
+function createTables () {
+ var tables = [];
+ var tableNames = _.keys(Schema);
+ tables = _.map(tableNames, function (tableName) {
+ return function () {
+ return createTable(tableName);
+ };
+ });
+ return sequence(tables);
+}
+createTables()
+.then(function() {
+ console.log('Tables created!!');
+ process.exit(0);
+})
+.catch(function (error) {
+ throw error;
+});
diff --git a/utils/test/vnfcatalogue/helpers/schema.js b/utils/test/vnfcatalogue/helpers/schema.js
new file mode 100644
index 000000000..2aaf99ae2
--- /dev/null
+++ b/utils/test/vnfcatalogue/helpers/schema.js
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Kumar Rishabh(penguinRaider) and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License, Version 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *******************************************************************************/
+var Schema = {
+ photo: {
+ photo_id: {type: 'increments', nullable: false, primary: true},
+ photo_url: {type: 'string', maxlength: 254, nullable: false}
+ },
+ user: {
+ user_id: {type: 'increments', nullable: false, primary: true},
+ user_name: {type: 'string', maxlength: 254, nullable: false},
+ password: {type: 'string', maxlength: 150, nullable: false},
+ email_id: {type: 'string', maxlength: 254, nullable: false, unique: true, validations: {isEmail: true}},
+ photo_id: {type: 'integer', nullable: true, unsigned: true, references: 'photo.photo_id'},
+ company: {type: 'string', maxlength: 254, nullable: false},
+ introduction: {type: 'string', maxlength: 510, nullable: false},
+ last_login: {type: 'dateTime', nullable: true},
+ created_at: {type: 'dateTime', nullable: false},
+ },
+ vnf: {
+ vnf_id: {type: 'increments', nullable: false, primary: true},
+ vnf_name: {type: 'string', maxlength: 254, nullable: false},
+ repo_url: {type: 'string', maxlength: 254, nullable: false},
+ photo_id: {type: 'integer', nullable: true, unsigned: true, references: 'photo.photo_id'},
+ submitter_id: {type: 'integer', nullable: false, unsigned: true, references: 'user.user_id'},
+ lines_of_code: {type: 'integer', nullable: true, unsigned: true},
+ versions: {type: 'integer', nullable: true, unsigned: true},
+ no_of_developers: {type: 'integer', nullable: true, unsigned: true},
+ },
+ tag: {
+ tag_id: {type: 'increments', nullable: false, primary: true},
+ name: {type: 'string', maxlength: 150, nullable: false}
+ },
+ vnf_tags: {
+ vnf_tag_id: {type: 'increments', nullable: false, primary: true},
+ tag_id: {type: 'integer', nullable: false, unsigned: true, references: 'tag.tag_id'},
+ vnf_id: {type: 'integer', nullable: false, unsigned: true, references: 'vnf.vnf_id'},
+ },
+ vnf_contributors: {
+ vnf_contributors_id: {type: 'increments', nullable: false, primary: true},
+ user_id: {type: 'integer', nullable: false, unsigned: true, references: 'user.user_id'},
+ vnf_id: {type: 'integer', nullable: false, unsigned: true, references: 'vnf.vnf_id'},
+ created_at: {type: 'dateTime', nullable: false},
+ }
+};
+module.exports = Schema;