From dea3bdb050a55d56a1913e50e59cf176d70d3eb7 Mon Sep 17 00:00:00 2001 From: Khai Do Date: Thu, 20 Feb 2014 21:39:49 -0800 Subject: [PATCH] rename maven-properties.sh script to version-properties.sh Initially maven-properties.sh was intended to make maven projects use git versioning, that's how it got the name. However this filename is inappropriate because it's just a generic script that retrieves git version info to allow builds to version their artifacts. version-properties.sh is a much more appropriate name for this script. Change-Id: I3ffc3e9e29bb626f4af5449f0413608a30ee79a0 --- .../{maven-properties.sh => version-properties.sh} | 12 +++++------- .../files/jenkins_job_builder/config/gerrit.yaml | 12 ++++++------ .../files/jenkins_job_builder/config/groups.yaml | 4 ++-- .../files/jenkins_job_builder/config/javascript.yaml | 8 ++++---- .../config/jenkins-plugin-jobs.yaml | 8 ++++---- .../config/maven-plugin-jobs.yaml | 8 ++++---- .../jenkins_job_builder/config/openstackid.yaml | 4 ++-- 7 files changed, 27 insertions(+), 29 deletions(-) rename modules/jenkins/files/slave_scripts/{maven-properties.sh => version-properties.sh} (63%) diff --git a/modules/jenkins/files/slave_scripts/maven-properties.sh b/modules/jenkins/files/slave_scripts/version-properties.sh similarity index 63% rename from modules/jenkins/files/slave_scripts/maven-properties.sh rename to modules/jenkins/files/slave_scripts/version-properties.sh index 7386acb20c..420ce8e8e5 100755 --- a/modules/jenkins/files/slave_scripts/maven-properties.sh +++ b/modules/jenkins/files/slave_scripts/version-properties.sh @@ -1,9 +1,7 @@ #!/bin/bash -ex -# This file is a helper for versioning and deployment of -# maven projects. It sets up environment variables to -# pass to maven build commands so that we can generate -# versioned builds within the gerrit workflow. +# This is a script that helps us version build artifacts. It retrieves +# git info and generates version strings. # get version info from scm SCM_TAG=`git describe --abbrev=0 --tags` || true @@ -25,6 +23,6 @@ else PROJECT_VER="$SCM_TAG.$COMMITS_SINCE_TAG.$SCM_SHA"; fi -echo "SCM_SHA=$SCM_SHA" >maven.properties -echo "PROJECT_VER=$PROJECT_VER" >>maven.properties -echo "COMMITS_SINCE_TAG=$COMMITS_SINCE_TAG" >>maven.properties +echo "SCM_SHA=$SCM_SHA" >version.properties +echo "PROJECT_VER=$PROJECT_VER" >>version.properties +echo "COMMITS_SINCE_TAG=$COMMITS_SINCE_TAG" >>version.properties diff --git a/modules/openstack_project/files/jenkins_job_builder/config/gerrit.yaml b/modules/openstack_project/files/jenkins_job_builder/config/gerrit.yaml index a4d757ba7f..9ac1d1db33 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/gerrit.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/gerrit.yaml @@ -110,9 +110,9 @@ - shell: | #!/bin/bash -xe cd gerrit - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: gerrit/maven.properties + properties-file: gerrit/version.properties - install-buck - shell: | #!/bin/bash -xe @@ -149,9 +149,9 @@ - shell: | #!/bin/bash -xe cd gerrit - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: gerrit/maven.properties + properties-file: gerrit/version.properties - install-buck - shell: | #!/bin/bash -xe @@ -184,9 +184,9 @@ - shell: | #!/bin/bash -xe cd gerrit - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: gerrit/maven.properties + properties-file: gerrit/version.properties - install-buck - shell: | #!/bin/bash -xe diff --git a/modules/openstack_project/files/jenkins_job_builder/config/groups.yaml b/modules/openstack_project/files/jenkins_job_builder/config/groups.yaml index fb8eae7e00..d8d99a1d4c 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/groups.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/groups.yaml @@ -30,9 +30,9 @@ - gerrit-git-prep - shell: | #!/bin/bash -xe - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: maven.properties + properties-file: version.properties - shell: | #!/bin/bash -xe # fetch drush diff --git a/modules/openstack_project/files/jenkins_job_builder/config/javascript.yaml b/modules/openstack_project/files/jenkins_job_builder/config/javascript.yaml index 271e260322..16abdf7788 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/javascript.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/javascript.yaml @@ -11,9 +11,9 @@ - gerrit-git-prep - shell: | #!/bin/bash -xe - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: maven.properties + properties-file: version.properties - js-build: command: 'test' envlist: 'grunt' @@ -47,9 +47,9 @@ - gerrit-git-prep - shell: | #!/bin/bash -xe - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: maven.properties + properties-file: version.properties - js-build: command: 'build' envlist: 'grunt' 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 5348f2548f..60151b255f 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 @@ -15,9 +15,9 @@ - gerrit-git-prep - shell: | #!/bin/bash -xe - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: maven.properties + properties-file: version.properties - maven-target: maven-version: Maven3 pom: pom.xml @@ -42,9 +42,9 @@ - gerrit-git-prep - shell: | #!/bin/bash -xe - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: maven.properties + properties-file: version.properties - maven-target: maven-version: Maven3 pom: pom.xml diff --git a/modules/openstack_project/files/jenkins_job_builder/config/maven-plugin-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/maven-plugin-jobs.yaml index e9dd305cc6..4654ed294c 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/maven-plugin-jobs.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/maven-plugin-jobs.yaml @@ -15,9 +15,9 @@ - gerrit-git-prep - shell: | #!/bin/bash -xe - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: maven.properties + properties-file: version.properties - maven-target: maven-version: Maven3 pom: pom.xml @@ -42,9 +42,9 @@ - gerrit-git-prep - shell: | #!/bin/bash -xe - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: maven.properties + properties-file: version.properties - maven-target: maven-version: Maven3 pom: pom.xml diff --git a/modules/openstack_project/files/jenkins_job_builder/config/openstackid.yaml b/modules/openstack_project/files/jenkins_job_builder/config/openstackid.yaml index b99fa97924..9383d17564 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/openstackid.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/openstackid.yaml @@ -26,9 +26,9 @@ - gerrit-git-prep - shell: | #!/bin/bash -xe - /usr/local/jenkins/slave_scripts/maven-properties.sh + /usr/local/jenkins/slave_scripts/version-properties.sh - inject: - properties-file: maven.properties + properties-file: version.properties - shell: | #!/bin/bash -xe /usr/local/jenkins/slave_scripts/php-laravel-build.sh