You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ie...@apache.org on 2020/07/06 16:25:39 UTC

[james-site] branch JAMES-3226-site-build updated: JAMES-3226 #comment Building James documentation

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

ieugen pushed a commit to branch JAMES-3226-site-build
in repository https://gitbox.apache.org/repos/asf/james-site.git


The following commit(s) were added to refs/heads/JAMES-3226-site-build by this push:
     new 33db600  JAMES-3226 #comment Building James documentation
     new 40b3a33  Merge branch 'JAMES-3226-site-build' of https://gitbox.apache.org/repos/asf/james-site into JAMES-3226-site-build
33db600 is described below

commit 33db60077f8cdc19108e4e3a44f0d48875cb544d
Author: Eugen Stan <eu...@ieugen.ro>
AuthorDate: Mon Jul 6 17:08:10 2020 +0300

    JAMES-3226 #comment Building James documentation
---
 Jenkinsfile                   | 116 ++++++++++++++++++++++++++++++++++++++++++
 antora-site.yml               |  17 -------
 doc-sites/antora-playbook.yml |  18 ++++---
 3 files changed, 126 insertions(+), 25 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..b4fc121
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,116 @@
+#!groovy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+def AGENT_LABEL = env.AGENT_LABEL ?: 'ubuntu'
+def JDK_NAME = env.JDK_NAME ?: 'JDK 11 (latest)'
+
+pipeline {
+
+    agent {
+        label AGENT_LABEL
+    }
+
+    environment {
+        CI=true
+    }
+
+    tools {
+        jdk JDK_NAME
+    }
+
+    options {
+        // Configure an overall timeout for the build of one hour.
+        timeout(time: 4, unit: 'HOURS')
+        // When we have test-fails e.g. we don't need to run the remaining steps
+        skipStagesAfterUnstable()
+        buildDiscarder(
+                logRotator(artifactNumToKeepStr: '5', numToKeepStr: '10')
+        )
+        disableConcurrentBuilds()
+    }
+
+    stages {
+        stage('Build') {
+            steps {
+                sh "./gradlew clean build"
+            }
+        }
+
+        stage('Run tests') {
+            steps {
+                echo "No tests to see. Move along."
+            }
+        }
+
+        stage('Publish') {
+            steps {
+                echo "These are not the publish commands you are looking for."
+            }
+        }
+    }
+
+    // Do any post build stuff ... such as sending emails depending on the overall build result.
+    post {
+        // If this build failed, send an email to the list.
+        failure {
+            echo "Failed "
+            script {
+                emailext(
+                        subject: "[BUILD-UNSTABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+                        body: """
+BUILD-UNSTABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':
+
+Check console output at "<a href="${env.BUILD_URL}">${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]</a>"
+""",
+                        to: "server-dev@james.apache.org",
+                        recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+                )
+            }
+        }
+
+        // If this build didn't fail, but there were failing tests, send an email to the list.
+        unstable {
+            echo "Unstable "
+        }
+
+        // Send an email, if the last build was not successful and this one is.
+        success {
+            echo "Success "
+            script {
+                if ((currentBuild.previousBuild != null) && (currentBuild.previousBuild.result != 'SUCCESS')) {
+                    emailext (
+                            subject: "[BUILD-STABLE]: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]'",
+                            body: """
+BUILD-STABLE: Job '${env.JOB_NAME} [${env.BRANCH_NAME}] [${env.BUILD_NUMBER}]':
+
+Is back to normal.
+""",
+                            to: "server-dev@james.apache.org",
+                            recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+                    )
+                }
+            }
+        }
+
+        always {
+            echo "Build done"
+        }
+    }
+}
diff --git a/antora-site.yml b/antora-site.yml
deleted file mode 100644
index 699e79a..0000000
--- a/antora-site.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-site:
-  title: Apache James
-  url: https://james.apache.org/
-  start_page: main::index.adoc
-content:
-  sources:
-  - url: https://gitbox.apache.org/repos/asf/james-project.git
-    branches: HEAD
-    start_path: docs
-  - url: https://gitbox.apache.org/repos/asf/james-jsieve.git
-    branches: HEAD
-    start_path: docs
-ui:
-  bundle:
-    url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable
-runtime:
-  fetch: true
\ No newline at end of file
diff --git a/doc-sites/antora-playbook.yml b/doc-sites/antora-playbook.yml
index 0f38388..1c6aae4 100644
--- a/doc-sites/antora-playbook.yml
+++ b/doc-sites/antora-playbook.yml
@@ -1,15 +1,17 @@
 site:
-  title: Antora Docs
-  start_page: component-b::index.adoc
+  title: Apache James
+  url: https://james.apache.org/
+  start_page: main::index.adoc
 content:
   sources:
-  - url: https://gitlab.com/antora/demo/demo-component-a.git
-    branches: master
-  - url: https://gitlab.com/antora/demo/demo-component-b.git
-    branches: [v2.0, v1.0]
+  - url: https://gitbox.apache.org/repos/asf/james-project.git
+    branches: HEAD
     start_path: docs
+  # - url: https://gitbox.apache.org/repos/asf/james-jsieve.git
+  #   branches: HEAD
+  #   start_path: docs
 ui:
   bundle:
     url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable
-    snapshot: true
-
+runtime:
+  fetch: true
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org