Merge "Switch to using version-properties.sh script."
This commit is contained in:
commit
003470fdc1
@ -1,30 +0,0 @@
|
|||||||
#!/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.
|
|
||||||
|
|
||||||
# get version info from scm
|
|
||||||
SCM_TAG=`git describe --abbrev=0 --tags` || true
|
|
||||||
SCM_SHA=`git rev-parse --short HEAD` || true
|
|
||||||
|
|
||||||
# assumes format is like this '0.0.4-2-g135721c'
|
|
||||||
COMMITS_SINCE_TAG=`git describe | awk '{split($0,a,"-"); print a[2]}'` || true
|
|
||||||
|
|
||||||
# just use git sha if there is no tag yet.
|
|
||||||
if [[ "${SCM_TAG}" == "" ]]; then
|
|
||||||
SCM_TAG=$SCM_SHA
|
|
||||||
fi
|
|
||||||
|
|
||||||
# General build version should be something like '0.0.4.3.d4ee90c'
|
|
||||||
# Release build version should be something like '0.0.5'
|
|
||||||
if [[ "${COMMITS_SINCE_TAG}" == "" ]]; then
|
|
||||||
PROJECT_VER=$SCM_TAG
|
|
||||||
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
|
|
@ -110,9 +110,9 @@
|
|||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
cd gerrit
|
cd gerrit
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: gerrit/maven.properties
|
properties-file: gerrit/version.properties
|
||||||
- install-buck
|
- install-buck
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
@ -149,9 +149,9 @@
|
|||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
cd gerrit
|
cd gerrit
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: gerrit/maven.properties
|
properties-file: gerrit/version.properties
|
||||||
- install-buck
|
- install-buck
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
@ -184,9 +184,9 @@
|
|||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
cd gerrit
|
cd gerrit
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: gerrit/maven.properties
|
properties-file: gerrit/version.properties
|
||||||
- install-buck
|
- install-buck
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
|
@ -32,9 +32,9 @@
|
|||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: maven.properties
|
properties-file: version.properties
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
# fetch drush
|
# fetch drush
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: maven.properties
|
properties-file: version.properties
|
||||||
- js-build:
|
- js-build:
|
||||||
command: 'test'
|
command: 'test'
|
||||||
envlist: 'grunt'
|
envlist: 'grunt'
|
||||||
@ -49,9 +49,9 @@
|
|||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: maven.properties
|
properties-file: version.properties
|
||||||
- js-build:
|
- js-build:
|
||||||
command: 'build'
|
command: 'build'
|
||||||
envlist: 'grunt'
|
envlist: 'grunt'
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: maven.properties
|
properties-file: version.properties
|
||||||
- maven-target:
|
- maven-target:
|
||||||
maven-version: Maven3
|
maven-version: Maven3
|
||||||
pom: pom.xml
|
pom: pom.xml
|
||||||
@ -44,9 +44,9 @@
|
|||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: maven.properties
|
properties-file: version.properties
|
||||||
- maven-target:
|
- maven-target:
|
||||||
maven-version: Maven3
|
maven-version: Maven3
|
||||||
pom: pom.xml
|
pom: pom.xml
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: maven.properties
|
properties-file: version.properties
|
||||||
- maven-target:
|
- maven-target:
|
||||||
maven-version: Maven3
|
maven-version: Maven3
|
||||||
pom: pom.xml
|
pom: pom.xml
|
||||||
@ -44,9 +44,9 @@
|
|||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: maven.properties
|
properties-file: version.properties
|
||||||
- maven-target:
|
- maven-target:
|
||||||
maven-version: Maven3
|
maven-version: Maven3
|
||||||
pom: pom.xml
|
pom: pom.xml
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
/usr/local/jenkins/slave_scripts/maven-properties.sh
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
||||||
- inject:
|
- inject:
|
||||||
properties-file: maven.properties
|
properties-file: version.properties
|
||||||
- shell: |
|
- shell: |
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
/usr/local/jenkins/slave_scripts/php-laravel-build.sh
|
/usr/local/jenkins/slave_scripts/php-laravel-build.sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user