[
https://issues.apache.org/jira/browse/BEAM-4496?focusedWorklogId=148128&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-148128
]
ASF GitHub Bot logged work on BEAM-4496:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Sep/18 13:17
Start Date: 26/Sep/18 13:17
Worklog Time Spent: 10m
Work Description: swegner commented on a change in pull request #6431:
[BEAM-4496] Website publish via jenkins to beam asf-site branch
URL: https://github.com/apache/beam/pull/6431#discussion_r220554588
##########
File path: website/build.gradle
##########
@@ -87,20 +92,63 @@ task testWebsite(type: Exec) {
finalizedBy stopAndRemoveDockerContainer
inputs.files "$buildDir/Rakefile"
- inputs.dir "$buildDir/content"
+ inputs.dir buildContentDir
commandLine 'docker', 'exec',
"${->startDockerContainer.containerId()}", '/bin/bash', '-c',
"""cd $dockerWorkDir/build/website && \
bundle exec rake test"""
}
-/**
- * Removed testWebsite from the Beam build dependency because it is broken and
obsolete.
- * See https://issues.apache.org/jira/browse/BEAM-5367 for more info.
- */
-
-// check.dependsOn testWebsite
+check.dependsOn testWebsite
task preCommit {
dependsOn testWebsite
}
+
+// Creates a new commit on asf-site branch
+task commitWebsite << {
+ assert file("${buildContentDir}/index.html").exists()
+ // Generated javadoc and pydoc content is noa built or stored in this repo.
+ assert !file("${buildContentDir}/documentation/sdks/javadoc").exists()
+ assert !file("${buildContentDir}/documentation/sdks/pydoc").exists()
+
+ def git = grgit.open()
+ git.checkout(branch: 'asf-site')
+
+ // Delete the previous content.
+ git.remove(patterns: [ 'website/generated-content' ])
+ assert !file("${repoContentDir}/index.html").exists()
+ delete repoContentDir
+
+ // Copy the built content it and add it.
+ copy {
+ from buildContentDir
+ into repoContentDir
+ }
+ assert file("${repoContentDir}/index.html").exists()
+ git.add(patterns: ['website/generated-content'])
+
+ def latestCommit = grgit.log(maxCommits: 1)[0].abbreviatedId
Review comment:
Is this taking the latest commit on the current branch? I haven't tried it,
but I suspect this should come before switching branches.
----------------------------------------------------------------
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: 148128)
Time Spent: 17h 10m (was: 17h)
> Create Jenkins job to push generated HTML to asf-site branch
> ------------------------------------------------------------
>
> Key: BEAM-4496
> URL: https://issues.apache.org/jira/browse/BEAM-4496
> Project: Beam
> Issue Type: Sub-task
> Components: build-system, website
> Reporter: Scott Wegner
> Assignee: Alan Myrvold
> Priority: Major
> Labels: beam-site-automation-reliability
> Time Spent: 17h 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)