Fix travis build, add more info during build (refs #376)
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ev
|
set -e
|
||||||
|
|
||||||
source .travis/common-functions.sh
|
source .travis/common-functions.sh
|
||||||
|
|
||||||
@ -8,18 +8,20 @@ echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}"
|
|||||||
|
|
||||||
if [ travis_isPullRequest ]; then
|
if [ travis_isPullRequest ]; then
|
||||||
|
|
||||||
|
echo "This is a pull-request build"
|
||||||
./mvnw verify -B -V
|
./mvnw verify -B -V
|
||||||
|
|
||||||
elif [ travis_isPush ]; then
|
elif [ travis_isPush ]; then
|
||||||
|
|
||||||
if [[ "$VERSION" != *-SNAPSHOT && "$TRAVIS_TAG" != "" ]]; then
|
if [[ "$VERSION" != *-SNAPSHOT && "$TRAVIS_TAG" != "" ]]; then
|
||||||
# release build
|
echo "This is a release build for tag $TRAVIS_TAG"
|
||||||
./mvnw deploy -Possrh,pmd-release -B -V
|
./mvnw deploy -Possrh,pmd-release -B -V
|
||||||
elif [[ "$VERSION" == *-SNAPSHOT ]]; then
|
elif [[ "$VERSION" == *-SNAPSHOT ]]; then
|
||||||
# snapshot build
|
echo "This is a snapshot build"
|
||||||
./mvnw deploy -Possrh -B -V
|
./mvnw deploy -Possrh -B -V
|
||||||
else
|
else
|
||||||
# other build. Can happen during release: the commit with a non snapshot version is built, but not from the tag.
|
# other build. Can happen during release: the commit with a non snapshot version is built, but not from the tag.
|
||||||
|
echo "This is some other build, probably during release: commit with a non-snapshot version on branch master..."
|
||||||
./mvnw verify -Possrh -B -V
|
./mvnw verify -Possrh -B -V
|
||||||
# we stop here - no need to execute further steps
|
# we stop here - no need to execute further steps
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ev
|
set -e
|
||||||
|
|
||||||
source .travis/common-functions.sh
|
source .travis/common-functions.sh
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ev
|
set -e
|
||||||
|
|
||||||
source .travis/common-functions.sh
|
source .travis/common-functions.sh
|
||||||
|
|
||||||
|
@ -1,4 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
|
||||||
|
echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG"
|
||||||
|
echo "TRAVIS_PULL_REQUEST_SLUG: $TRAVIS_PULL_REQUEST_SLUG"
|
||||||
|
echo "TRAVIS_PULL_REQUEST_BRANCH: $TRAVIS_PULL_REQUEST_BRANCH"
|
||||||
|
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
|
||||||
|
echo "TRAVIS_SECURE_ENV_VARS: $TRAVIS_SECURE_ENV_VARS"
|
||||||
|
echo "TRAVIS_BRANCH: $TRAVIS_BRANCH"
|
||||||
|
echo "TRAVIS_TAG: $TRAVIS_TAG"
|
||||||
|
echo "TRAVIS_ALLOW_FAILURE: $TRAVIS_ALLOW_FAILURE"
|
||||||
|
|
||||||
|
|
||||||
function travis_isPullRequest() {
|
function travis_isPullRequest() {
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ev
|
set -e
|
||||||
|
|
||||||
echo "MAVEN_OPTS='-Xms1g -Xmx1g'" > $HOME/.mavenrc
|
echo "MAVEN_OPTS='-Xms1g -Xmx1g'" > $HOME/.mavenrc
|
||||||
mkdir -p .m2
|
mkdir -p .m2
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ev
|
set -e
|
||||||
|
|
||||||
RELEASE_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
|
RELEASE_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ev
|
set -e
|
||||||
|
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "${TRAVIS_SECURE_ENV_VARS}" != "true" ]; then
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "${TRAVIS_SECURE_ENV_VARS}" != "true" ]; then
|
||||||
echo "Not setting up secrets (TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} TRAVIS_SECURE_ENV_VARS=${TRAVIS_SECURE_ENV_VARS})."
|
echo "Not setting up secrets (TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} TRAVIS_SECURE_ENV_VARS=${TRAVIS_SECURE_ENV_VARS})."
|
||||||
|
Reference in New Issue
Block a user