[
https://issues.apache.org/jira/browse/BEAM-4495?focusedWorklogId=150940&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-150940
]
ASF GitHub Bot logged work on BEAM-4495:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Oct/18 21:27
Start Date: 03/Oct/18 21:27
Worklog Time Spent: 10m
Work Description: alanmyrvold commented on a change in pull request
#6546: [BEAM-4495] Create precommit to stage website on GCS
URL: https://github.com/apache/beam/pull/6546#discussion_r222473775
##########
File path: website/build.gradle
##########
@@ -184,3 +202,32 @@ task publishWebsite << {
commitWebsite.dependsOn testWebsite
publishWebsite.dependsOn commitWebsite
+
+/*
+ * Stages a pull request on GCS
+ * For example:
+ * ./gradlew :beam-website:stageWebsite -PpullId=${ghprbPullId}
+ */
+task stageWebsite << {
+ assert project.hasProperty('pullId')
+ assert pullId.isInteger()
+
+ def gcs_path = "gs://apache-beam-website-pull-requests/${pullId}"
+
+ // 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-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_path} || true"
Review comment:
Good point. Needs to be ignored on removing content (because it may not
exist) but not copy.
Removed the || true.
----------------------------------------------------------------
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: 150940)
Time Spent: 10h 40m (was: 10.5h)
> Create website pre-commits for apache/beam repository
> -----------------------------------------------------
>
> Key: BEAM-4495
> URL: https://issues.apache.org/jira/browse/BEAM-4495
> Project: Beam
> Issue Type: Sub-task
> Components: testing, website
> Reporter: Scott Wegner
> Assignee: Udi Meiri
> Priority: Major
> Labels: beam-site-automation-reliability
> Fix For: Not applicable
>
> Time Spent: 10h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)