diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/apex/opnfv-apex.yml | 4 | ||||
-rw-r--r-- | jjb/compass4nfv/compass4nfv.yml | 14 | ||||
-rw-r--r-- | jjb/compass4nfv/opnfv-compass4nfv.yml | 4 | ||||
-rw-r--r-- | jjb/fuel/opnfv-fuel.yml | 4 | ||||
-rw-r--r-- | jjb/functest/functest.yml | 18 | ||||
-rw-r--r-- | jjb/joid/joid-deploy.sh | 24 | ||||
-rw-r--r-- | jjb/joid/joid.yml | 122 | ||||
-rw-r--r-- | jjb/opnfv/installer-params.yml | 48 | ||||
-rw-r--r-- | jjb/opnfv/pod-params.yml | 15 | ||||
-rw-r--r-- | jjb/vswitchperf/vswitchperf.yml | 67 |
10 files changed, 209 insertions, 111 deletions
diff --git a/jjb/apex/opnfv-apex.yml b/jjb/apex/opnfv-apex.yml index de2947cec..5240bbabb 100644 --- a/jjb/apex/opnfv-apex.yml +++ b/jjb/apex/opnfv-apex.yml @@ -80,5 +80,5 @@ builders: - shell: | #!/bin/bash - echo "Hello World from OPNFV $INSTALLER_NAME" - echo "Running $INSTALLER_NAME with controller $CONTROLLER" + echo "Hello World from OPNFV $INSTALLER_TYPE" + echo "Running $INSTALLER_TYPE with controller $CONTROLLER" diff --git a/jjb/compass4nfv/compass4nfv.yml b/jjb/compass4nfv/compass4nfv.yml index 952a01b37..3645bbba3 100644 --- a/jjb/compass4nfv/compass4nfv.yml +++ b/jjb/compass4nfv/compass4nfv.yml @@ -316,12 +316,12 @@ name: PPA_CACHE default: "$WORKSPACE/work/repo/" - choice: - name: COMPASS-OPENSTACK-VERSION + name: COMPASS_OPENSTACK_VERSION choices: - 'liberty' - 'juno' - choice: - name: COMPASS-OS-VERSION + name: COMPASS_OS_VERSION choices: - 'ubuntu-trusty' - 'rhel7' @@ -415,6 +415,8 @@ export EXTERNAL_NIC=vnic_ci cd $WORKSPACE + export OS_VERSION=${COMPASS_OS_VERSION} + export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION} ./deploy.sh $FLAVOR_CONF if [ $? -ne 0 ]; then echo "depolyment failed!" @@ -426,7 +428,7 @@ echo "Done!" ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" - sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_${COMPASS-OPENSTACK-VERSION}-opnfv2/ansible.log ./ &> /dev/null + sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null exit $deploy_ret @@ -449,8 +451,8 @@ cd $WORKSPACE - export OS_VERSION=${COMPASS-OS-VERSION} - export OPENSTACK_VERSION=${COMPASS-OPENSTACK-VERSION} + export OS_VERSION=${COMPASS_OS_VERSION} + export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION} ./deploy.sh --dha $CONFDIR/dha.yml --network $CONFDIR/network.yml if [ $? -ne 0 ]; then echo "depolyment failed!" @@ -462,7 +464,7 @@ echo "Done!" ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" - sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_${COMPASS-OPENSTACK-VERSION}-opnfv2/ansible.log ./ &> /dev/null + sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null exit $deploy_ret diff --git a/jjb/compass4nfv/opnfv-compass4nfv.yml b/jjb/compass4nfv/opnfv-compass4nfv.yml index c647abcf8..288c7abe6 100644 --- a/jjb/compass4nfv/opnfv-compass4nfv.yml +++ b/jjb/compass4nfv/opnfv-compass4nfv.yml @@ -80,5 +80,5 @@ builders: - shell: | #!/bin/bash - echo "Hello World from OPNFV $INSTALLER_NAME" - echo "Running $INSTALLER_NAME with controller $CONTROLLER" + echo "Hello World from OPNFV $INSTALLER_TYPE" + echo "Running $INSTALLER_TYPE with controller $CONTROLLER" diff --git a/jjb/fuel/opnfv-fuel.yml b/jjb/fuel/opnfv-fuel.yml index a0fbce26b..393f919d0 100644 --- a/jjb/fuel/opnfv-fuel.yml +++ b/jjb/fuel/opnfv-fuel.yml @@ -120,5 +120,5 @@ builders: - shell: | #!/bin/bash - echo "Hello World from OPNFV $INSTALLER_NAME" - echo "Running $INSTALLER_NAME with controller $CONTROLLER" + echo "Hello World from OPNFV $INSTALLER_TYPE" + echo "Running $INSTALLER_TYPE with controller $CONTROLLER" diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml index 1a9ba6239..155bbcfdf 100644 --- a/jjb/functest/functest.yml +++ b/jjb/functest/functest.yml @@ -190,26 +190,30 @@ - shell: | #!/bin/bash set +e + # labconfig is used only for joid + labconfig="" if [[ ${INSTALLER_TYPE} == 'apex' ]]; then INSTALLER_IP=$(grep instack /var/lib/libvirt/dnsmasq/default.leases \ |awk '{print $3}' | head -n 1) sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa" sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable + elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then + # If production lab then creds may be retrieved dynamically + # creds are on the jumphost, always in the same folder + labconfig="-v ${HOME}/joid_config/admin-openrc:/home/opnfv/functest/conf/openstack.creds" + # If dev lab, credentials may not be the default ones, just provide a path to put them into docker + # replace the default one by the customized one provided by jenkins config + if [ -n "${LAB_CONFIG}" ]; then + labconfig="-v ${LAB_CONFIG}:/home/opnfv/functest/conf/openstack.creds" + fi fi echo "Functest: Start Docker and prepare environment" envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME}" - labconfig="" - # If production lab then creds may be retrieved dynamically - # If dev lab, credentials may not be the default ones, just provide a path to put them into docker - if [ -n "${LAB_CONFIG}" ]; then - labconfig="-v ${LAB_CONFIG}:/home/opnfv/functest/conf/openstack.creds" - fi dir_result="${HOME}/opnfv/functest/reports" mkdir -f ${dir_result} rm -rf ${dir_result}/* - $res_volume="-v ${dir_result}:/home/opnfv/functest/results" docker pull opnfv/functest:latest_stable diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh index d9ce86eb4..b7bc32df2 100644 --- a/jjb/joid/joid-deploy.sh +++ b/jjb/joid/joid-deploy.sh @@ -2,10 +2,12 @@ set +e set -o nounset +JOID_LOCAL_CONFIG_FOLDER=$HOME/joid_config +JOID_ADMIN_OPENRC=$JOID_LOCAL_CONFIG_FOLDER/admin-openrc + ####### Temporary - to be done with jenkins params ##### JOID_MODE=ha JOID_RELEASE=liberty -JOID_LOCAL_CONFIG_FOLDER=~/joid_config JOID_SDN_CONTROLLER=odl ################# @@ -33,7 +35,6 @@ else export OS_ADMIN_PASSWORD=openstack export CEPH_DISKS=/srv export CEPH_REFORMAT=no - export JOID_ADMIN_OPENRC=$WORKSPACE/admin_openrc.sh fi ## @@ -47,8 +48,8 @@ if [ -e "$JOID_LOCAL_CONFIG_FOLDER/environments.yaml" ] && [ "$MAAS_REINSTALL" = else MAASCONFIG=$WORKSPACE/ci/maas/$POD_DC/$POD_NUM/deployment.yaml echo "------ Set MAAS password ------" - sed -i -- 's/user: ubuntu/user: $MAAS_USER/' $MAASCONFIG - sed -i -- 's/password: ubuntu/password: $MAAS_PASSWORD/' $MAASCONFIG + sed -i -- "s/user: ubuntu/user: $MAAS_USER/" $MAASCONFIG + sed -i -- "s/password: ubuntu/password: $MAAS_PASSWORD/" $MAASCONFIG echo "------ Redeploy MAAS ------" ./02-maasdeploy.sh $POD_NAME fi @@ -86,9 +87,16 @@ echo "Execute: ./deploy.sh -t $JOID_MODE -o $JOID_RELEASE -s $JOID_SDN_CONTROLLE ## Set Admin RC ## -echo "------ Create OpenRC file ------" -KEYSTONE=$(cat bundle.yaml |shyaml get-value openstack-phase2.services.keystone.options.vip) +echo "------ Create OpenRC file [$JOID_ADMIN_OPENRC] ------" +KEYSTONE=$(cat bundles.yaml |shyaml get-value openstack-phase2.services.keystone.options.vip) + +# create the folder if needed +JOID_ADMIN_OPENRC_FOLDER=$(echo $JOID_ADMIN_OPENRC | perl -pe "s|^(.*/).*?$|\1|") +if [ ! -d "$JOID_ADMIN_OPENRC_FOLDER" ]; then + mkdir -p $JOID_ADMIN_OPENRC_FOLDER +fi +# export the openrc file cat << EOF > $JOID_ADMIN_OPENRC export OS_USERNAME=admin export OS_PASSWORD=$OS_ADMIN_PASSWORD @@ -97,6 +105,10 @@ export OS_AUTH_URL=http://$KEYSTONE:5000/v2.0 export OS_REGION_NAME=Canonical EOF +## +## Backup local juju env +## + if [ -d "$JOID_LOCAL_CONFIG_FOLDER" ]; then echo "------ Backup Juju environment ------" cp environments.yaml $JOID_LOCAL_CONFIG_FOLDER/ diff --git a/jjb/joid/joid.yml b/jjb/joid/joid.yml index fdeddc680..90b3df682 100644 --- a/jjb/joid/joid.yml +++ b/jjb/joid/joid.yml @@ -5,39 +5,60 @@ name: 'joid' + project: '{name}' + installer: 'joid' - controller: 'odl' + sdn-controller: + - 'nosdn': + disabled: true + - 'odl': + disabled: false + - 'onos': + disabled: true + - 'opencontrail': + disabled: true pod: - 'intel-pod5' - 'orange-pod2' +# only master branch is enabled at the moment to keep no of jobs sane stream: - master: - branch: 'master' + branch: '{stream}' gs-pathname: '' +# - brahmaputra: +# branch: 'stable/{stream}' +# gs-pathname: '{stream}' jobs: - - 'joid-{controller}-{pod}-daily-{stream}' + - 'joid-{sdn-controller}-{pod}-daily-{stream}' - 'joid-deploy-{pod}-daily-{stream}' ######################## # job templates ######################## - job-template: - name: 'joid-{controller}-{pod}-daily-{stream}' + name: 'joid-{sdn-controller}-{pod}-daily-{stream}' - disabled: false + project-type: multijob + + disabled: '{obj:disabled}' concurrent: false parameters: - project-parameter: - project: '{installer}' - - 'intel-us-build-1-defaults' - - '{installer}-defaults': - controller: '{controller}' + project: '{project}' + - '{pod}-defaults' + - '{installer}-defaults' + - string: + name: SDN_CONTROLLER + default: '{sdn-controller}' + - string: + name: OPNFV_FEATURE + default: 'none' scm: - git-scm: @@ -46,12 +67,9 @@ branch: '{branch}' builders: - - trigger-builds: - - project: 'joid-deploy-{pod}-daily-{stream}' - git-revision: true - block: true - predefined-parameters: - CONTROLLER={controller} + - '{installer}-multijob-{pod}-builder': + pod: '{pod}' + stream: '{stream}' - job-template: name: 'joid-deploy-{pod}-daily-{stream}' @@ -62,14 +80,13 @@ wrappers: - build-name: - name: '$BUILD_NUMBER: {installer} $CONTROLLER' + name: '$BUILD_NUMBER: $INSTALLER_TYPE $SDN_CONTROLLER' parameters: - project-parameter: - project: '{installer}' + project: '{project}' - '{pod}-defaults' - - '{installer}-defaults': - controller: '{controller}' + - '{installer}-defaults' scm: - git-scm: @@ -81,6 +98,58 @@ - '{pod}-builder' ######################## +# multijob builder macros +######################## +# intel-pod5 is CI POD so full CI will run on it +# deploy, functest, yardstick +- builder: + name: joid-multijob-intel-pod5-builder + builders: + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'joid-deploy-{pod}-daily-{stream}' + current-parameters: true + git-revision: true + kill-phase-on: FAILURE + - multijob: + name: functest + condition: COMPLETED + projects: + - name: 'functest-joid-{pod}-daily-{stream}' + current-parameters: true + kill-phase-on: NEVER +# yardstick placeholder +# - multijob: +# name: yardstick +# condition: COMPLETED +# projects: +# - name: 'yardstick-joid-{pod}-daily-{stream}' +# current-parameters: true +# kill-phase-on: NEVER + +# orange-pod2 is NOT a CI POD so only the selected jobs will run +# deploy and functest currently +- builder: + name: joid-multijob-orange-pod2-builder + builders: + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'joid-deploy-{pod}-daily-{stream}' + current-parameters: true + git-revision: true + kill-phase-on: FAILURE + - multijob: + name: functest + condition: COMPLETED + projects: + - name: 'functest-joid-{pod}-daily-{stream}' + current-parameters: true + kill-phase-on: NEVER +######################## # builder macros ######################## - builder: @@ -88,26 +157,25 @@ builders: - shell: | #!/bin/bash - echo "Running $INSTALLER_NAME with controller $CONTROLLER" + echo "Running $INSTALLER_TYPE with controller $SDN_CONTROLLER" echo "Please note that this is a quick try to see how joid deployment works" echo echo "Executing clean.sh" cd $WORKSPACE/ci ./clean.sh - - shell: | - cd $WORKSPACE/ci + echo echo "Executing 02-maasdeploy.sh intelpod5" ./02-maasdeploy.sh intelpod5 - - shell: | - cd $WORKSPACE/ci - echo "Executing deploy.sh -o liberty -s $CONTROLLER -t ha -l intelpod5" - ./deploy.sh -o liberty -s $CONTROLLER -t ha -l intelpod5 + echo + echo "Executing deploy.sh -o liberty -s $SDN_CONTROLLER -t ha -l intelpod5" + ./deploy.sh -o liberty -s $SDN_CONTROLLER -t ha -l intelpod5 + - builder: name: orange-pod2-builder builders: - shell: | #!/bin/bash - echo "Running $INSTALLER_NAME with controller $CONTROLLER" + echo "Running $INSTALLER_TYPE with controller $SDN_CONTROLLER" echo "Please note that this is WIP generic builder" echo echo "Executing clean.sh" diff --git a/jjb/opnfv/installer-params.yml b/jjb/opnfv/installer-params.yml index 8e1cf9e7a..72c1c71a3 100644 --- a/jjb/opnfv/installer-params.yml +++ b/jjb/opnfv/installer-params.yml @@ -6,13 +6,17 @@ default: '192.168.X.X' description: 'IP of the installer' - string: - name: INSTALLER_NAME + name: INSTALLER_TYPE default: apex description: 'Installer used for deploying OPNFV on this POD' - string: - name: INSTALLER_TYPE - default: $INSTALLER_NAME - description: 'Installer used for deploying OPNFV on this POD' + name: SDN_CONTROLLER + default: 'nosdn' + description: 'SDN Controller to use' + - string: + name: OPNFV_FEATURE + default: 'none' + description: 'OPNFV Feature to activate' - parameter: name: 'compass-defaults' @@ -22,13 +26,17 @@ default: '192.168.200.2' description: 'IP of the installer' - string: - name: INSTALLER_NAME - default: compass4nfv - description: 'Installer used for deploying OPNFV on this POD' - - string: name: INSTALLER_TYPE - default: $INSTALLER_NAME + default: compass description: 'Installer used for deploying OPNFV on this POD' + - string: + name: SDN_CONTROLLER + default: 'nosdn' + description: 'SDN Controller to use' + - string: + name: OPNFV_FEATURE + default: 'none' + description: 'OPNFV Feature to activate' - parameter: name: 'fuel-defaults' @@ -38,9 +46,17 @@ default: '10.20.0.2' description: 'IP of the installer' - string: - name: INSTALLER_NAME + name: INSTALLER_TYPE default: fuel description: 'Installer used for deploying OPNFV on this POD' + - string: + name: SDN_CONTROLLER + default: 'nosdn' + description: 'SDN Controller to use' + - string: + name: OPNFV_FEATURE + default: 'none' + description: 'OPNFV Feature to activate' - parameter: name: 'joid-defaults' @@ -50,10 +66,14 @@ default: '192.168.Y.Y' description: 'IP of the installer' - string: - name: INSTALLER_NAME + name: INSTALLER_TYPE default: joid description: 'Installer used for deploying OPNFV on this POD' - string: - name: INSTALLER_TYPE - default: $INSTALLER_NAME - description: 'Installer used for deploying OPNFV on this POD' + name: SDN_CONTROLLER + default: 'nosdn' + description: 'SDN Controller to use' + - string: + name: OPNFV_FEATURE + default: 'none' + description: 'OPNFV Feature to activate' diff --git a/jjb/opnfv/pod-params.yml b/jjb/opnfv/pod-params.yml index bb5e529b7..e36a0b684 100644 --- a/jjb/opnfv/pod-params.yml +++ b/jjb/opnfv/pod-params.yml @@ -102,6 +102,21 @@ description: 'SSH key to use for Apex' - parameter: + name: 'intel-pod3-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod3 + default-slaves: + - intel-pod3 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on the jumphost' + +- parameter: name: 'intel-pod5-defaults' parameters: - node: diff --git a/jjb/vswitchperf/vswitchperf.yml b/jjb/vswitchperf/vswitchperf.yml index b4bc70f84..a06507a14 100644 --- a/jjb/vswitchperf/vswitchperf.yml +++ b/jjb/vswitchperf/vswitchperf.yml @@ -1,37 +1,31 @@ - project: + name: vswitchperf + + project: '{name}' + jobs: - - 'vswitchperf-daily-{stream}' - - 'vswitchperf-merge-{stream}' - 'vswitchperf-verify-{stream}' + - 'vswitchperf-merge-{stream}' + - 'vswitchperf-daily-{stream}' - # stream: branch with - in place of / (eg. stable-helium) - # branch: branch (eg. stable/helium) +# only master branch is enabled at the moment to keep no of jobs sane stream: - master: branch: 'master' - - project: 'vswitchperf' - somevar: 'foo' + gs-pathname: '' +# - brahmaputra: +# branch: 'stable/brahmaputra' +# gs-pathname: '/brahmaputra' - job-template: - name: 'vswitchperf-daily-{stream}' - # Job template for daily builders - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - - varsetabove: '{somevar}' - node: opnfv-build + name: 'vswitchperf-daily-{stream}' parameters: - project-parameter: project: '{project}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/vswitchperf + - 'intel-pod3-defaults' scm: - git-scm: @@ -42,9 +36,6 @@ triggers: - timed: 'H H * * *' - prebuilders: - - test-macro - builders: - shell: | pwd @@ -54,16 +45,11 @@ # run basic sanity test make sanity - postbuilders: - - test-macro - - job-template: name: 'vswitchperf-verify-{stream}' project-type: freestyle - node: opnfv-build - concurrent: true properties: @@ -76,10 +62,9 @@ - project-parameter: project: '{project}' - gerrit-parameter: - branch: 'master' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/vswitchperf + branch: '{branch}' + - 'opnfv-build-defaults' + scm: - gerrit-trigger-scm: credentials-id: '{ssh-credentials}' @@ -100,10 +85,10 @@ comment-contains-value: 'reverify' projects: - project-compare-type: 'ANT' - project-pattern: 'vswitchperf' + project-pattern: '{project}' branches: - branch-compare-type: 'ANT' - branch-pattern: '**/master' + branch-pattern: '**/{branch}' forbidden-file-paths: - compare-type: ANT pattern: 'docs/**' @@ -120,14 +105,8 @@ - job-template: name: 'vswitchperf-merge-{stream}' - # builder-merge job to run JJB update - # - # This job's purpose is to update all the JJB - project-type: freestyle - node: opnfv-build - concurrent: true properties: @@ -140,10 +119,8 @@ - project-parameter: project: '{project}' - gerrit-parameter: - branch: 'master' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/vswitchperf + branch: '{branch}' + - 'opnfv-build-defaults' scm: - gerrit-trigger-scm: @@ -159,10 +136,10 @@ comment-contains-value: 'remerge' projects: - project-compare-type: 'ANT' - project-pattern: 'vswitchperf' + project-pattern: '{project}' branches: - branch-compare-type: 'ANT' - branch-pattern: '**/master' + branch-pattern: '**/{branch}' forbidden-file-paths: - compare-type: ANT pattern: 'docs/**' |