[ 
https://issues.apache.org/jira/browse/BEAM-4504?focusedWorklogId=155245&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-155245
 ]

ASF GitHub Bot logged work on BEAM-4504:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Oct/18 02:16
            Start Date: 17/Oct/18 02:16
    Worklog Time Spent: 10m 
      Work Description: swegner closed pull request #6713: [BEAM-4504] Retire 
Jenkins jobs from apache/beam-site repository
URL: https://github.com/apache/beam/pull/6713
 
 
   

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/CommonJobProperties.groovy 
b/.test-infra/jenkins/CommonJobProperties.groovy
index d098e1a8c7b..641cdfbd051 100644
--- a/.test-infra/jenkins/CommonJobProperties.groovy
+++ b/.test-infra/jenkins/CommonJobProperties.groovy
@@ -24,66 +24,15 @@ class CommonJobProperties {
 
   static String checkoutDir = 'src'
 
-  static void setSCM(def context, String repositoryName, boolean 
allowRemotePoll = true) {
-    context.scm {
-      git {
-        remote {
-          // Double quotes here mean ${repositoryName} is interpolated.
-          github("apache/${repositoryName}")
-          // Single quotes here mean that ${ghprbPullId} is not interpolated 
and instead passed
-          // through to Jenkins where it refers to the environment variable.
-          refspec('+refs/heads/*:refs/remotes/origin/* ' +
-                  
'+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*')
-        }
-        branch('${sha1}')
-        extensions {
-          cleanAfterCheckout()
-          relativeTargetDirectory(checkoutDir)
-          if (!allowRemotePoll) {
-            disableRemotePoll()
-          }
-        }
-      }
-    }
-  }
-
-  // Sets common top-level job properties for website repository jobs.
-  static void setTopLevelWebsiteJobProperties(def context,
-                                              String branch = 'asf-site',
-                                              int timeout = 100) {
-    setTopLevelJobProperties(
-            context,
-            'beam-site',
-            branch,
-            timeout)
-  }
-
   // Sets common top-level job properties for main repository jobs.
   static void setTopLevelMainJobProperties(def context,
-                                           String branch = 'master',
-                                           int timeout = 100,
+                                           String defaultBranch = 'master',
+                                           int defaultTimeout = 100,
                                            boolean allowRemotePoll = true,
                                            String jenkinsExecutorLabel =  
'beam') {
-    setTopLevelJobProperties(
-            context,
-            'beam',
-            branch,
-            timeout,
-            allowRemotePoll,
-            jenkinsExecutorLabel)
-  }
-
-  // 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(def context,
-                                               String repositoryName,
-                                               String defaultBranch,
-                                               int defaultTimeout,
-                                               boolean allowRemotePoll = true,
-                                               String jenkinsExecutorLabel = 
'beam') {
     // GitHub project.
     context.properties {
-      githubProjectUrl('https://github.com/apache/' + repositoryName + '/')
+      githubProjectUrl('https://github.com/apache/beam/')
     }
 
     // Set JDK version.
@@ -98,7 +47,25 @@ class CommonJobProperties {
     }
 
     // Source code management.
-    setSCM(context, repositoryName, allowRemotePoll)
+    context.scm {
+      git {
+        remote {
+          github("apache/beam")
+          // Single quotes here mean that ${ghprbPullId} is not interpolated 
and instead passed
+          // through to Jenkins where it refers to the environment variable.
+          refspec('+refs/heads/*:refs/remotes/origin/* ' +
+                  
'+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*')
+        }
+        branch('${sha1}')
+        extensions {
+          cleanAfterCheckout()
+          relativeTargetDirectory(checkoutDir)
+          if (!allowRemotePoll) {
+            disableRemotePoll()
+          }
+        }
+      }
+    }
 
     context.parameters {
       // This is a recommended setup if you want to run the job manually. The
@@ -196,14 +163,6 @@ class CommonJobProperties {
     context.switches("-Dorg.gradle.jvmargs=-Xmx4g")
   }
 
-  // Sets common config for PreCommit jobs.
-  static void setPreCommit(context,
-                           String commitStatusName,
-                           String prTriggerPhrase = '') {
-    // Set pull request build trigger.
-    setPullRequestBuildTrigger(context, commitStatusName, prTriggerPhrase, 
false)
-  }
-
   // 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.
diff --git a/.test-infra/jenkins/WebsiteShared.groovy 
b/.test-infra/jenkins/WebsiteShared.groovy
deleted file mode 100755
index 986bc757a09..00000000000
--- a/.test-infra/jenkins/WebsiteShared.groovy
+++ /dev/null
@@ -1,59 +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.
- */
-
-// TODO(BEAM-4505): Remove this file once apache/beam-site jobs stop using it.
-
-@groovy.transform.Field static final String install_ruby_and_gems_bash = '''
-        maxKeyFetchAttempts=5
-        currentAttempt=0
-        retryDelaySeconds=15
-
-        while [ $currentAttempt -lt $maxKeyFetchAttempts ]
-        do
-          echo "Attempt #$currentAttempt"
-          gpg --keyserver hkp://keys.gnupg.net --recv-keys 
409B6B1796C275462A1703113804BB82D39DC0E3 
7D2BAF1CF37B13E2069D6956105BD0E739499BDB && break
-          echo "Attempt failed. Sleeping $retryDelaySeconds seconds, then 
retrying"
-          n=$((n+1))
-          sleep $retryDelaySeconds
-        done
-
-        if [ $currentAttempt -ge $maxKeyFetchAttempts ]
-        then
-          echo "ERROR: Failed to fetch gpg keys."
-          exit 1
-        fi
-
-        \\curl -sSL https://get.rvm.io | bash
-        source /home/jenkins/.rvm/scripts/rvm
-
-        # Install Ruby.
-        RUBY_VERSION_NUM=2.3.0
-        rvm install ruby $RUBY_VERSION_NUM --autolibs=read-only
-
-        # Install Bundler gem
-        PATH=~/.gem/ruby/$RUBY_VERSION_NUM/bin:$PATH
-        GEM_PATH=~/.gem/ruby/$RUBY_VERSION_NUM/:$GEM_PATH
-        gem install bundler --user-install
-
-        # Enter the git clone for remaining commands
-        cd src
-
-        # Install all needed gems.
-        bundle install --path ~/.gem/
-
-        '''
diff --git a/.test-infra/jenkins/job_PreCommit_Website_Merge.groovy 
b/.test-infra/jenkins/job_PreCommit_Website_Merge.groovy
deleted file mode 100644
index 4fffd364724..00000000000
--- a/.test-infra/jenkins/job_PreCommit_Website_Merge.groovy
+++ /dev/null
@@ -1,45 +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.
- */
-
-import CommonJobProperties as commonJobProperties
-import WebsiteShared as websiteShared
-
-// TODO(BEAM-4505): This job is for the apache/beam-site repository and
-// should be removed once website sources are migrated to apache/beam.
-
-// Defines a job.
-job('beam_PreCommit_Website_Merge') {
-  description('Runs website tests for mergebot.')
-
-  // Set common parameters.
-  commonJobProperties.setTopLevelWebsiteJobProperties(delegate, 'mergebot')
-
-  triggers {
-    githubPush()
-  }
-
-  steps {
-    // Run the following shell script as a build step.
-    shell """
-        ${websiteShared.install_ruby_and_gems_bash}
-        # Build the new site and test it.
-        rm -fr ./content/
-        bundle exec rake test
-    """.stripIndent().trim()
-  }
-}
diff --git a/.test-infra/jenkins/job_PreCommit_Website_Stage.groovy 
b/.test-infra/jenkins/job_PreCommit_Website_Stage.groovy
deleted file mode 100644
index ef683ac957a..00000000000
--- a/.test-infra/jenkins/job_PreCommit_Website_Stage.groovy
+++ /dev/null
@@ -1,68 +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.
- */
-
-import CommonJobProperties as commonJobProperties
-import WebsiteShared as websiteShared
-
-// TODO(BEAM-4505): This job is for the apache/beam-site repository and
-// should be removed once website sources are migrated to apache/beam.
-
-// Defines a job.
-job('beam_PreCommit_Website_Stage') {
-  description('Stages the pull requests proposed for the Apache Beam ' +
-              'website to a temporary location to ease reviews.')
-
-  // Set common parameters.
-  commonJobProperties.setTopLevelWebsiteJobProperties(delegate)
-
-  // Set pull request build trigger.
-  commonJobProperties.setPreCommit(
-      delegate,
-      'Automatic staging of pull requests',
-      '\nJenkins built the site at commit id ${ghprbActualCommit} with ' +
-      'Jekyll and staged it [here](http://apache-beam-website-pull-' +
-      'requests.storage.googleapis.com/${ghprbPullId}/index.html). ' +
-      'Happy reviewing.\n\nNote that any previous site has been deleted. ' +
-      'This staged site will be automatically deleted after its TTL ' +
-      'expires. Push any commit to the pull request branch or re-trigger ' +
-      'the build to get it staged again.')
-
-  steps {
-    // Run the following shell script as a build step.
-    shell """
-        ${websiteShared.install_ruby_and_gems_bash}
-
-        # Remove current site if it exists.
-        GCS_PATH="gs://apache-beam-website-pull-requests/\${ghprbPullId}/"
-        gsutil -m rm -r -f \${GCS_PATH} || true
-
-        # Build the new site with the baseurl specified.
-        rm -fr ./content/
-        bundle exec jekyll build --baseurl=/\${ghprbPullId}
-
-        # Install BeautifulSoup HTML Parser for python.
-        pip install --user beautifulsoup4
-
-        # Fix links on staged website.
-        python .jenkins/append_index_html_to_internal_links.py
-
-        # Upload the new site.
-        gsutil -m cp -R ./content/* \${GCS_PATH}
-    """.stripIndent().trim()
-  }
-}
diff --git a/.test-infra/jenkins/job_PreCommit_Website_Test.groovy 
b/.test-infra/jenkins/job_PreCommit_Website_Test.groovy
deleted file mode 100644
index bc7e2724dad..00000000000
--- a/.test-infra/jenkins/job_PreCommit_Website_Test.groovy
+++ /dev/null
@@ -1,52 +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.
- */
-
-import CommonJobProperties as commonJobProperties
-import WebsiteShared as websiteShared
-
-// TODO(BEAM-4505): This job is for the apache/beam-site repository and
-// should be removed once website sources are migrated to apache/beam.
-
-// Defines a job.
-job('beam_PreCommit_Website_Test') {
-  description('Runs tests on the pull requests proposed for the Apache Beam ' +
-              'website.')
-
-  // Set common parameters.
-  commonJobProperties.setTopLevelWebsiteJobProperties(delegate)
-
-  // Execute concurrent builds. Multiple builds of this project may be executed
-  // in parallel. This is safe because this build does not require exclusive
-  // access to any shared resources.
-  concurrentBuild()
-
-  // Set pull request build trigger.
-  commonJobProperties.setPreCommit(
-      delegate,
-      'Test website (dead links, etc.)')
-
-  steps {
-    // Run the following shell script as a build step.
-    shell """
-        ${websiteShared.install_ruby_and_gems_bash}
-        # Build the new site and test it.
-        rm -fr ./content/
-        bundle exec rake test
-    """.stripIndent().trim()
-  }
-}


 

----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 155245)
    Time Spent: 40m  (was: 0.5h)

>  Disconnect mergebot from apache/beam-site repository
> -----------------------------------------------------
>
>                 Key: BEAM-4504
>                 URL: https://issues.apache.org/jira/browse/BEAM-4504
>             Project: Beam
>          Issue Type: Sub-task
>          Components: website
>            Reporter: Scott Wegner
>            Assignee: Scott Wegner
>            Priority: Major
>              Labels: beam-site-automation-reliability
>          Time Spent: 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to