Polishing.
Refine release process to update the Git state before build and distribute. See #15
This commit is contained in:
@@ -11,9 +11,17 @@ export PATH="$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATH"
|
||||
|
||||
export JENKINS_HOME=/tmp/jenkins-home
|
||||
export RELEASE_TOOLS_CACHE=${JENKINS_HOME}/.m2/spring-data-release-tools
|
||||
export LOGS_DIR=${JENKINS_HOME}/spring-data-shell/logs
|
||||
export LOGS_DIR=$(pwd)/logs
|
||||
export SETTINGS_XML=${JENKINS_HOME}/settings.xml
|
||||
|
||||
mkdir -p ${RELEASE_TOOLS_CACHE}
|
||||
mkdir -p ${LOGS_DIR}
|
||||
|
||||
export GNUPGHOME=~/.gnupg/
|
||||
mkdir -p ${GNUPGHOME}
|
||||
chmod 700 ${GNUPGHOME}
|
||||
|
||||
cp ci/settings.xml ${JENKINS_HOME}
|
||||
|
||||
if test -f application-local.properties; then
|
||||
echo "You are running from dev environment! Using application-local.properties."
|
||||
@@ -23,19 +31,21 @@ if test -f application-local.properties; then
|
||||
function spring-data-release-shell {
|
||||
java \
|
||||
-jar target/spring-data-release-cli.jar \
|
||||
--cmdfile target/push-and-distribute.shell
|
||||
--cmdfile target/build-and-distribute.shell
|
||||
}
|
||||
else
|
||||
echo "You are running inside Jenkins! Using parameters fed from the agent."
|
||||
|
||||
echo "${GIT_SIGNING_KEY_PASSWORD}" | /usr/bin/gpg --batch --yes --passphrase-fd 0 --import "${GIT_SIGNING_KEY}"
|
||||
echo "${MAVEN_SIGNING_KEY_PASSWORD}" | /usr/bin/gpg --batch --yes --passphrase-fd 0 --import "${MAVEN_SIGNING_KEY}"
|
||||
/usr/bin/gpg -k
|
||||
|
||||
function spring-data-release-shell {
|
||||
java \
|
||||
-Dspring.profiles.active=jenkins \
|
||||
-Dmaven.home=${MAVEN_HOME} \
|
||||
-jar target/spring-data-release-cli.jar \
|
||||
--cmdfile target/push-and-distribute.shell
|
||||
--cmdfile target/build-and-distribute.shell
|
||||
}
|
||||
|
||||
fi
|
||||
|
||||
echo "About to push and distribute ${VERSION}."
|
||||
|
||||
@@ -36,7 +36,6 @@ if test -f application-local.properties; then
|
||||
else
|
||||
echo "You are running inside Jenkins! Using parameters fed from the agent."
|
||||
|
||||
mkdir -p ~/.gnupg
|
||||
echo "${GIT_SIGNING_KEY_PASSWORD}" | /usr/bin/gpg --batch --yes --passphrase-fd 0 --import "${GIT_SIGNING_KEY}"
|
||||
echo "${MAVEN_SIGNING_KEY_PASSWORD}" | /usr/bin/gpg --batch --yes --passphrase-fd 0 --import "${MAVEN_SIGNING_KEY}"
|
||||
/usr/bin/gpg -k
|
||||
|
||||
Reference in New Issue
Block a user