summaryrefslogtreecommitdiffstats
path: root/jjb/infra
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-08-27 00:25:37 +0200
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-08-31 12:06:45 +0200
commite977155378fcbbd0826fa4a192b25273648d3782 (patch)
treee0877d31e042132403ccc18fa07f2b3ca742a3cc /jjb/infra
parent2db98ec846c009a95085d69e32c4e0518095a50c (diff)
Create daily job for infra deployment, remove sandbox jobs and fix bugs
This change - creates upstream daily job to trigger and control the execution of jobs that provision nodes using bifrost, deployment using puppet-infracloud, and simple smoke test job. - fixes the hashbang placement in 2 of the scripts. - removes sandbox dummy jobs as the infra jobs can serve as examples now. Only the node provisioning job is functional at the moment. Change-Id: I311d159956d8b7ce3f7a500fac5a7dcb459104cf Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'jjb/infra')
-rw-r--r--jjb/infra/infra-daily-jobs.yml159
-rwxr-xr-xjjb/infra/infra-deploy.sh3
-rwxr-xr-xjjb/infra/infra-provision.sh34
-rwxr-xr-xjjb/infra/infra-smoketest.sh3
4 files changed, 199 insertions, 0 deletions
diff --git a/jjb/infra/infra-daily-jobs.yml b/jjb/infra/infra-daily-jobs.yml
new file mode 100644
index 000000000..64c2fc09c
--- /dev/null
+++ b/jjb/infra/infra-daily-jobs.yml
@@ -0,0 +1,159 @@
+- project:
+ name: 'infra-daily-jobs'
+
+ project: 'releng'
+
+ installer: 'infra'
+#--------------------------------
+# BRANCH ANCHORS
+#--------------------------------
+ master: &master
+ stream: master
+ branch: '{stream}'
+ gs-pathname: ''
+#--------------------------------
+# CI Slaves
+#--------------------------------
+ pod:
+ - virtual:
+ slave-label: infra-virtual
+ <<: *master
+#--------------------------------
+# phases
+#--------------------------------
+ phase:
+ - 'provision'
+ - 'deploy'
+ - 'smoketest'
+#--------------------------------
+# scenarios
+#--------------------------------
+ scenario:
+ - 'os-nosdn-nofeature-noha'
+#--------------------------------
+# jobs
+#--------------------------------
+ jobs:
+ - 'infra-{scenario}-{pod}-daily-{stream}'
+ - 'infra-{phase}-{pod}-daily-{stream}'
+########################
+# job templates
+########################
+- job-template:
+ name: 'infra-{scenario}-{pod}-daily-{stream}'
+
+ concurrent: false
+
+ properties:
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - 'infra-os-.*?-{pod}-daily-{stream}'
+ block-level: 'NODE'
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+
+ triggers:
+ - timed: 'H */3 * * *'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - '{installer}-defaults'
+ - '{slave-label}-defaults'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: '{scenario}'
+
+ builders:
+ - description-setter:
+ description: "Built on $NODE_NAME"
+ - trigger-builds:
+ - project: 'infra-provision-{pod}-daily-{stream}'
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO={scenario}
+ same-node: true
+ block: true
+ - trigger-builds:
+ - project: 'infra-deploy-{pod}-daily-{stream}'
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO={scenario}
+ same-node: true
+ block: true
+ - trigger-builds:
+ - project: 'infra-smoketest-{pod}-daily-{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: 'infra-{phase}-{pod}-daily-{stream}'
+
+ concurrent: false
+
+ properties:
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - 'infra-provision-{pod}-daily-{stream}'
+ - 'infra-deploy-{pod}-daily-{stream}'
+ - 'infra-smoketest-{pod}-daily-{stream}'
+ block-level: 'NODE'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - '{installer}-defaults'
+ - '{slave-label}-defaults'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: 'os-nosdn-nofeature-noha'
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+
+ builders:
+ - description-setter:
+ description: "Built on $NODE_NAME"
+ - 'infra-{phase}-daily-builder'
+#####################################
+# builder macros
+#####################################
+- builder:
+ name: 'infra-provision-daily-builder'
+ builders:
+ - shell: |
+ #!/bin/bash
+
+ sudo $WORKSPACE/jjb/infra/infra-provision.sh
+- builder:
+ name: 'infra-deploy-daily-builder'
+ builders:
+ - shell: |
+ #!/bin/bash
+
+ sudo $WORKSPACE/jjb/infra/infra-provision.sh
+- builder:
+ name: 'infra-smoketest-daily-builder'
+ builders:
+ - shell: |
+ #!/bin/bash
+
+ sudo $WORKSPACE/jjb/infra/infra-provision.sh
diff --git a/jjb/infra/infra-deploy.sh b/jjb/infra/infra-deploy.sh
new file mode 100755
index 000000000..35ef9a1d0
--- /dev/null
+++ b/jjb/infra/infra-deploy.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "Not activated!"
diff --git a/jjb/infra/infra-provision.sh b/jjb/infra/infra-provision.sh
new file mode 100755
index 000000000..5ddbaf968
--- /dev/null
+++ b/jjb/infra/infra-provision.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+set -xe
+
+if [[ $(whoami) != "root" ]]; then
+ echo "Error: This script must be run as root!"
+ exit 1
+fi
+
+# remove previously cloned repos
+/bin/rm -rf /opt/bifrost /opt/puppet-infracloud /opt/releng
+
+# clone upstream repos
+git clone https://git.openstack.org/openstack/bifrost /opt/bifrost
+git clone https://git.openstack.org/openstack-infra/puppet-infracloud /opt/puppet-infracloud
+
+# clone opnfv releng repo
+git clone https://gerrit.opnfv.org/gerrit/releng /opt/releng
+
+# combine opnfv and upstream scripts/playbooks
+cp -R /opt/releng/prototypes/bifrost/* /opt/bifrost/
+
+# cleanup remnants of previous deployment
+cd /opt/bifrost
+./scripts/destroy_env.sh
+
+# provision 3 VMs; jumphost, controller, and compute
+cd /opt/bifrost
+./scripts/test-bifrost-deployment.sh
+
+# list the provisioned VMs
+cd /opt/bifrost
+source env-vars
+ironic node-list
+virsh list
diff --git a/jjb/infra/infra-smoketest.sh b/jjb/infra/infra-smoketest.sh
new file mode 100755
index 000000000..35ef9a1d0
--- /dev/null
+++ b/jjb/infra/infra-smoketest.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "Not activated!"