From 181d68fa0f8ef42fd35586e3c61d4dedca1c6947 Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Tue, 1 Dec 2015 13:50:18 -0500 Subject: splitting out apex jobs There is a interdependancy for functest to run that needs to be addressed. This patch splits out the builders to address the issue It also adds the ability to deploy a specific artifact that has already been built Change-Id: If4ca738d1a5dfc29dcc5aeb7ecea58c91a6c7e1b JIRA: APEX-55 Signed-off-by: Dan Radez --- jjb/apex/apex.yml | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 117 insertions(+), 3 deletions(-) (limited to 'jjb') diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index 88a7d94f3..2c8d0118e 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -3,6 +3,9 @@ jobs: - 'apex-verify-{stream}' - 'apex-merge-{stream}' + - 'apex-build-{stream}' + - 'apex-virtual-deploy-{stream}' + - 'apex-baremetal-deploy-{stream}' - 'apex-daily-{stream}' # stream: branch with - in place of / (eg. stable-arno) @@ -68,6 +71,12 @@ - compare-type: ANT pattern: 'docs/**' + properties: + - build-blocker: + use-build-blocker: true + blocking-jobs: + - "apex-daily.*" + builders: - 'apex-build' - 'apex-deploy-virtual' @@ -123,9 +132,9 @@ - 'apex-workspace-cleanup' - job-template: - name: 'apex-daily-{stream}' + name: 'apex-build-{stream}' - # Job template for daily builders + # Job template for builds # # Required Variables: # stream: branch with - in place of / (eg. stable) @@ -161,6 +170,87 @@ - 'apex-deploy-virtual' - 'apex-upload-artifact' - 'apex-workspace-cleanup' + +- job-template: + name: 'apex-virtual-deploy-{stream}' + + # Job template for virtual deployment + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: opnfv-jump-1 + + disabled: false + + parameters: + - project-parameter: + project: '{project}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + flags: '{flags}' + + builders: + - 'apex-deploy-virtual' + - 'apex-workspace-cleanup' + +- job-template: + name: 'apex-baremetal-deploy-{stream}' + + # Job template for baremetal deployment + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: opnfv-jump-1 + + disabled: true + + parameters: + - project-parameter: + project: '{project}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + flags: '{flags}' + + builders: + - 'apex-workspace-cleanup' + +- job-template: + name: 'apex-daily-{stream}' + + # Job template for daily build + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: opnfv-jump-1 + + disabled: false + + parameters: + - project-parameter: + project: '{project}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + flags: '{flags}' + + properties: + - build-blocker: + use-build-blocker: true + blocking-jobs: + - "apex-daily.*" + builders: + - trigger-builds: + - project: 'apex-build-{stream}' + git-revision: true + block: true + - trigger-builds: + - project: 'apex-virtual-deploy-{stream}' + git-revision: true + block: true + - trigger-builds: + - project: 'apex-baremetal-deploy-{stream}' - trigger-builds: - project: 'functest-apex-{stream}' block: true @@ -175,6 +265,10 @@ - parameter: name: apex-parameter parameters: + - string: + name: ARTIFACT_NAME + default: '' + description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact" - string: name: BUILD_DIRECTORY default: $WORKSPACE/build_output @@ -294,7 +388,27 @@ echo "--------------------------------------------------------" echo - # source the file so we get OPNFV vars + if [[ -z "$ARTIFACT_NAME" ]]; then + # if artifact name is passed the pull a + # specific artifact from artifacts.opnfv.org + RPM_INSTALL_PATH=$GS_URL/$ARTIFACT_NAME + else + if [[ -f opnfv.properties ]]; then + # if opnfv.properties exists then use the + # local build. Source the file so we get local OPNFV vars + source opnfv.properties + RPM_INSTALL_PATH=build_output/$(basename $OPNFV_RPM_URL) + else + # no opnfv.properties means use the latest from artifacts.opnfv.org + # get the latest.properties to get the link to the latest artifact + curl -s -o $WORKSPACE/opnfv.properties http://$GS_URL/latest.properties + [[ -f opnfv.properties ]] || exit 1 + # source the file so we get OPNFV vars + source opnfv.properties + RPM_INSTALL_PATH=$RPM_URL + fi + fi + source opnfv.properties RPM_INSTALL_PATH=build_output/$(basename $OPNFV_RPM_URL) -- cgit 1.2.3-korg