Skip to content

Commit

Permalink
Added Antora support
Browse files Browse the repository at this point in the history
  • Loading branch information
marcingrzejszczak committed Sep 13, 2023
1 parent 303ea0d commit 7e8a03e
Show file tree
Hide file tree
Showing 130 changed files with 6,421 additions and 7 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy Docs
on:
push:
branches-ignore: [ gh-pages ]
tags: '**'
repository_dispatch:
types: request-build-reference # legacy
#schedule:
#- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch:
permissions:
actions: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: docs-build
fetch-depth: 1
- name: Dispatch (partial build)
if: github.ref_type == 'branch'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }}
- name: Dispatch (full build)
if: github.ref_type == 'tag'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD)
16 changes: 11 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ buildscript {

// TODO: remove this hack, see: https://github.com/nebula-plugins/nebula-release-plugin/issues/213
def releaseStage = findProperty('release.stage')
apply plugin: 'com.netflix.nebula.release'
release.defaultVersionStrategy = nebula.plugin.release.git.opinion.Strategies.SNAPSHOT
if (!project.hasProperty("antora")) {
apply plugin: 'com.netflix.nebula.release'
release.defaultVersionStrategy = nebula.plugin.release.git.opinion.Strategies.SNAPSHOT
}

apply plugin: 'io.github.gradle-nexus.publish-plugin'
apply from: 'dependencies.gradle'
Expand Down Expand Up @@ -296,8 +298,11 @@ subprojects {
apply plugin: 'com.netflix.nebula.maven-apache-license'
apply plugin: 'com.netflix.nebula.publish-verification'
apply plugin: 'com.netflix.nebula.contacts'
apply plugin: 'com.netflix.nebula.info'
apply plugin: 'com.netflix.nebula.project'

if (!project.hasProperty("antora")) {
apply plugin: 'com.netflix.nebula.info'
apply plugin: 'com.netflix.nebula.project'
}

if (project.name != 'micrometer-bom') {
apply plugin: 'biz.aQute.bnd.builder'
Expand Down Expand Up @@ -410,7 +415,8 @@ subprojects {
}

def check = tasks.findByName('check')
if (check) project.rootProject.tasks.releaseCheck.dependsOn check
boolean antora = project.hasProperty("antora")
if (check && !antora) project.rootProject.tasks.releaseCheck.dependsOn check
}

nexusPublishing {
Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def VERSIONS = [
]

def PLATFORM_BOMS = [
'io.projectreactor:reactor-bom:2020.0.+',
'io.projectreactor:reactor-bom:2022.0.+',
'io.netty:netty-bom:4.1.+',
'org.junit:junit-bom:5.10.+', // Not using latest.release to avoid using a milestone version.
]
Expand Down
42 changes: 42 additions & 0 deletions docs/antora-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# PACKAGES [email protected] @antora/atlas-extension:1.0.0-alpha.1 @antora/[email protected] @springio/[email protected] @asciidoctor/[email protected] @opendevise/[email protected]
#
# The purpose of this Antora playbook is to build the docs in the current branch.
antora:
extensions:
- '@springio/antora-extensions/partial-build-extension'
- require: '@springio/antora-extensions/latest-version-extension'
- require: '@springio/antora-extensions/inject-collector-cache-config-extension'
- '@antora/collector-extension'
- '@antora/atlas-extension'
- require: '@springio/antora-extensions/root-component-extension'
root_component_name: 'micrometer'
site:
title: Micrometer
url: https://docs.micrometer.io/micrometer/reference/
content:
sources:
- url: ./..
branches: HEAD
start_path: docs
worktrees: true
asciidoc:
attributes:
page-stackoverflow-url: https://stackoverflow.com/tags/micrometer
page-pagination: ''
hide-uri-scheme: '@'
tabs-sync-option: '@'
chomp: 'all'
extensions:
- '@asciidoctor/tabs'
- '@springio/asciidoctor-extensions'
sourcemap: true
urls:
latest_version_segment: ''
runtime:
log:
failure_level: warn
format: pretty
ui:
bundle:
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.5/ui-bundle.zip

19 changes: 19 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: micrometer
version: true
title: Micrometer
nav:
- modules/ROOT/nav.adoc
ext:
collector:
run:
command: gradlew -q -PbuildSrc.skipTests=true -Pantora "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :docs:generateAntoraResources
local: true
scan:
dir: ./build/generated-antora-resources

asciidoc:
attributes:
attribute-missing: 'warn'
chomp: 'all'
include-java: 'example$docs-src/test/java/io/micrometer/docs'
include-resources: 'example$docs-src/test/resources'
79 changes: 79 additions & 0 deletions docs/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
plugins {
id 'java'
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
id 'org.antora' version '1.0.0'
id 'java-library'
}

description = "Micrometer Docs"

antora {
version = '3.2.0-alpha.2'
playbook = 'antora-playbook.yml'
options = ['--clean', '--stacktrace']
environment = [
'ALGOLIA_API_KEY': 'da671ceec1f84f80f280884a6a91bde5',
'ALGOLIA_APP_ID': 'WB1FQYI187',
'ALGOLIA_INDEX_NAME': 'micrometer'
]

dependencies = [
'@antora/atlas-extension': '1.0.0-alpha.1',
'@antora/collector-extension': '1.0.0-alpha.3',
'@asciidoctor/tabs': '1.0.0-beta.3',
'@springio/antora-extensions': '1.4.2',
'@springio/asciidoctor-extensions': '1.0.0-alpha.8',
]
}


tasks.named("generateAntoraYml") {
asciidocAttributes = project.provider( {
return ["micrometer-version": project.version.toString()]
} )
}

tasks.create("generateAntoraResources") {
dependsOn 'generateAntoraYml'
}

tasks.named("antora") {
dependsOn "generateAntoraResources"
}

tasks.named("antora") {
dependsOn "test"
}

jar {
enabled = false
}

javadoc {
enabled = false
}

repositories {
mavenCentral()
}

dependencies {
implementation project(":micrometer-core")
implementation 'io.micrometer:context-propagation'
implementation 'ch.qos.logback:logback-classic'
implementation 'org.slf4j:slf4j-api'

testImplementation project(":micrometer-test")
testImplementation project(":micrometer-observation-test")
testImplementation 'org.aspectj:aspectjweaver'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.mockito:mockito-inline'
testImplementation 'org.assertj:assertj-core'
testImplementation 'org.springframework:spring-context'
testImplementation 'io.projectreactor:reactor-core'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'io.netty:netty-transport'
testImplementation 'org.apache.httpcomponents.client5:httpclient5'
testImplementation 'io.javalin:javalin:latest.release'
}

111 changes: 111 additions & 0 deletions docs/gradle.lockfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/modules/ROOT/assets/images/logo.png
1 change: 1 addition & 0 deletions docs/modules/ROOT/examples/docs-src
53 changes: 53 additions & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
* xref:overview.adoc[Overview]
* xref:installing.adoc[Installing]
* xref:concepts.adoc[Concepts]
** xref:concepts/implementations.adoc[Supported Monitoring Systems]
** xref:concepts/registry.adoc[Registry]
** xref:concepts/meters.adoc[Meters]
** xref:concepts/naming.adoc[Naming Meters]
** xref:concepts/meter-filters.adoc[Meter Filters]
** xref:concepts/rate-aggregation.adoc[Rate Aggregation]
** xref:concepts/counters.adoc[Counters]
** xref:concepts/gauges.adoc[Gauges]
** xref:concepts/timers.adoc[Timers]
** xref:concepts/distribution-summaries.adoc[Distribution Summaries]
** xref:concepts/long-task-timers.adoc[Long Task Timers]
** xref:concepts/histogram-quantiles.adoc[Histograms and Percentiles]
* xref:implementations.adoc[Implementations]
** xref:implementations/appOptics.adoc[AppOptics]
** xref:implementations/atlas.adoc[Atlas]
** xref:implementations/cloudwatch.adoc[CloudWatch]
** xref:implementations/datadog.adoc[Datadog]
** xref:implementations/dynatrace.adoc[Dynatrace]
** xref:implementations/elastic.adoc[Elasticsearch]
** xref:implementations/ganglia.adoc[Ganglia]
** xref:implementations/graphite.adoc[Graphite]
** xref:implementations/humio.adoc[Humio]
** xref:implementations/influx.adoc[Influx]
** xref:implementations/instana.adoc[Instana]
** xref:implementations/jmx.adoc[JMX]
** xref:implementations/kairos.adoc[KairosDB]
** xref:implementations/new-relic.adoc[New Relic]
** xref:implementations/otlp.adoc[OpenTelemetry Protocol (OTLP)]
** xref:implementations/prometheus.adoc[Prometheus]
** xref:implementations/signalFx.adoc[SignalFx]
** xref:implementations/stackdriver.adoc[Stackdriver]
** xref:implementations/statsD.adoc[statsD]
** xref:implementations/wavefront.adoc[Wavefront]
* xref:reference.adoc[Reference Instrumentations]
** xref:reference/jvm.adoc[JVM]
** xref:reference/cache.adoc[Cache]
** xref:reference/okhttpclient.adoc[OkHttpClient]
** xref:reference/jetty.adoc[Jetty and Jersey]
** xref:reference/netty.adoc[Netty]
* xref:guides.adoc[Guides]
** xref:guides/console-reporter.adoc[Passing through to Dropwizard's console reporter]
** xref:guides/http-sender-resilience4j-retry.adoc[HttpSender with Resilience4j retry]
** xref:guides/custom-meter-registry.adoc[Custom meter registry]
* xref:observation.adoc[Micrometer Observation]
** xref:observation/installing.adoc[Installing]
** xref:observation/handler.adoc[Observation Handlers]
** xref:observation/instrumenting.adoc[Instrumenting]
** xref:observation/testing.adoc[Testing]
** xref:observation/projects.adoc[Instrumented Projects]
* xref:support.adoc[Support]
Loading

0 comments on commit 7e8a03e

Please sign in to comment.