Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into apex-update
Browse files Browse the repository at this point in the history
  • Loading branch information
adangel committed Aug 12, 2017
2 parents 9a71a6f + 69fc7c8 commit d070c35
Show file tree
Hide file tree
Showing 562 changed files with 36,231 additions and 9,078 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dist: trusty
sudo: false

addons:
apt:
packages:
Expand All @@ -23,15 +23,19 @@ env:
- secure: "JIhuqaI0i+zvuqqXiQBHpuKr7AQ8jfk6Gbr8Qgiq4yJtdEWXZGxnAT9BmlbjkgT7ABXvLgxf2CIdUOMo1yYfBlxQL/y5+e89jaVpYF3tvNAzYQ1e12VzQRsd/jDb7qvm7tw3rDHEn3dSEot7Q6KbPcL6WzWJINVMCCmOgvq9gKHgE6Y5q5EgZ5rxiXyuO27ndzcbxaor4PIaiSzHO9+AJQ7p2zDLP+kG4nKVTBX0l9VoKiYFhIpIhpbigi3jyLDMDRiWpwTWZC6P8/RXfZg/lc5ADOuM2DM8oXPpZuqOa/g31LWQOSCuEnQ1G16vbLgipSPpgAc7jYWD5cywhG9dLkiKaZDh5x0meLM2RoAgz6eAnQfTTqJ68OM9o9yXjubEedsNpNRAr9/DXMd+fbh10W2vbvL5HCNB3lic3anehhR9le7PLuEKxg654wXt3KM2PZGVWbotIyBK0CvGzqGkppvwT23QdDDqSdkWuGQIhGQ0xBOdYkwebycxP5wwPUmObG+mymQ1Be2BXvmghttsiJdKlt4CVSYOJUMus6kU32G95hdTgKblsX4J1Of2i1nYsjyMKh3k945tqXwQrIsxOOQug0oIkz24zlLaOaQcorWtJ6Y1HPaZKpVIFUEF0y8Uq/O4oB2bOYC6WDUQfpj7nRG6xbi+BeBS84m1ttCEk4g="
matrix:
- BUILD=deploy
- BUILD=site
- BUILD=doc
- BUILD=sonar
- BUILD=coveralls

matrix:
fast_finish: true

before_install:
- bash .travis/setup-secrets.sh
- bash .travis/configure-maven.sh
install: true
before_script: true
script: bash .travis/build-$BUILD.sh
script: source .travis/build-$BUILD.sh
after_success: true


Expand Down
43 changes: 0 additions & 43 deletions .travis/background-job-funcs.sh

This file was deleted.

16 changes: 16 additions & 0 deletions .travis/build-coveralls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -e

source .travis/common-functions.sh

VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
echo "Building PMD Coveralls.io report ${VERSION} on branch ${TRAVIS_BRANCH}"

if ! travis_isPush; then
echo "Not proceeding, since this is not a push!"
exit 0
fi


travis_wait ./mvnw -q clean test jacoco:report coveralls:report -Pcoveralls

Empty file modified .travis/build-deploy.sh
100644 → 100755
Empty file.
39 changes: 39 additions & 0 deletions .travis/build-doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash
set -e

source .travis/common-functions.sh

VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
echo "Building PMD Documentation ${VERSION} on branch ${TRAVIS_BRANCH}"

if ! travis_isPush; then
echo "Not building site, since this is not a push!"
exit 0
fi

pushd docs

# run jekyll
echo -e "\n\nBuilding documentation using jekyll...\n\n"
bundle install
bundle exec jekyll build

# create pmd-doc archive
echo -e "\n\nCreating pmd-doc archive...\n\n"
mv _site pmd-doc-${VERSION}
zip -qr pmd-doc-${VERSION}.zip pmd-doc-${VERSION}/


# Uploading pmd doc distribution to sourceforge
if [[ "$TRAVIS_TAG" != "" || "$VERSION" == *-SNAPSHOT ]]; then
echo -e "\n\nUploading pmd-doc archive to sourceforge...\n\n"
rsync -avh pmd-doc-${VERSION}.zip ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/
fi

# rsync site to pmd.sourceforge.net/snapshot
if [[ "$VERSION" == *-SNAPSHOT && "$TRAVIS_BRANCH" == "master" ]]; then
echo -e "\n\nUploading snapshot site...\n\n"
travis_wait rsync -ah --stats --delete pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/
fi

popd
39 changes: 10 additions & 29 deletions .travis/build-site.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,18 @@ fi


(
export PING_SLEEP=30s
export BUILD_OUTPUT=/tmp/build-site.out
export PING_PID_FILE=/tmp/build-site-ping.pid
# Run the build, truncate output due to Travis log limits

source .travis/background-job-funcs.sh
echo -e "\n\nExecuting ./mvnw install..."
travis_wait ./mvnw install -DskipTests=true -B -V -q
echo "Finished executing ./mvnw install"

# Run the build, redirect output into the file
./mvnw install -DskipTests=true -B -V >> $BUILD_OUTPUT 2>&1
./mvnw site site:stage -Psite -B -V >> $BUILD_OUTPUT 2>&1

# The build finished without returning an error so dump a tail of the output
dump_output

# nicely terminate the ping output loop
kill_ping
echo -e "\n\nExecuting ./mvnw site site:stage...
travis_wait 40 ./mvnw site site:stage -DskipTests=true -Psite -B -V -q
echo "Finished executing ./mvnw site site:stage..."
)
# create pmd-doc archive
echo -e "\n\nCreating pmd-doc archive...\n\n"
(
cd target
mv staging pmd-doc-${VERSION}
Expand All @@ -44,20 +38,7 @@ fi
(
if [[ "$VERSION" == *-SNAPSHOT && "$TRAVIS_BRANCH" == "master" ]]; then
# this can take very long and no output is generated. therefore use the background job again
export PING_SLEEP=30s
export BUILD_OUTPUT=/tmp/build-site-upload.out
export PING_PID_FILE=/tmp/build-site-upload-ping.pid

source .travis/background-job-funcs.sh

# Uploading snapshot site...
rsync -ah --stats --delete target/pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/

# The build finished without returning an error so dump a tail of the output
dump_output

# nicely terminate the ping output loop
kill_ping
echo -e "\n\nUploading snapshot site...\n\n"
travis_wait rsync -ah --stats --delete target/pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/
fi
)
16 changes: 2 additions & 14 deletions .travis/build-sonar.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@ if ! travis_isPush; then
fi


export PING_SLEEP=30s
export BUILD_OUTPUT=/tmp/build-sonar.out
export PING_PID_FILE=/tmp/build-sonar-ping.pid

source .travis/background-job-funcs.sh

# Run the build, redirect output into the file
./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=${SONAR_TOKEN} -B -V >> $BUILD_OUTPUT 2>&1

# The build finished without returning an error so dump a tail of the output
dump_output

# nicely terminate the ping output loop
kill_ping
# Run the build, truncate output due to Travis log limits
travis_wait ./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=${SONAR_TOKEN} -B -V -q

Empty file modified .travis/common-functions.sh
100644 → 100755
Empty file.
Empty file modified .travis/configure-maven.sh
100644 → 100755
Empty file.
Empty file modified .travis/release.sh
100644 → 100755
Empty file.
Empty file modified .travis/setup-secrets.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://travis-ci.org/pmd/pmd.svg?branch=master)](https://travis-ci.org/pmd/pmd)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd)
[![Coverage Status](https://coveralls.io/repos/github/pmd/pmd/badge.svg)](https://coveralls.io/github/pmd/pmd)

## About

Expand Down
5 changes: 5 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_site/
.sass-cache/
.jekyll-metadata
_pdf
.idea/
6 changes: 6 additions & 0 deletions docs/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "Page Not Found"
search: exclude
---

Sorry, but the page you were trying to view does not exist. Try searching for it or looking at the URL to see if it looks correct.
26 changes: 26 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ruby:2.1
MAINTAINER mrafayaleem@gmail.com

RUN apt-get clean \
&& mv /var/lib/apt/lists /var/lib/apt/lists.broke \
&& mkdir -p /var/lib/apt/lists/partial

RUN apt-get update

RUN apt-get install -y \
node \
python-pygments \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/

WORKDIR /tmp
ADD Gemfile /tmp/
ADD Gemfile.lock /tmp/
RUN bundle install

VOLUME /src
EXPOSE 4000

WORKDIR /src
ENTRYPOINT ["jekyll"]

4 changes: 4 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem 'github-pages', group: :jekyll_plugins
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Loading

0 comments on commit d070c35

Please sign in to comment.