Sync docs from v1.0.4.RELEASE to gh-pages
@@ -12,118 +12,35 @@ if ! [ -d docs/target/generated-docs ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# The script should be executed from the root folder
|
||||
|
||||
ROOT_FOLDER=`pwd`
|
||||
echo "Current folder is ${ROOT_FOLDER}"
|
||||
|
||||
if [[ ! -e "${ROOT_FOLDER}/.git" ]]; then
|
||||
echo "You're not in the root folder of the project!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Retrieve properties
|
||||
###################################################################
|
||||
|
||||
# Prop that will let commit the changes
|
||||
COMMIT_CHANGES="no"
|
||||
MAVEN_PATH=${MAVEN_PATH:-}
|
||||
echo "Path to Maven is [${MAVEN_PATH}]"
|
||||
|
||||
# Code getting the name of the current branch. For master we want to publish as we did until now
|
||||
# http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch
|
||||
# If there is a branch already passed will reuse it - otherwise will try to find it
|
||||
CURRENT_BRANCH=${BRANCH}
|
||||
if [[ -z "${CURRENT_BRANCH}" ]] ; then
|
||||
CURRENT_BRANCH=$(git symbolic-ref -q HEAD)
|
||||
CURRENT_BRANCH=${CURRENT_BRANCH##refs/heads/}
|
||||
CURRENT_BRANCH=${CURRENT_BRANCH:-HEAD}
|
||||
fi
|
||||
echo "Current branch is [${CURRENT_BRANCH}]"
|
||||
git checkout ${CURRENT_BRANCH}
|
||||
|
||||
# Get the name of the `docs.main` property
|
||||
MAIN_ADOC_VALUE=$("${MAVEN_PATH}"mvn -q \
|
||||
-Dexec.executable="echo" \
|
||||
-Dexec.args='${docs.main}' \
|
||||
--non-recursive \
|
||||
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
|
||||
echo "Extracted 'main.adoc' from Maven build [${MAIN_ADOC_VALUE}]"
|
||||
|
||||
# Get whitelisted branches - assumes that a `docs` module is available under `docs` profile
|
||||
WHITELIST_PROPERTY="docs.whitelisted.branches"
|
||||
WHITELISTED_BRANCHES_VALUE=$("${MAVEN_PATH}"mvn -q \
|
||||
-Dexec.executable="echo" \
|
||||
-Dexec.args="\${${WHITELIST_PROPERTY}}" \
|
||||
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec \
|
||||
-P docs \
|
||||
-pl docs)
|
||||
echo "Extracted '${WHITELIST_PROPERTY}' from Maven build [${WHITELISTED_BRANCHES_VALUE}]"
|
||||
|
||||
# Stash any outstanding changes
|
||||
###################################################################
|
||||
git diff-index --quiet HEAD && dirty=$? || (echo "Failed to check if the current repo is dirty. Assuming that it is." && dirty="1")
|
||||
git diff-index --quiet HEAD
|
||||
dirty=$?
|
||||
if [ "$dirty" != "0" ]; then git stash; fi
|
||||
|
||||
# Switch to gh-pages branch to sync it with master
|
||||
###################################################################
|
||||
git checkout gh-pages
|
||||
git pull origin gh-pages
|
||||
|
||||
# Add git branches
|
||||
###################################################################
|
||||
mkdir -p ${ROOT_FOLDER}/${CURRENT_BRANCH}
|
||||
if [[ "${CURRENT_BRANCH}" == "master" ]] ; then
|
||||
echo -e "Current branch is master - will copy the current docs only to the root folder"
|
||||
for f in docs/target/generated-docs/*; do
|
||||
file=${f#docs/target/generated-docs/*}
|
||||
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
|
||||
# Not ignored...
|
||||
cp -rf $f ${ROOT_FOLDER}/
|
||||
git add -A ${ROOT_FOLDER}/$file
|
||||
fi
|
||||
done
|
||||
COMMIT_CHANGES="yes"
|
||||
else
|
||||
echo -e "Current branch is [${CURRENT_BRANCH}]"
|
||||
# http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin
|
||||
if [[ ",${WHITELISTED_BRANCHES_VALUE}," = *",${CURRENT_BRANCH},"* ]] ; then
|
||||
echo -e "Branch [${CURRENT_BRANCH}] is whitelisted! Will copy the current docs to the [${CURRENT_BRANCH}] folder"
|
||||
for f in docs/target/generated-docs/*; do
|
||||
file=${f#docs/target/generated-docs/*}
|
||||
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
|
||||
# Not ignored...
|
||||
# We want users to access 1.0.0.RELEASE/ instead of 1.0.0.RELEASE/spring-cloud.sleuth.html
|
||||
if [[ "${file}" == "${MAIN_ADOC_VALUE}.html" ]] ; then
|
||||
# We don't want to copy the spring-cloud-sleuth.html
|
||||
# we want it to be converted to index.html
|
||||
cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html
|
||||
git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html
|
||||
else
|
||||
cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH}
|
||||
git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/$file
|
||||
fi
|
||||
fi
|
||||
done
|
||||
COMMIT_CHANGES="yes"
|
||||
else
|
||||
echo -e "Branch [${CURRENT_BRANCH}] is not on the white list! Check out the Maven [${WHITELIST_PROPERTY}] property in
|
||||
[docs] module available under [docs] profile. Won't commit any changes to gh-pages for this branch."
|
||||
for f in docs/target/generated-docs/*; do
|
||||
file=${f#docs/target/generated-docs/*}
|
||||
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
|
||||
# Not ignored...
|
||||
cp -rf $f .
|
||||
git add -A $file
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "${COMMIT_CHANGES}" == "yes" ]] ; then
|
||||
git commit -a -m "Sync docs from ${CURRENT_BRANCH} to gh-pages"
|
||||
git commit -a -m "Sync docs from master to gh-pages"
|
||||
|
||||
# Uncomment the following push if you want to auto push to
|
||||
# the gh-pages branch whenever you commit to master locally.
|
||||
# This is a little extreme. Use with care!
|
||||
###################################################################
|
||||
git push origin gh-pages
|
||||
fi
|
||||
# Uncomment the following push if you want to auto push to
|
||||
# the gh-pages branch whenever you commit to master locally.
|
||||
# This is a little extreme. Use with care!
|
||||
###################################################################
|
||||
git push origin gh-pages
|
||||
|
||||
# Finally, switch back to the master branch and exit block
|
||||
git checkout ${CURRENT_BRANCH}
|
||||
git checkout master
|
||||
if [ "$dirty" != "0" ]; then git stash pop; fi
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
|
||||
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 218 KiB |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 139 KiB |
@@ -430,7 +430,6 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
||||
<li><a href="#_terminology">Terminology</a></li>
|
||||
<li><a href="#_purpose">Purpose</a></li>
|
||||
<li><a href="#_adding_to_the_project">Adding to the project</a></li>
|
||||
<li><a href="#_additional_resources">Additional resources</a></li>
|
||||
<li><a href="#_features">Features</a></li>
|
||||
<li><a href="#_sampling">Sampling</a></li>
|
||||
<li><a href="#_instrumentation">Instrumentation</a></li>
|
||||
@@ -482,9 +481,6 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
||||
<div id="preamble">
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><strong>1.1.0.BUILD-SNAPSHOT</strong></p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Spring Cloud Sleuth implements a distributed tracing solution for <a href="http://cloud.spring.io">Spring Cloud</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1168,22 +1164,6 @@ public class ZipkinStreamServerApplication {
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_additional_resources">Additional resources</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><strong>Marcin Grzejszczak talking about Spring Cloud Sleuth and Zipkin</strong></p>
|
||||
</div>
|
||||
<div class="videoblock">
|
||||
<div class="content">
|
||||
<iframe src="https://www.youtube.com/embed/eQV71Mw1u1c?rel=0" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p><a href="https://www.youtube.com/watch?v=eQV71Mw1u1c">click here to see the video</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_features">Features</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="ulist">
|
||||
@@ -1844,17 +1824,8 @@ public class Consumer {
|
||||
<p>will listen for the Span data on whatever transport you provide via a
|
||||
Spring Cloud Stream <code>Binder</code> (e.g. include
|
||||
<code>spring-cloud-starter-stream-rabbit</code> for RabbitMQ, and similar
|
||||
starters exist for Redis and Kafka). If you add the following UI dependency</p>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-xml" data-lang="xml"><groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-autoconfigure-ui</artifactId></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>Then you’ll have your app a
|
||||
<a href="https://github.com/openzipkin/zipkin">Zipkin server</a>, which hosts
|
||||
starters exist for Redis and Kafka). The app will also be a
|
||||
<a href="https://github.com/openzipkin/zipkin-java">Zipkin server</a>, which hosts
|
||||
the UI and api on port 9411.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
@@ -1934,25 +1905,6 @@ the consumer app).
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>In order to customize the polling mechanism you can create a bean of <code>PollerMetadata</code> type
|
||||
with name equal to <code>StreamSpanReporter.POLLER</code>. Here you can find an example of such a configuration.</p>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-java" data-lang="java">@Configuration
|
||||
public static class CustomPollerConfiguration {
|
||||
|
||||
@Bean(name = StreamSpanReporter.POLLER)
|
||||
PollerMetadata customPoller() {
|
||||
PollerMetadata poller = new PollerMetadata();
|
||||
poller.setMaxMessagesPerPoll(500);
|
||||
poller.setTrigger(new PeriodicTrigger(5000L));
|
||||
return poller;
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2145,20 +2097,7 @@ wrap <code>ThreadPoolTaskScheduler</code> in a <code>TraceAsyncListenableTaskExe
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="highlight"><code class="language-java" data-lang="java">@EnableAutoConfiguration
|
||||
@Configuration
|
||||
public static class TestConfiguration {
|
||||
|
||||
@Bean
|
||||
ClientHttpRequestFactory mySyncClientFactory() {
|
||||
return new MySyncClientHttpRequestFactory();
|
||||
}
|
||||
|
||||
@Bean
|
||||
AsyncClientHttpRequestFactory myAsyncClientFactory() {
|
||||
return new MyAsyncClientHttpRequestFactory();
|
||||
}
|
||||
}</code></pre>
|
||||
<pre class="highlight"><code class="language-java" data-lang="java">Unresolved directive in spring-cloud-sleuth.adoc - include::../../../../spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebAsyncClientAutoConfigurationTest.java[tags=async_template_factories,indent=0]</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
@@ -2261,23 +2200,10 @@ backwards compatibility in 1.0.4 we’ve started sending both valid and inva
|
||||
in Spring Cloud Sleuth 1.1 we will remove the support for the deprecated headers.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>You can provide the <code>spring.sleuth.integration.patterns</code> pattern to explicitly
|
||||
<p>Since 1.0.4 you can provide the <code>spring.sleuth.integration.patterns</code> pattern to explicitly
|
||||
provide the names of channels that you want to include for tracing. By default all channels
|
||||
are included.</p>
|
||||
</div>
|
||||
<div class="admonitionblock important">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<div class="title">Important</div>
|
||||
</td>
|
||||
<td class="content">
|
||||
When using the <code>Executor</code> to build a Spring Integration <code>IntegrationFlow</code> remember to use the <strong>untraced</strong> version of the <code>Executor</code>.
|
||||
Decorating Spring Integration Executor Channel with <code>TraceableExecutorService</code> will cause the spans to be improperly closed.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_zuul">Zuul</h3>
|
||||
@@ -2309,7 +2235,7 @@ To disable Zuul support set the <code>spring.sleuth.zuul.enabled</code> property
|
||||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2016-08-18 12:48:18 CEST
|
||||
Last updated 2016-08-18 13:41:20 CEST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||