diff options
Diffstat (limited to 'jjb/infra')
-rw-r--r-- | jjb/infra/infra-daily-jobs.yml | 159 | ||||
-rwxr-xr-x | jjb/infra/infra-deploy.sh | 3 | ||||
-rwxr-xr-x | jjb/infra/infra-provision.sh | 34 | ||||
-rwxr-xr-x | jjb/infra/infra-smoketest.sh | 3 |
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!" |