You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by be...@apache.org on 2026/08/23 10:21:52 UTC

(tapestry-5-site-builder) branch main updated (502b405 -> fb8cc17)

This is an automated email from the ASF dual-hosted git repository.

benweidig pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tapestry-5-site-builder.git


    from 502b405  Merge pull request #1 from apache/infrastructure-ruleset-bot/default-branch-protection
     new 4db6135  build(deps): pin version for reproducible build
     new 1e036f8  chore(asf): improve .asf.yaml
     new c5f828e  build(antora): pin output directory for CI
     new f1d6178  build(antora): copy .htaccess to output directory
     new fb8cc17  ci(jenkins): Jenkinsfile added

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .asf.yaml           |  21 ++++++++
 Jenkinsfile         | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 antora-playbook.yml |   9 ++++
 build.gradle        |  19 ++++++-
 4 files changed, 190 insertions(+), 2 deletions(-)
 create mode 100644 Jenkinsfile


(tapestry-5-site-builder) 05/05: ci(jenkins): Jenkinsfile added

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

benweidig pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tapestry-5-site-builder.git

commit fb8cc1712b48135d5e05fa323862f4eed3a6984b
Author: Ben Weidig <be...@netzgut.net>
AuthorDate: Sun Aug 23 12:21:23 2026 +0200

    ci(jenkins): Jenkinsfile added
---
 Jenkinsfile | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 143 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..f057f7e
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,143 @@
+pipeline {
+    agent {
+        node {
+            label 'git-websites'
+        }
+    }
+
+    environment {
+        GRADLE_OPTS    = '-Dci=true -Dfile.encoding=UTF-8'
+        STAGING_BRANCH = 'asf-staging'
+        SITE_DIR       = 'build/site'
+        EXPORT_DIR     = "/tmp/tapestry-site-${env.BUILD_NUMBER}"
+    }
+
+    options {
+        timeout(time: 30, unit: 'MINUTES')
+        disableConcurrentBuilds()
+    }
+
+    stages {
+
+        // -- 01: Build the Antora site ----------------------------------------
+
+        stage('Build Site') {
+            tools {
+                jdk 'jdk_21_latest'
+            }
+            steps {
+                script {
+                    env.SOURCE_SHA = sh(
+                        script: 'git rev-parse HEAD',
+                        returnStdout: true
+                    ).trim()
+                }
+
+                sh './gradlew --no-daemon clean antora'
+
+                // Cheap sanity check to preventhalf-built site.
+                //  - index.html: done by antora
+                // - .htaccess: after antora
+                sh """
+                    test -f ${env.SITE_DIR}/index.html
+                    test -f ${env.SITE_DIR}/.htaccess
+                """
+
+                // Move the output clear of the workspace as the next
+                // step checks out a different branch
+                sh """
+                    rm -rf ${env.EXPORT_DIR}
+                    cp -r ${env.SITE_DIR} ${env.EXPORT_DIR}
+                """
+            }
+        }
+
+        // -- 02: Publish to the staging branch --------------------------------
+
+        stage('Stage') {
+            when {
+                branch 'main'
+            }
+            steps {
+                // The multibranch checkout only fetches the built branch, so
+                // fetch the staging ref explicitly before switching to it.
+                sh """
+                    git config user.name  'jenkins'
+                    git config user.email 'jenkins@builds.apache.org'
+                    git fetch --no-tags origin \
+                        ${env.STAGING_BRANCH}:refs/remotes/origin/${env.STAGING_BRANCH}
+                    git checkout -B ${env.STAGING_BRANCH} \
+                        refs/remotes/origin/${env.STAGING_BRANCH}
+                """
+
+                // Drop stale output so deleted pages actually disappear.
+                // .asf.yaml drives the staging deployment and must survive.
+                sh '''
+                    find . -mindepth 1 -maxdepth 1 \\
+                        ! -name '.git' \\
+                        ! -name '.asf.yaml' \\
+                        -exec rm -rf {} +
+                '''
+
+                // Another cheap check
+                sh """
+                    cp -r ${env.EXPORT_DIR}/. .
+                    test -f index.html
+                    test -f .asf.yaml
+                """
+
+                sh """
+                    git add -A
+                    git commit -m 'Staged site from ${env.BRANCH_NAME} (${env.SOURCE_SHA})' \
+                        || echo 'No changes to stage'
+                    git push origin ${env.STAGING_BRANCH}
+                """
+            }
+        }
+    }
+
+    post {
+        fixed   { sendMail('FIXED') }
+        failure { sendMail('FAILURE') }
+        aborted { sendMail('ABORTED') }
+
+        cleanup {
+            sh "rm -rf ${env.EXPORT_DIR} || true"
+            deleteDir()
+        }
+    }
+}
+
+// MAIL NOTIFICATIONS
+
+def getChangeLog() {
+    def changeSets = currentBuild.changeSets
+    if (changeSets.isEmpty()) {
+        return "No changes recorded (manual build or no new commits)."
+    }
+    return changeSets
+        .collectMany { it.items as List }
+        .collect { "[${it.author}] ${it.msg}" }
+        .join('\n')
+}
+
+def sendMail(buildStatus) {
+    emailext (
+        subject: "[${buildStatus}] ${env.JOB_NAME} - Build #${env.BUILD_NUMBER}",
+        body: """
+STATUS: ${buildStatus}
+Build URL: ${env.BUILD_URL}
+Duration: ${currentBuild.durationString.replace(' and counting', '')}
+Staged at: https://tapestry.staged.apache.org/
+
+-----------------------------------------------------------
+CHANGES
+-----------------------------------------------------------
+${getChangeLog()}
+        """,
+        recipientProviders: [
+            developers(), // People who have commits in this build
+            requestor()   // The person who manually triggered the build
+        ]
+    )
+}


(tapestry-5-site-builder) 03/05: build(antora): pin output directory for CI

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

benweidig pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tapestry-5-site-builder.git

commit c5f828e1e37c29008af03cea2495821fa5d18e3e
Author: Ben Weidig <be...@netzgut.net>
AuthorDate: Sun Aug 23 12:03:08 2026 +0200

    build(antora): pin output directory for CI
---
 antora-playbook.yml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/antora-playbook.yml b/antora-playbook.yml
index 2254e6b..e74a5c6 100644
--- a/antora-playbook.yml
+++ b/antora-playbook.yml
@@ -1,24 +1,33 @@
 site:
   title: Apache Tapestry
   start_page: main::about.adoc
+
 content:
   sources:
   - url: https://gitbox.apache.org/repos/asf/tapestry-5-site.git
     branches: [main, 5.*]
+
+# Pin output directory for CI
+output:
+  dir: ./build/site
+
 urls:
   # Make the latest version appear as 'current' in URLs (instead of the version number).
   # That way, Redirects (configured in the .htaccess file) don't have to be updated for each new version.
   latest_version_segment: current
 asciidoc:
+
   extensions:
   - asciidoctor-kroki
   - ./lib/issue-processor
   - ./lib/javadoc-processor
+
 ui:
   bundle:
     url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
     snapshot: true
   supplemental_files: ./supplemental-ui
+
 antora:
   extensions:
   - require: '@antora/lunr-extension'


(tapestry-5-site-builder) 04/05: build(antora): copy .htaccess to output directory

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

benweidig pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tapestry-5-site-builder.git

commit f1d617860a2d4d8bd78b8a960b5a4b21fa1aab4d
Author: Ben Weidig <be...@netzgut.net>
AuthorDate: Sun Aug 23 12:04:12 2026 +0200

    build(antora): copy .htaccess to output directory
---
 build.gradle | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/build.gradle b/build.gradle
index 7c1678d..7548e0f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -14,3 +14,13 @@ antora {
         'asciidoctor-kroki'     : '0.18.1'
     ]
 }
+
+tasks.register('copyStaticRootFiles', Copy) {
+    from('.htaccess')
+    into(layout.buildDirectory.dir('site'))
+    mustRunAfter('antora')
+}
+
+tasks.named('antora') {
+    finalizedBy('copyStaticRootFiles')
+}


(tapestry-5-site-builder) 02/05: chore(asf): improve .asf.yaml

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

benweidig pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tapestry-5-site-builder.git

commit 1e036f8e2ea02fb6fac9592a5ffbdb7c20c5d069
Author: Ben Weidig <be...@netzgut.net>
AuthorDate: Sun Aug 23 12:02:56 2026 +0200

    chore(asf): improve .asf.yaml
---
 .asf.yaml | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
index ab59476..71f40a3 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -1,4 +1,25 @@
 github:
+  description: "Site configuration and Antora build logic for the Apache Tapestry website."
+  homepage: "https://tapestry.apache.org"
+  labels:
+    - apache
+    - antora
+    - documentation
+
+  features:
+    wiki: false
+    issues: true
+    projects: false
+
+  autolink_jira:
+    - TAP5
+
+  pull_requests:
+    del_branch_on_merge: true
+
+  dependabot_alerts: true
+  dependabot_updates: false
+
   rulesets:
     - name: "Default Branch Protection"
       type: branch


(tapestry-5-site-builder) 01/05: build(deps): pin version for reproducible build

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

benweidig pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tapestry-5-site-builder.git

commit 4db613586a443a79215355045b3c97120266eac4
Author: Ben Weidig <be...@netzgut.net>
AuthorDate: Sun Aug 23 12:02:19 2026 +0200

    build(deps): pin version for reproducible build
---
 build.gradle | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/build.gradle b/build.gradle
index 62ecf56..7c1678d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,10 +2,15 @@ plugins {
     id 'org.antora' version '1.0.0'
 }
 
+node {
+    version = '24'
+}
+
 antora {
+    version = '3.1.15'
     packages = [
         // '@antora/collector-extension': 'latest'
-        '@antora/lunr-extension': 'latest',
-        'asciidoctor-kroki' : 'latest'
+        '@antora/lunr-extension': '1.0.0-alpha.13',
+        'asciidoctor-kroki'     : '0.18.1'
     ]
 }