summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rwxr-xr-xjjb/dovetail/dovetail-run.sh4
-rwxr-xr-xjjb/functest/functest-alpine.sh2
-rw-r--r--jjb/qtip/qtip-validate-jobs.yml6
-rw-r--r--jjb/releng/releng-release-create-branch.sh37
-rw-r--r--jjb/releng/releng-release-jobs.yml119
-rw-r--r--jjb/releng/releng-release-verify.sh27
-rwxr-xr-xjjb/xci/bifrost-verify.sh2
-rw-r--r--jjb/xci/xci-merge-jobs.yml2
-rwxr-xr-xjjb/xci/xci-promote.sh4
-rwxr-xr-xjjb/xci/xci-run-functest.sh5
-rwxr-xr-xjjb/xci/xci-start-new-vm.sh3
11 files changed, 206 insertions, 5 deletions
diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh
index 1c53dbee4..d01128385 100755
--- a/jjb/dovetail/dovetail-run.sh
+++ b/jjb/dovetail/dovetail-run.sh
@@ -95,7 +95,7 @@ cat $OPENRC
if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == "compass" ]]; then
compass_repo=${WORKSPACE}/compass4nfv/
git clone https://github.com/opnfv/compass4nfv.git ${compass_repo} >/dev/null
- pip install shyaml
+ sudo pip install shyaml
scenario_file=${compass_repo}/deploy/conf/hardware_environment/$NODE_NAME/os-nosdn-nofeature-ha.yml
ipmiIp=$(cat ${scenario_file} | shyaml get-value hosts.0.ipmiIp)
ipmiPass=$(cat ${scenario_file} | shyaml get-value hosts.0.ipmiPass)
@@ -165,7 +165,7 @@ if [[ ! -f ${DOVETAIL_CONFIG}/pod.yaml ]]; then
fi
if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then
- sudo chown jenkins:jenkins ${DOVETAIL_CONFIG}/pod.yaml
+ sudo chmod 666 ${DOVETAIL_CONFIG}/pod.yaml
echo "Adapt process info for $INSTALLER_TYPE ..."
attack_process='rabbitmq'
cat << EOF >> ${DOVETAIL_CONFIG}/pod.yaml
diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh
index bdd79c486..dfadf9a37 100755
--- a/jjb/functest/functest-alpine.sh
+++ b/jjb/functest/functest-alpine.sh
@@ -162,7 +162,7 @@ if [ "${INSTALLER_TYPE}" == 'fuel' ]; then
fi
-if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} =~ 'odl.*sfc' ]]; then
+if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} =~ 'sfc' ]]; then
ssh_key="/tmp/id_rsa"
user_config="/tmp/openstack_user_config.yml"
docker cp compass-tasks:/root/.ssh/id_rsa $ssh_key
diff --git a/jjb/qtip/qtip-validate-jobs.yml b/jjb/qtip/qtip-validate-jobs.yml
index 5c0bb881b..c5bf58391 100644
--- a/jjb/qtip/qtip-validate-jobs.yml
+++ b/jjb/qtip/qtip-validate-jobs.yml
@@ -34,12 +34,18 @@
pod: zte-virtual5
sut: ''
<<: *master
+ - network:
+ installer: apex
+ pod: zte-virtual5
+ sut: ''
+ <<: *master
- compute:
installer: fuel
pod: zte-virtual6
sut: vnf
<<: *master
+
# -------------------------------
# JOB LIST
# -------------------------------
diff --git a/jjb/releng/releng-release-create-branch.sh b/jjb/releng/releng-release-create-branch.sh
new file mode 100644
index 000000000..ec8365340
--- /dev/null
+++ b/jjb/releng/releng-release-create-branch.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+# SPDX-License-Identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 The Linux Foundation 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
+##############################################################################
+set -xe
+
+# Configure the git user/email as we'll be pushing up changes
+git config user.name "jenkins-ci"
+git config user.email "jenkins-opnfv-ci@opnfv.org"
+
+# Ensure we are able to generate Commit-IDs for new patchsets
+curl -kLo .git/hooks/commit-msg https://gerrit.opnfv.org/gerrit/tools/hooks/commit-msg
+chmod +x .git/hooks/commit-msg
+
+# Activate virtualenv, supressing shellcheck warning
+# shellcheck source=/dev/null
+. $WORKSPACE/venv/bin/activate
+pip install -r releases/scripts/requirements.txt
+
+STREAM=${STREAM:-'nostream'}
+RELEASE_FILES=$(git diff HEAD^1 --name-only -- "releases/$STREAM")
+
+for release_file in $RELEASE_FILES; do
+ python releases/scripts/create_branch.py -f $release_file
+ python releases/scripts/create_jobs.py -f $release_file
+ NEW_FILES=$(git status --porcelain --untracked=no | cut -c4-)
+ if [ -n "$NEW_FILES" ]; then
+ git add $NEW_FILES
+ git commit -m "Create Stable Branch Jobs for $(basename $release_file .yaml)"
+ git push origin HEAD:refs/for/master
+ fi
+done
diff --git a/jjb/releng/releng-release-jobs.yml b/jjb/releng/releng-release-jobs.yml
new file mode 100644
index 000000000..b581b163c
--- /dev/null
+++ b/jjb/releng/releng-release-jobs.yml
@@ -0,0 +1,119 @@
+# SPDX-License-Identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 The Linux Foundation 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
+##############################################################################
+---
+- project:
+ name: releng-release-jobs
+
+ stream:
+ - fraser
+
+ jobs:
+ - 'releng-release-{stream}-verify'
+ - 'releng-release-{stream}-merge'
+
+ project: 'releng'
+
+- job-template:
+ name: 'releng-release-{stream}-verify'
+
+ parameters:
+ - stream-parameter:
+ stream: '{stream}'
+ - project-parameter:
+ project: '{project}'
+ branch: 'master'
+
+ scm:
+ - git-scm-gerrit
+
+ triggers:
+ - gerrit:
+ server-name: 'gerrit.opnfv.org'
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'false'
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: 'releng'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/master'
+ file-paths:
+ - compare-type: ANT
+ pattern: 'releases/{stream}/**'
+ - compare-type: ANT
+ pattern: 'releases/schema.yaml'
+ - compare-type: ANT
+ pattern: 'releases/scripts/verify_schema.py'
+
+ builders:
+ - create-virtualenv
+ - shell:
+ !include-raw-escape: releng-release-verify.sh
+
+ publishers:
+ - email-jenkins-admins-on-failure
+
+- job-template:
+ name: 'releng-release-{stream}-merge'
+
+ parameters:
+ - node:
+ name: SLAVE_NAME
+ description: 'Only run merge job on build1'
+ default-slaves:
+ - lf-build1
+ allowed-multiselect: false
+ ignore-offline-nodes: true
+ - stream-parameter:
+ stream: '{stream}'
+ - project-parameter:
+ project: '{project}'
+ branch: 'master'
+
+ scm:
+ - git-scm-gerrit
+
+ triggers:
+ - gerrit-trigger-change-merged:
+ project: '{project}'
+ branch: 'master'
+ files: 'releases/**'
+
+ builders:
+ - create-virtualenv
+ - shell:
+ !include-raw-escape: releng-release-create-branch.sh
+
+ publishers:
+ - email-jenkins-admins-on-failure
+
+- parameter:
+ name: stream-parameter
+ parameters:
+ - string:
+ name: STREAM
+ default: '{stream}'
+ description: "OPNFV Stable Stream"
+
+- builder:
+ name: create-virtualenv
+ builders:
+ - shell: |
+ #!/bin/bash
+ sudo pip install virtualenv
+ virtualenv $WORKSPACE/venv
+ . $WORKSPACE/venv/bin/activate
+ pip install --upgrade pip
diff --git a/jjb/releng/releng-release-verify.sh b/jjb/releng/releng-release-verify.sh
new file mode 100644
index 000000000..c1262e2c9
--- /dev/null
+++ b/jjb/releng/releng-release-verify.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# SPDX-License-Identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 The Linux Foundation 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
+##############################################################################
+set -xe
+
+# Activate virtualenv, supressing shellcheck warning
+# shellcheck source=/dev/null
+. $WORKSPACE/venv/bin/activate
+pip install -r releases/scripts/requirements.txt
+
+STREAM=${STREAM:-'nostream'}
+RELEASE_FILES=$(git diff HEAD^1 --name-only -- "releases/$STREAM")
+
+# TODO: The create_branch.py should be refactored so it can be used here
+# to verify the commit exists that is being added, along with
+# jjb/<project>
+for release_file in $RELEASE_FILES; do
+ python releases/scripts/verify_schema.py \
+ -s releases/schema.yaml \
+ -y $release_file
+done
diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh
index 9219d0020..9d524bcb0 100755
--- a/jjb/xci/bifrost-verify.sh
+++ b/jjb/xci/bifrost-verify.sh
@@ -17,7 +17,7 @@ cd $WORKSPACE
git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD
# combine opnfv and upstream scripts/playbooks
-/bin/cp -rf $WORKSPACE/releng-xci/bifrost/* $WORKSPACE/
+/bin/cp -rf $WORKSPACE/releng-xci/xci/infra/bifrost/* $WORKSPACE/
cd $WORKSPACE/releng-xci
cat > bifrost_test.sh<<EOF
diff --git a/jjb/xci/xci-merge-jobs.yml b/jjb/xci/xci-merge-jobs.yml
index d6442a976..e4e5705a7 100644
--- a/jjb/xci/xci-merge-jobs.yml
+++ b/jjb/xci/xci-merge-jobs.yml
@@ -87,6 +87,8 @@
pattern: 'prototypes/**'
- compare-type: ANT
pattern: 'upstream/**'
+ - compare-type: ANT
+ pattern: 'INFO.yaml'
- project-compare-type: 'REG_EXP'
project-pattern: 'sfc|sdnvpn'
branches:
diff --git a/jjb/xci/xci-promote.sh b/jjb/xci/xci-promote.sh
index fb7e0e6fa..4e72dc8ab 100755
--- a/jjb/xci/xci-promote.sh
+++ b/jjb/xci/xci-promote.sh
@@ -30,6 +30,10 @@ if [ ! -f $LOCAL_PROMOTION_METADATA_FILE ]; then
exit 1
fi
+# put additional info into the metadata file so we can use that for displaying the information
+echo "PROMOTED_BY=$BUILD_URL" >> $LOCAL_PROMOTION_METADATA_FILE
+echo "PROMOTED_ON=$(date -u '+%F_%H:%M'UTC)" >> $LOCAL_PROMOTION_METADATA_FILE
+
# upload promotion metadata file to OPNFV artifact repo
echo "Storing promotion metadata as $REMOTE_PROMOTION_METADATA_FILE"
gsutil cp $LOCAL_PROMOTION_METADATA_FILE $REMOTE_PROMOTION_METADATA_FILE > /dev/null 2>&1
diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh
index 2e343631b..aa98e07aa 100755
--- a/jjb/xci/xci-run-functest.sh
+++ b/jjb/xci/xci-run-functest.sh
@@ -49,7 +49,10 @@ if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENT
exit 0
fi
-ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "cd releng-xci/xci && PATH=/home/devuser/.local/bin:$PATH ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml"
+# set XCI_VENV for ansible
+export XCI_VENV=/home/devuser/releng-xci/venv
+
+ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; cd releng-xci/xci && ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml"
echo "Running functest"
ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "/root/run-functest.sh"
echo "Functest log"
diff --git a/jjb/xci/xci-start-new-vm.sh b/jjb/xci/xci-start-new-vm.sh
index 7874e6776..dd953e927 100755
--- a/jjb/xci/xci-start-new-vm.sh
+++ b/jjb/xci/xci-start-new-vm.sh
@@ -63,6 +63,9 @@ export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/
export INSTALLER_TYPE=$INSTALLER_TYPE
export GIT_BASE=$GIT_BASE
export JENKINS_HOME=$JENKINS_HOME
+export CI_LOOP=$CI_LOOP
+export BUILD_TAG=$BUILD_TAG
+export NODE_NAME=$NODE_NAME
if [[ ! -z ${WORKSPACE+x} && $GERRIT_PROJECT != "releng-xci" ]]; then
git clone https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT xci/scenarios/$DEPLOY_SCENARIO && cd xci/scenarios/$DEPLOY_SCENARIO