From e977155378fcbbd0826fa4a192b25273648d3782 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Sat, 27 Aug 2016 00:25:37 +0200 Subject: 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 --- jjb/infra/infra-daily-jobs.yml | 159 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 jjb/infra/infra-daily-jobs.yml (limited to 'jjb/infra/infra-daily-jobs.yml') 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 -- cgit 1.2.3-korg