[
https://issues.apache.org/jira/browse/BEAM-5719?focusedWorklogId=153689&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-153689
]
ASF GitHub Bot logged work on BEAM-5719:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Oct/18 20:22
Start Date: 11/Oct/18 20:22
Worklog Time Spent: 10m
Work Description: swegner closed pull request #6660: [BEAM-5719] Use gcs
rsync and validate that a valid baseUrl is specified
URL: https://github.com/apache/beam/pull/6660
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/website/build.gradle b/website/build.gradle
index 20ba5186516..db852dc7ce8 100644
--- a/website/build.gradle
+++ b/website/build.gradle
@@ -259,19 +259,17 @@ publishWebsite.dependsOn commitWebsite
*/
task stageWebsite << {
def baseUrl = getBaseUrl()
+ assert baseUrl : 'Website staging requires a valid baseUrl'
def gcs_bucket = project.findProperty('websiteBucket') ?:
'apache-beam-website-pull-requests'
def gcs_path = "gs://${gcs_bucket}/${baseUrl}"
- // Remove current site if it exists.
- shell "gsutil -m rm -r -f ${gcs_path} || true"
-
// Fixup the links to index.html files
shell "cd ${buildDir} && ln -s generated-gcs-content content || true"
shell ". ${envdir}/bin/activate && cd ${buildDir} && " +
"python
${project.rootDir}/website/.jenkins/append_index_html_to_internal_links.py"
// Copy the build website to GCS
- shell "gsutil -m cp -r ${buildContentDir('gcs')} ${gcs_path}"
+ shell "gsutil -m rsync -r -d ${buildContentDir('gcs')} ${gcs_path}"
println "Website published to http://${gcs_bucket}." +
"storage.googleapis.com/${baseUrl}/index.html"
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 153689)
Time Spent: 0.5h (was: 20m)
> Misconfigured GCS staging jobs can nuke entire top-level bucket
> ---------------------------------------------------------------
>
> Key: BEAM-5719
> URL: https://issues.apache.org/jira/browse/BEAM-5719
> Project: Beam
> Issue Type: Sub-task
> Components: build-system, website
> Reporter: Scott Wegner
> Assignee: Scott Wegner
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> See: https://github.com/apache/beam/pull/6655#issuecomment-429037632
> A bug in the Website_Stage_GCS job was causing the Jenkins job to wipe out
> the top-level GCS bucket used to stage and serve the website from. This ends
> up blocking all future runs of the job and takes manual effort to recreate
> and configure the bucket.
> The linked PR should fix the immediate issue, but it's still the case that a
> bug in the job/configuration could potentially wipe it out again. We should
> refactor the job or modify the command so that there is no longer danger of
> wiping it out.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)