jiazhai closed pull request #866: Manage all the jenkins jobs using jenkins-dsl
URL: https://github.com/apache/bookkeeper/pull/866
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.test-infra/jenkins/common_job_properties.groovy 
b/.test-infra/jenkins/common_job_properties.groovy
new file mode 100644
index 000000000..90813dbf4
--- /dev/null
+++ b/.test-infra/jenkins/common_job_properties.groovy
@@ -0,0 +1,259 @@
+/*
+ * 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.
+ */
+
+// Contains functions that help build Jenkins projects. Functions typically set
+// common properties that are shared among all Jenkins projects.
+// Code in this directory should conform to the Groovy style guide.
+//  http://groovy-lang.org/style-guide.html
+class common_job_properties {
+
+  // Sets common top-level job properties for website repository jobs.
+  static void setTopLevelWebsiteJobProperties(context,
+                                              String branch = 'master') {
+    // GitHub project.
+    context.properties {
+      githubProjectUrl('https://[email protected]/apache/bookkeeper/')
+    }
+
+    setTopLevelJobProperties(
+            context,
+            'https://gitbox.apache.org/repos/asf/bookkeeper.git',
+            branch,
+            'git-websites',
+            30)
+  }
+
+  // Sets common top-level job properties for main repository jobs.
+  static void setTopLevelMainJobProperties(context,
+                                           String branch = 'master',
+                                           int timeout = 100,
+                                           String jenkinsExecutorLabel = 
'ubuntu') {
+    // GitHub project.
+    context.properties {
+      githubProjectUrl('https://github.com/apache/bookkeeper/')
+    }
+
+
+    setTopLevelJobProperties(
+            context,
+            'https://github.com/apache/bookkeeper.git',
+            branch,
+            jenkinsExecutorLabel,
+            timeout)
+  }
+
+  // Sets common top-level job properties. Accessed through one of the above
+  // methods to protect jobs from internal details of param defaults.
+  private static void setTopLevelJobProperties(context,
+                                               String scmUrl,
+                                               String defaultBranch,
+                                               String jenkinsExecutorLabel,
+                                               int defaultTimeout) {
+    // Set JDK version.
+    context.jdk('JDK 1.8 (latest)')
+
+    // Restrict this project to run only on Jenkins executors as specified
+    context.label(jenkinsExecutorLabel)
+
+    // Discard old builds. Build records are only kept up to this number of 
days.
+    context.logRotator {
+      daysToKeep(14)
+    }
+
+    // Source code management.
+    context.scm {
+      git {
+        remote {
+          url(scmUrl)
+          refspec('+refs/heads/*:refs/remotes/origin/* ' +
+                  
'+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*')
+        }
+        branch('${sha1}')
+        extensions {
+          cleanAfterCheckout()
+        }
+      }
+    }
+
+    context.parameters {
+      // This is a recommended setup if you want to run the job manually. The
+      // ${sha1} parameter needs to be provided, and defaults to the main 
branch.
+      stringParam(
+          'sha1',
+          defaultBranch,
+          'Commit id or refname (eg: origin/pr/9/head) you want to build.')
+    }
+
+    context.wrappers {
+      // Abort the build if it's stuck for more minutes than specified.
+      timeout {
+        absolute(defaultTimeout)
+        abortBuild()
+      }
+
+      credentialsBinding {
+        string("COVERALLS_REPO_TOKEN", "bookkeeper-coveralls-token")
+      }
+    }
+  }
+
+  // Sets the pull request build trigger. Accessed through precommit methods
+  // below to insulate callers from internal parameter defaults.
+  private static void setPullRequestBuildTrigger(context,
+                                                 String commitStatusContext,
+                                                 String successComment = 
'--none--',
+                                                 String prTriggerPhrase = '') {
+    context.triggers {
+      githubPullRequest {
+        admins(['asfbot'])
+        useGitHubHooks()
+        orgWhitelist(['apache'])
+        allowMembersOfWhitelistedOrgsAsAdmin()
+        permitAll()
+        // prTriggerPhrase is the argument which gets set when we want to allow
+        // post-commit builds to run against pending pull requests. This block
+        // overrides the default trigger phrase with the new one. Setting this
+        // will disable automatic invocation of this build; the phrase will be
+        // required to start it.
+        if (prTriggerPhrase) {
+          triggerPhrase(prTriggerPhrase)
+          onlyTriggerPhrase()
+        }
+
+        extensions {
+          commitStatus {
+            // This is the name that will show up in the GitHub pull request UI
+            // for this Jenkins project.
+            delegate.context("Jenkins: " + commitStatusContext)
+          }
+
+          /*
+            This section is disabled, because of jenkinsci/ghprb-plugin#417 
issue.
+            For the time being, an equivalent configure section below is added.
+
+          // Comment messages after build completes.
+          buildStatus {
+            completedStatus('SUCCESS', successComment)
+            completedStatus('FAILURE', '--none--')
+            completedStatus('ERROR', '--none--')
+          }
+          */
+        }
+      }
+    }
+
+    // Comment messages after build completes.
+    context.configure {
+      def messages = it / triggers / 
'org.jenkinsci.plugins.ghprb.GhprbTrigger' / extensions / 
'org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildStatus' / messages
+      messages << 
'org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildResultMessage' {
+        message(successComment)
+        result('SUCCESS')
+      }
+      messages << 
'org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildResultMessage' {
+        message('--none--')
+        result('ERROR')
+      }
+      messages << 
'org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildResultMessage' {
+        message('--none--')
+        result('FAILURE')
+      }
+    }
+  }
+
+  // Sets common config for Maven jobs.
+  static void setMavenConfig(context, mavenInstallation='Maven 3.5.0', 
mavenOpts='-Xmx4096m -Xms2048m') {
+    context.mavenInstallation(mavenInstallation)
+    context.mavenOpts('-Dorg.slf4j.simpleLogger.showDateTime=true')
+    
context.mavenOpts('-Dorg.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd\\\'T\\\'HH:mm:ss.SSS')
+    // The -XX:+TieredCompilation -XX:TieredStopAtLevel=1 JVM options enable
+    // tiered compilation to make the JVM startup times faster during the 
tests.
+    context.mavenOpts('-XX:+TieredCompilation')
+    context.mavenOpts('-XX:TieredStopAtLevel=1')
+    context.mavenOpts(mavenOpts)
+    context.rootPOM('pom.xml')
+    // Use a repository local to the workspace for better isolation of jobs.
+    context.localRepository(LocalRepositoryLocation.LOCAL_TO_WORKSPACE)
+    // Disable archiving the built artifacts by default, as this is slow and 
flaky.
+    // We can usually recreate them easily, and we can also opt-in individual 
jobs
+    // to artifact archiving.
+    if (context.metaClass.respondsTo(context, 'archivingDisabled', boolean)) {
+      context.archivingDisabled(true)
+    }
+  }
+
+  // Sets common config for PreCommit jobs.
+  static void setPreCommit(context,
+                           String commitStatusName,
+                           String successComment = '--none--') {
+    // Set pull request build trigger.
+    setPullRequestBuildTrigger(context, commitStatusName, successComment)
+  }
+
+  // Enable triggering postcommit runs against pull requests. Users can 
comment the trigger phrase
+  // specified in the postcommit job and have the job run against their PR to 
run
+  // tests not in the presubmit suite for additional confidence.
+  static void enablePhraseTriggeringFromPullRequest(context,
+                                                    String commitStatusName,
+                                                    String prTriggerPhrase) {
+    setPullRequestBuildTrigger(
+      context,
+      commitStatusName,
+      '--none--',
+      prTriggerPhrase)
+  }
+
+  // Sets common config for PostCommit jobs.
+  static void setPostCommit(context,
+                            String buildSchedule = '0 */6 * * *',
+                            boolean triggerEveryPush = true,
+                            String notifyAddress = 
'[email protected]',
+                            boolean emailIndividuals = true) {
+    // Set build triggers
+    context.triggers {
+      // By default runs every 6 hours.
+      cron(buildSchedule)
+      if (triggerEveryPush) {
+        githubPush()
+      }
+    }
+
+    context.publishers {
+      // Notify an email address for each failed build (defaults to commits@).
+      mailer(notifyAddress, false, emailIndividuals)
+    }
+  }
+
+  // Sets common config for Website PostCommit jobs.
+  static void setWebsitePostCommit(context,
+                                   String buildSchedule = 'H 1 * * *',
+                                   String notifyAddress = 
'[email protected]',
+                                   boolean emailIndividuals = true) {
+    // Set build triggers
+    context.triggers {
+      // By default runs every 6 hours.
+      scm(buildSchedule)
+      githubPush()
+    }
+
+    context.publishers {
+      // Notify an email address for each failed build (defaults to commits@).
+      mailer(notifyAddress, false, emailIndividuals)
+    }
+  }
+
+}
diff --git 
a/.test-infra/jenkins/job_bookkeeper_postcommit_master_jdkversions.groovy 
b/.test-infra/jenkins/job_bookkeeper_postcommit_master_jdkversions.groovy
new file mode 100644
index 000000000..4a52a17bd
--- /dev/null
+++ b/.test-infra/jenkins/job_bookkeeper_postcommit_master_jdkversions.groovy
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+import common_job_properties
+
+// This job runs the Java postcommit tests cross multiple JDK versions.
+matrixJob('bookkeeper_postcommit_master_jdkversions') {
+  description('Runs nightly build for bookkeeper in multiple Jdk versions.')
+
+  // Set common parameters.
+  common_job_properties.setTopLevelMainJobProperties(delegate)
+
+  // Set JDK versions.
+  axes {
+    label('label', 'ubuntu')
+    jdk('JDK 1.8 (latest)',
+        'JDK 1.9 (latest)')
+  }
+
+  // Sets that this is a PostCommit job.
+  common_job_properties.setPostCommit(
+      delegate,
+      'H 12 * * *',
+      false)
+
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+      delegate,
+      'JDK Version Test',
+      '/test-jdks')
+
+  // Maven build for this job.
+  steps {
+    maven {
+      // Set maven parameters.
+      common_job_properties.setMavenConfig(delegate)
+
+      // Maven build project.
+      goals('clean apache-rat:check package spotbugs:check')
+    }
+  }
+}
diff --git a/.test-infra/jenkins/job_bookkeeper_postcommit_website.groovy 
b/.test-infra/jenkins/job_bookkeeper_postcommit_website.groovy
new file mode 100644
index 000000000..e796c9116
--- /dev/null
+++ b/.test-infra/jenkins/job_bookkeeper_postcommit_website.groovy
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+import common_job_properties
+
+// This job builds and publishes the website
+job('bookkeeper_postcommit_publish_website') {
+  description('Publish website to asf-site branch')
+
+  // Set common parameters.
+  common_job_properties.setTopLevelWebsiteJobProperties(delegate)
+
+  // Sets that this is a WebsitePostCommit job.
+  common_job_properties.setWebsitePostCommit(delegate)
+
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+      delegate,
+      'Build Website',
+      '/build-website')
+
+  steps {
+    // Run the following shell script as a build step.
+    shell '''
+export MAVEN_HOME=/home/jenkins/tools/maven/latest
+export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
+export MAVEN_OPTS=-Xmx2048m
+export JEKYLL_ENV=production
+
+# CD site/
+cd site
+
+# Build the javadoc
+make clean
+
+# generate javadoc
+make javadoc
+
+# run the docker image to build the website
+./docker/ci.sh
+
+# publish website
+source scripts/common.sh
+
+ORIGIN_REPO=$(git remote show origin | grep 'Push  URL' | awk -F// '{print 
$NF}')
+echo "ORIGIN_REPO: $ORIGIN_REPO"
+
+(
+  cd $APACHE_GENERATED_DIR
+
+  rm -rf $TMP_DIR
+  mkdir -p $TMP_DIR
+  cd $TMP_DIR
+
+  # clone the remote repo
+  git clone "https://$ORIGIN_REPO"; .
+  git config user.name "Apache BookKeeper Site Updater"
+  git config user.email "[email protected]"
+  git fetch origin
+  git checkout asf-site
+  git log | head
+  # copy the apache generated dir
+  cp -r $APACHE_GENERATED_DIR/content/* $TMP_DIR/content
+
+  git add -A .
+  git diff-index --quiet HEAD || (git commit -m "Updated site at revision 
$REVISION" && (git log | head) && git push -q origin HEAD:asf-site)
+
+  rm -rf $TMP_DIR
+)
+    '''.stripIndent().trim()
+  }
+}
diff --git a/.test-infra/jenkins/job_bookkeeper_precommit_pullrequest.groovy 
b/.test-infra/jenkins/job_bookkeeper_precommit_pullrequest.groovy
new file mode 100644
index 000000000..537a55d5b
--- /dev/null
+++ b/.test-infra/jenkins/job_bookkeeper_precommit_pullrequest.groovy
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+import common_job_properties
+
+// This is the Java precommit which runs a maven install, and the current set 
of precommit tests.
+matrixJob('bookkeeper_precommit_pullrequest') {
+  description('precommit verification for pull requests of <a 
href="http://bookkeeper.apache.org";>Apache BookKeeper</a>.')
+
+  // Execute concurrent builds if necessary.
+  concurrentBuild()
+
+  // Set common parameters.
+  common_job_properties.setTopLevelMainJobProperties(
+    delegate,
+    'master',
+    120)
+
+  // Set JDK versions.
+  axes {
+    label('label', 'ubuntu')
+    jdk('JDK 1.8 (latest)',
+        'JDK 1.9 (latest)')
+  }
+
+  // Sets that this is a PreCommit job.
+  common_job_properties.setPreCommit(delegate, 'Maven clean install')
+
+  // Maven build for this job.
+  steps {
+    maven {
+      // Set Maven parameters.
+      common_job_properties.setMavenConfig(delegate)
+
+      // Maven build project
+      goals('clean apache-rat:check package spotbugs:check')
+    }
+  }
+}
diff --git a/.test-infra/jenkins/job_bookkeeper_release_branch.groovy 
b/.test-infra/jenkins/job_bookkeeper_release_branch.groovy
new file mode 100644
index 000000000..3336a689f
--- /dev/null
+++ b/.test-infra/jenkins/job_bookkeeper_release_branch.groovy
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+import common_job_properties
+
+// This job runs nightly build for bookkeeper release branch
+mavenJob('bookkeeper_release_branch') {
+  description('Run nightly build for bookkeeper release branch')
+
+  // Set common parameters.
+  common_job_properties.setTopLevelMainJobProperties(
+      delegate,
+      "branch-4.6")
+
+  // Sets that this is a PostCommit job.
+  common_job_properties.setPostCommit(
+      delegate,
+      'H 12 * * *',
+      false)
+
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+      delegate,
+      'Release Branch Test',
+      '/test-release-branch')
+  
+  // Set maven parameters.
+  common_job_properties.setMavenConfig(delegate)
+
+  // Maven build project.
+  goals('clean apache-rat:check package findbugs:check')
+}
diff --git a/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy 
b/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy
new file mode 100644
index 000000000..b6fb3bd5d
--- /dev/null
+++ b/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+import common_job_properties
+
+// This job deploys a snapshot of latest master to artifactory nightly
+mavenJob('bookkeeper_release_nightly_snapshot') {
+  description('runs a `mvn clean deploy` of the nightly snapshot for 
bookkeeper.')
+
+  // Set common parameters.
+  common_job_properties.setTopLevelMainJobProperties(delegate)
+
+  // Sets that this is a PostCommit job.
+  common_job_properties.setPostCommit(
+      delegate,
+      'H 12 * * *',
+      false)
+
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+      delegate,
+      'Release Snapshot',
+      '/release-snapshot')
+
+  // Set maven parameters.
+  common_job_properties.setMavenConfig(delegate)
+
+  // Maven build project.
+  goals('clean apache-rat:check package spotbugs:check 
-Dmaven.test.failure.ignore=true deploy')
+}
diff --git a/.test-infra/jenkins/job_seed.groovy 
b/.test-infra/jenkins/job_seed.groovy
new file mode 100644
index 000000000..a77d056e2
--- /dev/null
+++ b/.test-infra/jenkins/job_seed.groovy
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+import common_job_properties
+
+// Defines the seed job, which creates or updates all other Jenkins projects.
+job('bookkeeper-seed') {
+  description('Automatically configures all Apache BookKeeper Jenkins projects 
based' +
+              ' on Jenkins DSL groovy files checked into the code repository.')
+
+  // Set common parameters.
+  common_job_properties.setTopLevelMainJobProperties(delegate)
+
+  // This is a post-commit job that runs once per day, not for every push.
+  common_job_properties.setPostCommit(
+      delegate,
+      'H 6 * * *',
+      false,
+      '[email protected]')
+
+  // Allows triggering this build against pull requests.
+  common_job_properties.enablePhraseTriggeringFromPullRequest(
+    delegate,
+    'Seed Job',
+    '/seed')
+
+  steps {
+    dsl {
+      // A list or a glob of other groovy files to process.
+      external('.test-infra/jenkins/job_*.groovy')
+
+      // If a job is removed from the script, delete it
+      removeAction('DELETE')
+    }
+  }
+}
diff --git a/jenkins/README.md b/jenkins/README.md
deleted file mode 100644
index f0e27f814..000000000
--- a/jenkins/README.md
+++ /dev/null
@@ -1,65 +0,0 @@
-<!--
-   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.
--->
-
-Instructions for build Jenkins bookkeeper-master job using Jenkins Job Builder
-
-
-Requirements:
-
-* Unix System
-* Jenkins Job Builder (see 
https://docs.openstack.org/infra/jenkins-job-builder/)
-
-
-The jenkins folder contains:
-
- - bookkeeper-master-job-configuration.yaml   (Jenkins job definition)
- - jenkins_jobs.ini   (Jenkins job builder configuration)
-
-
-Build and install latest version of jenkins-job-builder;
-
-```
-$ git clone https://git.openstack.org/openstack-infra/jenkins-job-builder
-```
-
-```
-$ python setup.py build
-```
-
-```
-$ python setup.py install --user
-```
-
-How do I create job ?
-
-Get an username and an "API Token" for your Jenkins configuration
-
-In order to test jenkins job configuration, go to 'jenkins' directory and run:
-
-```
-   $ jenkins-jobs test bookkeeper-master-job-configuration.yaml
-```
-
-This will print the XML configuration of the job which will be deployed to 
your Jenkins
-
- In order to apply the configuration and create the job, run:
-
-```
-   $ jenkins-jobs --user USER --password API-TOKEN --conf jenkins_jobs.ini 
update bookkeeper-master-job-configuration.yaml
-```
-
-By default the job will be deployed to builds.apache.org, you can change the 
destination in jenkins_jobs.ini
\ No newline at end of file
diff --git a/jenkins/bookkeeper-master-job-configuration.yaml 
b/jenkins/bookkeeper-master-job-configuration.yaml
deleted file mode 100644
index f79439a98..000000000
--- a/jenkins/bookkeeper-master-job-configuration.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-# 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.
-
----
-- scm:
-    name: repo
-    scm:
-    - git:
-        url: https://github.com/apache/bookkeeper.git
-        branches:
-        - "*/master"
-- job:
-    name: bookkeeper-master
-    description: "Nightly build for BookKeeper master.\r\nThis job is built 
using jenkins-jobs build scripts committed on BookKeeper repo.\r\n\r\nNo not 
edit manually this job"
-    project-type: maven
-    jdk: "JDK 1.8 (latest)"
-    node: Hadoop
-    maven:
-      root-pom: pom.xml
-      goals: clean apache-rat:check package spotbugs:check 
-Dmaven.test.failure.ignore=false deploy
-      incremental-build: true
-    reporters:
-    - email:
-        recipients: [email protected]
-    triggers:
-    - timed: H 12 * * *
-    wrappers:
-    - timeout:
-        type: likely-stuck
-        write-description: true
-    scm:
-    - repo
-    properties:
-    - build-discarder:
-        days-to-keep: 14
-        num-to-keep: 5
-        artifact-days-to-keep: -1
-        artifact-num-to-keep: -1
-    - throttle:
-        enabled: false
-        max-per-node: 0
-        max-total: 0
-        option: project
-    -  rebuild:
-        auto-rebuild: false
-        rebuild-disabled: false
diff --git a/jenkins/jenkins_jobs.ini b/jenkins/jenkins_jobs.ini
deleted file mode 100644
index 6fbc8ea83..000000000
--- a/jenkins/jenkins_jobs.ini
+++ /dev/null
@@ -1,28 +0,0 @@
-
-;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.
-
-[job_builder]
-ignore_cache=True
-keep_descriptions=False
-include_path=.:scripts:~/git/
-recursive=False
-exclude=.*:manual:./development
-allow_duplicates=False
-
-[jenkins]
-url=https://builds.apache.org
-query_plugins_info=False
-
-
-


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to