Skip to content

Commit 545b338

Browse files
authored
Reduce the log's size of Travis build (#1108)
1 parent f807447 commit 545b338

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ before_install:
77
- mvn clean
88
- git clone -b travis `git config --get remote.origin.url` target/travis
99
- cp target/travis/settings.xml ~/.m2/settings.xml
10-
install: mvn install -DskipTests=true -Dgpg.skip=true
10+
- cp target/travis/logging.properties logging.properties
11+
install: mvn install --quiet -Djava.util.logging.config.file=logging.properties -DskipTests=true -Dgpg.skip=true
1112
script:
1213
- travis_wait 60 utilities/verify.sh
1314
after_success:

utilities/after_success.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ echo "Travis pull request: " ${TRAVIS_PULL_REQUEST}
88
echo "Travis JDK version: " ${TRAVIS_JDK_VERSION}
99

1010
if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then
11-
mvn clean cobertura:cobertura coveralls:report
11+
mvn clean cobertura:cobertura coveralls:report --quiet -Djava.util.logging.config.file=logging.properties
1212
if [ "${TRAVIS_PULL_REQUEST}" == "false" -a "${TRAVIS_BRANCH}" == "master" ]; then
1313
source ./utilities/integration_test_env.sh
1414
SITE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|\w+:)')
@@ -24,7 +24,7 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then
2424
echo "Not deploying artifacts because it seems like they already exist."
2525
echo "Existence was checked using the url $URL"
2626
else
27-
mvn clean deploy -DskipITs --settings ~/.m2/settings.xml -P sign-deploy,release
27+
mvn clean deploy --quiet -Djava.util.logging.config.file=logging.properties -DskipITs --settings ~/.m2/settings.xml -P sign-deploy,release
2828
fi
2929
utilities/update_docs_version.sh
3030

@@ -33,8 +33,8 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then
3333
git config --global user.email "[email protected]"
3434
git clone --branch gh-pages --single-branch https://github.com/GoogleCloudPlatform/gcloud-java/ tmp_gh-pages
3535
mkdir -p tmp_gh-pages/$SITE_VERSION
36-
mvn site -DskipTests=true
37-
mvn site:stage -DtopSiteURL=http://googlecloudplatform.github.io/gcloud-java/site/${SITE_VERSION}/
36+
mvn site -DskipTests=true --quiet -Djava.util.logging.config.file=logging.properties
37+
mvn site:stage --quiet -Djava.util.logging.config.file=logging.properties -DtopSiteURL=http://googlecloudplatform.github.io/gcloud-java/site/${SITE_VERSION}/
3838
cd tmp_gh-pages
3939
cp -r ../target/staging/$SITE_VERSION/* $SITE_VERSION/
4040
sed -i "s/{{SITE_VERSION}}/$SITE_VERSION/g" ${SITE_VERSION}/index.html # Update "Quickstart with Maven" to reflect version change
@@ -43,11 +43,11 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then
4343
git add index.html
4444
echo "<html><head><script>window.location.replace('/gcloud-java/${SITE_VERSION}/apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html
4545
git add apidocs/index.html
46-
git commit -m "Added a new site for version $SITE_VERSION and updated the root directory's redirect. [ci skip]"
46+
git commit --quiet -m "Added a new site for version $SITE_VERSION and updated the root directory's redirect. [ci skip]"
4747
git config --global push.default simple
4848
git push --quiet "https://${CI_DEPLOY_USERNAME}:${CI_DEPLOY_PASSWORD}@github.com/GoogleCloudPlatform/gcloud-java.git" > /dev/null 2>&1
4949
else
50-
mvn clean deploy -DskipTests=true -Dgpg.skip=true --settings ~/.m2/settings.xml -P release
50+
mvn clean deploy --quiet -Djava.util.logging.config.file=logging.properties -DskipTests=true -Dgpg.skip=true --settings ~/.m2/settings.xml -P release
5151
fi
5252
else
5353
echo "Not deploying artifacts. This is only done with non-pull-request commits to master branch with Oracle Java 7 builds."

utilities/verify.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
1010
chmod 700 $TRAVIS_BUILD_DIR/signing-tools
1111
tar xvf $TRAVIS_BUILD_DIR/signing-tools.tar -C $TRAVIS_BUILD_DIR/signing-tools
1212
# Run verify
13-
mvn verify -P release
13+
mvn verify --quiet -Djava.util.logging.config.file=logging.properties -P release
1414
else
15-
mvn verify -DskipITs -P release
15+
mvn verify --quiet -Djava.util.logging.config.file=logging.properties -DskipITs -P release
1616
fi

0 commit comments

Comments
 (0)