From de6331138a6b7bbc7f4a141ec9918e5c4c839b6d Mon Sep 17 00:00:00 2001 From: Khai Do Date: Wed, 14 Aug 2013 17:40:43 -0700 Subject: [PATCH] Fix intermittent jenkins plugin build failure * modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml Changed from maven job to freestyle job. Changing to freestyle job removes the need to have a work around for JENKINS-14193 bug * modules/jenkins/files/slave_scripts/maven-properties.sh remove workaround for jenkins bug Fixes: bug #1212470 Change-Id: Ia78ea699c70efc08f6dd93bde321faece99900f1 --- .../files/slave_scripts/maven-properties.sh | 3 -- .../config/jenkins-plugin-jobs.yaml | 50 ++++++++++--------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/modules/jenkins/files/slave_scripts/maven-properties.sh b/modules/jenkins/files/slave_scripts/maven-properties.sh index e585462318..7386acb20c 100755 --- a/modules/jenkins/files/slave_scripts/maven-properties.sh +++ b/modules/jenkins/files/slave_scripts/maven-properties.sh @@ -5,9 +5,6 @@ # pass to maven build commands so that we can generate # versioned builds within the gerrit workflow. -# work around for jenkins bug: https://issues.jenkins-ci.org/browse/JENKINS-14193 -/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org http://zuul.openstack.org - # get version info from scm SCM_TAG=`git describe --abbrev=0 --tags` || true SCM_SHA=`git rev-parse --short HEAD` || true diff --git a/modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml index ebba5d025e..6904a6d056 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/jenkins-plugin-jobs.yaml @@ -1,9 +1,8 @@ -# need to run gerrit-git-prep in maven-properties.sh script to work -# around jenkins bug: https://issues.jenkins-ci.org/browse/JENKINS-14193 +# usig a freestyle project to work around jenkins bug: +# https://issues.jenkins-ci.org/browse/JENKINS-14193 - job-template: name: 'gate-{name}-build' - project-type: maven node: precise wrappers: @@ -11,25 +10,26 @@ timeout: 30 fail: true - timestamps - - inject: - script-file: /usr/local/jenkins/slave_scripts/maven-properties.sh + + builders: + - gerrit-git-prep + - shell: | + #!/bin/bash -xe + /usr/local/jenkins/slave_scripts/maven-properties.sh - inject: properties-file: maven.properties - - maven: - maven-name: Maven3 - root-module: - group-id: '{maven-group-id}' - artifact-id: '{name}' - root-pom: pom.xml - goals: 'clean package -Dproject-version=${{PROJECT_VER}}' + - maven-target: + maven-version: Maven3 + pom: pom.xml + goals: 'clean package' + properties: + - project-version=${{PROJECT_VER}} publishers: - console-log - job-template: name: '{name}-hpi-artifact' - project-type: maven node: precise wrappers: @@ -37,18 +37,20 @@ timeout: 30 fail: true - timestamps - - inject: - script-file: /usr/local/jenkins/slave_scripts/maven-properties.sh + + builders: + - gerrit-git-prep + - shell: | + #!/bin/bash -xe + /usr/local/jenkins/slave_scripts/maven-properties.sh - inject: properties-file: maven.properties - - maven: - maven-name: Maven3 - root-module: - group-id: '{maven-group-id}' - artifact-id: '{name}' - root-pom: pom.xml - goals: 'clean package -Dmaven.test.skip=true -Dproject-version=${{PROJECT_VER}}' + - maven-target: + maven-version: Maven3 + pom: pom.xml + goals: 'clean package' + properties: + - project-version=${{PROJECT_VER}} postbuilders: - shell: |