summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorSerena Feng <feng.xiaowei@zte.com.cn>2017-02-08 06:05:46 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-08 06:05:46 +0000
commitfdb4631f57b1343a040ed3a9f65e4c118e8f8488 (patch)
treec766970340d3aebb8e4db0a93068864681d6be99 /jjb
parent2d12bd59544438279297cb6331c869fc319ef376 (diff)
parent6ecd5a9aab2d2d04c9f913fa9d9ee84f945ed788 (diff)
Merge "Refactor qtip jobs"
Diffstat (limited to 'jjb')
-rw-r--r--jjb/global/releng-macros.yml3
-rw-r--r--jjb/qtip/helpers/cleanup-deploy.sh (renamed from jjb/qtip/qtip-cleanup.sh)0
-rw-r--r--jjb/qtip/helpers/validate-deploy.sh (renamed from jjb/qtip/qtip-daily-ci.sh)0
-rw-r--r--jjb/qtip/helpers/validate-setup.sh24
-rw-r--r--jjb/qtip/qtip-ci-jobs.yml100
-rw-r--r--jjb/qtip/qtip-validate-jobs.yml136
-rw-r--r--jjb/qtip/qtip-verify-jobs.yml (renamed from jjb/qtip/qtip-project-jobs.yml)11
7 files changed, 167 insertions, 107 deletions
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index 7e11d92f6..23c243522 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -93,7 +93,6 @@
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
-# NOTE: unused macro, but we may use this for some jobs.
- trigger:
name: gerrit-trigger-patch-merged
triggers:
@@ -105,7 +104,7 @@
comment-contains-value: 'remerge'
projects:
- project-compare-type: 'ANT'
- project-pattern: '{name}'
+ project-pattern: '{project}'
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
diff --git a/jjb/qtip/qtip-cleanup.sh b/jjb/qtip/helpers/cleanup-deploy.sh
index 95babb318..95babb318 100644
--- a/jjb/qtip/qtip-cleanup.sh
+++ b/jjb/qtip/helpers/cleanup-deploy.sh
diff --git a/jjb/qtip/qtip-daily-ci.sh b/jjb/qtip/helpers/validate-deploy.sh
index 4fdc04345..4fdc04345 100644
--- a/jjb/qtip/qtip-daily-ci.sh
+++ b/jjb/qtip/helpers/validate-deploy.sh
diff --git a/jjb/qtip/helpers/validate-setup.sh b/jjb/qtip/helpers/validate-setup.sh
new file mode 100644
index 000000000..8d84e120c
--- /dev/null
+++ b/jjb/qtip/helpers/validate-setup.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+##############################################################################
+# Copyright (c) 2017 ZTE 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 -e
+
+# setup virtualenv
+sudo pip install -u virtualenv virtualenvwrapper
+export WORKON_HOME=$HOME/.virtualenvs
+source /usr/local/bin/virtualenvwrapper.sh
+mkvirtualenv qtip
+workon qtip
+
+# setup qtip
+sudo pip install $HOME/repos/qtip
+
+# testing
+qtip --version
+qtip --help
diff --git a/jjb/qtip/qtip-ci-jobs.yml b/jjb/qtip/qtip-ci-jobs.yml
deleted file mode 100644
index 38f9955ec..000000000
--- a/jjb/qtip/qtip-ci-jobs.yml
+++ /dev/null
@@ -1,100 +0,0 @@
-####################################
-# job configuration for qtip
-####################################
-- project:
- name: qtip
-
- project: 'qtip'
-
-#--------------------------------
-# BRANCH ANCHORS
-#--------------------------------
- master: &master
- stream: master
- branch: '{stream}'
- gs-pathname: ''
- docker-tag: 'latest'
-#--------------------------------
-# POD, INSTALLER, AND BRANCH MAPPING
-#--------------------------------
-# master
-#--------------------------------
- pod:
- - zte-pod2:
- installer: fuel
- auto-trigger-name: 'qtip-daily-zte-pod2-trigger'
- <<: *master
- - zte-pod3:
- installer: fuel
- auto-trigger-name: 'qtip-daily-zte-pod3-trigger'
- <<: *master
-
-#--------------------------------
- jobs:
- - 'qtip-{installer}-{pod}-daily-{stream}'
-
-################################
-# job templates
-################################
-- job-template:
- name: 'qtip-{installer}-{pod}-daily-{stream}'
-
- disabled: false
-
- parameters:
- - project-parameter:
- project: '{project}'
- branch: '{branch}'
- - '{installer}-defaults'
- - '{pod}-defaults'
- - string:
- name: DEPLOY_SCENARIO
- default: 'os-nosdn-nofeature-ha'
- - string:
- name: DOCKER_TAG
- default: '{docker-tag}'
- description: 'Tag to pull docker image'
-
- scm:
- - git-scm
-
- triggers:
- - '{auto-trigger-name}'
-
- builders:
- - description-setter:
- description: "POD: $NODE_NAME"
- - 'qtip-cleanup'
- - 'qtip-daily-ci'
-
- publishers:
- - email:
- recipients: wu.zhihui1@zte.com.cn, zhang.yujunz@zte.com.cn
-
-###########################
-#biuilder macros
-###########################
-- builder:
- name: qtip-daily-ci
- builders:
- - shell:
- !include-raw: ./qtip-daily-ci.sh
-
-- builder:
- name: qtip-cleanup
- builders:
- - shell:
- !include-raw: ./qtip-cleanup.sh
-
-#################
-#trigger macros
-#################
-- trigger:
- name: 'qtip-daily-zte-pod2-trigger'
- triggers:
- - timed: '0 7 * * *'
-
-- trigger:
- name: 'qtip-daily-zte-pod3-trigger'
- triggers:
- - timed: '0 1 * * *'
diff --git a/jjb/qtip/qtip-validate-jobs.yml b/jjb/qtip/qtip-validate-jobs.yml
new file mode 100644
index 000000000..161acb18c
--- /dev/null
+++ b/jjb/qtip/qtip-validate-jobs.yml
@@ -0,0 +1,136 @@
+#######################
+# validate after MERGE
+#######################
+- project:
+ name: qtip
+ project: qtip
+
+#--------------------------------
+# BRANCH ANCHORS
+#--------------------------------
+ master: &master
+ stream: master
+ branch: '{stream}'
+ gs-pathname: ''
+ docker-tag: latest
+#--------------------------------
+# JOB VARIABLES
+#--------------------------------
+ pod:
+ - zte-pod2:
+ installer: fuel
+ <<: *master
+ - zte-pod3:
+ installer: fuel
+ <<: *master
+ task:
+ - daily:
+ auto-builder-name: qtip-validate-deploy
+ auto-trigger-name: 'qtip-daily-{pod}-trigger'
+ - validate:
+ auto-builder-name: qtip-validate-setup
+ auto-trigger-name: qtip-validate-trigger
+#--------------------------------
+# JOB LIST
+#--------------------------------
+ jobs:
+ - 'qtip-{task}-{installer}-{pod}-{stream}'
+
+################################
+# job templates
+################################
+- job-template:
+ name: 'qtip-{task}-{installer}-{pod}-{stream}'
+ disabled: false
+ parameters:
+ - qtip-common-parameters:
+ project: '{project}'
+ <<: *master
+ - '{installer}-defaults'
+ - '{pod}-defaults'
+ scm:
+ - git-scm
+ triggers:
+ - '{auto-trigger-name}'
+ builders:
+ - qtip-common-builders
+ - '{auto-builder-name}'
+ publishers:
+ - qtip-common-publishers
+
+################
+# MARCOS
+################
+
+#---------
+# builder
+#---------
+
+- builder:
+ name: qtip-common-builders
+ builders:
+ - description-setter:
+ description: "POD: $NODE_NAME"
+
+- builder:
+ name: qtip-validate-deploy
+ builders:
+ - shell:
+ !include-raw: ./helpers/validate-deploy.sh
+ - shell:
+ !include-raw: ./helpers/cleanup-deploy.sh
+
+- builder:
+ name: qtip-validate-setup
+ builders:
+ - shell:
+ !include-raw: ./helpers/validate-setup.sh
+
+#-----------
+# parameter
+#-----------
+
+- parameter:
+ name: qtip-common-parameters
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: 'os-nosdn-nofeature-ha'
+ - string:
+ name: DOCKER_TAG
+ default: '{docker-tag}'
+ description: 'Tag to pull docker image'
+
+#-----------
+# publisher
+#-----------
+
+- publisher:
+ name: qtip-common-publishers
+ publishers:
+ - email:
+ recipients: wu.zhihui1@zte.com.cn, zhang.yujunz@zte.com.cn
+
+#---------
+# trigger
+#---------
+
+- trigger:
+ name: qtip-daily-zte-pod2-trigger
+ triggers:
+ - timed: '0 7 * * *'
+
+- trigger:
+ name: qtip-daily-zte-pod3-trigger
+ triggers:
+ - timed: '0 1 * * *'
+
+- trigger:
+ name: qtip-validate-trigger
+ triggers:
+ - gerrit-trigger-patch-merged:
+ project: '{project}'
+ branch: '{branch}'
diff --git a/jjb/qtip/qtip-project-jobs.yml b/jjb/qtip/qtip-verify-jobs.yml
index 00455f8b3..d1fc34d11 100644
--- a/jjb/qtip/qtip-project-jobs.yml
+++ b/jjb/qtip/qtip-verify-jobs.yml
@@ -1,11 +1,12 @@
-- project:
- name: qtip-project-jobs
-
- project: 'qtip'
+######################
+# verify before MERGE
+######################
+- project:
+ name: qtip-verify-jobs
+ project: qtip
jobs:
- 'qtip-verify-{stream}'
-
stream:
- master:
branch: '{stream}'