diff --git a/.github/workflows/docs_master.yml b/.github/workflows/docs_master.yml new file mode 100644 index 0000000000..d04e0e548e --- /dev/null +++ b/.github/workflows/docs_master.yml @@ -0,0 +1,39 @@ +name: Generate and Publish Docs + +on: + push: + branches: + - master + +env: + GRADLE_OPTS: -Dorg.gradle.daemon=false + +jobs: + generate-docs: + # Only run the root repository + if: startsWith(github.repository, 'spinnaker/') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: actions/cache@v1 + with: + path: ~/.gradle + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Docs + run: ./gradlew dokkaHtml --stacktrace + - name: Publish orca-api docs + uses: spinnaker/ghaction-copy-to-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.SPINNAKER_GITHUB_TOKEN }} + with: + source-directory: orca-api/build/dokka/html/ + destination-github-username: spinnaker + destination-repository-name: spinnaker.github.io + destination-directory: reference/api/service-plugin-apis/orca-api/master/x + user-email: sig-docs@spinnaker.io + user-name: autodocs diff --git a/build.gradle b/build.gradle index 0a4cde790c..75684c46f8 100644 --- a/build.gradle +++ b/build.gradle @@ -18,8 +18,8 @@ plugins { id 'io.spinnaker.project' version "$spinnakerGradleVersion" apply false id "nebula.kotlin" version "$kotlinVersion" apply false id "org.jetbrains.kotlin.plugin.allopen" version "$kotlinVersion" apply false - id "org.jetbrains.dokka" version "0.10.1" apply false id "io.gitlab.arturbosch.detekt" version "1.7.4" apply false + id "org.jetbrains.dokka" version "1.4.10" apply false } allprojects { diff --git a/gradle/dokka.gradle b/gradle/dokka.gradle index 205b9d679b..338bceb4a6 100644 --- a/gradle/dokka.gradle +++ b/gradle/dokka.gradle @@ -16,11 +16,10 @@ apply plugin: "org.jetbrains.dokka" -dokka { - outputFormat = 'html' - outputDirectory = "$buildDir/dokka" - - configuration { - jdkVersion = 8 +dokkaHtml { + dokkaSourceSets { + configureEach { + jdkVersion.set(11) + } } } diff --git a/orca-api/api.md b/orca-api/api.md deleted file mode 100644 index 71cf4c8d01..0000000000 --- a/orca-api/api.md +++ /dev/null @@ -1,17 +0,0 @@ -# Module orca-api - -Contains all public Java APIs for Orca. - -## Package com.netflix.spinnaker.orca.api.simplestage - -The `SimpleStage` extension point is useful for the most basic custom stages that do not need to interact with separate systems. - -## Package com.netflix.spinnaker.orca.api.pipeline.graph - -The `StageDefinitionBuilder` extension point provides absolute low-level access to building a stage within Spinnaker. -It offers the ability to create arbitrarily complex stage definitions of any number of Tasks or the composition of other stages. - -## Package com.netflix.spinnaker.orca.api.preconfigured.jobs - -The `PreconfiguredJobConfigurationProvider` extension point provides a simple API for providing one or more preconfigured job stages. -A preconfigured job is a container that is executed as a stage and can be configured with a custom UI. diff --git a/orca-api/orca-api.gradle b/orca-api/orca-api.gradle index 732bc5176b..f7a9624d0c 100644 --- a/orca-api/orca-api.gradle +++ b/orca-api/orca-api.gradle @@ -44,6 +44,8 @@ dependencies { testRuntimeOnly("org.junit.jupiter:junit-jupiter-api") testRuntimeOnly("org.junit.vintage:junit-vintage-engine") + dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.4.10") + sampleImplementation(sourceSets.main.runtimeClasspath) } @@ -60,9 +62,3 @@ test { includeEngines "junit-vintage", "junit-jupiter" } } - -dokka { - configuration { - includes = ["api.md"] - } -} diff --git a/settings.gradle b/settings.gradle index f16bc9d25c..d1953b21fc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,6 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +pluginManagement { + repositories { + gradlePluginPortal() + jcenter() + } +} ['fiat', 'kork'].each { prj -> String propName = "${prj}Composite"