[
https://issues.apache.org/jira/browse/BEAM-4496?focusedWorklogId=149675&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-149675
]
ASF GitHub Bot logged work on BEAM-4496:
----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Sep/18 21:33
Start Date: 29/Sep/18 21:33
Worklog Time Spent: 10m
Work Description: swegner closed pull request #6505: [BEAM-4496] Fix
branch fetch failure on job_PostCommit_Website_Publish
URL: https://github.com/apache/beam/pull/6505
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 7d22492e988..a73628d0184 100644
--- a/website/build.gradle
+++ b/website/build.gradle
@@ -29,6 +29,14 @@ def buildContentDir =
"${project.rootDir}/build/website/generated-content"
def repoContentDir = "${project.rootDir}/website/generated-content"
def commitedChanges = false
+def shell = { cmd ->
+ println cmd
+ exec {
+ executable 'sh'
+ args '-c', cmd
+ }
+}
+
task buildDockerImage(type: Exec) {
inputs.files 'Gemfile', 'Gemfile.lock'
commandLine 'docker', 'build', '-t', dockerImageTag, '.'
@@ -116,7 +124,10 @@ task commitWebsite << {
def git = grgit.open()
// get the latest commit on master
def latestCommit = grgit.log(maxCommits: 1)[0].abbreviatedId
+
+ shell "git fetch origin asf-site"
git.checkout(branch: 'asf-site')
+ shell "git reset --hard origin/asf-site"
// Delete the previous content.
git.remove(patterns: [ 'website/generated-content' ])
@@ -142,7 +153,6 @@ task commitWebsite << {
}
}
-
/*
* Pushes the asf-site branch commits.
*
@@ -166,23 +176,9 @@ task publishWebsite << {
println 'No changes to push'
return
}
- if (!git.remote.list().find { it.name == 'website-publish' }) {
- println "Adding website-publish remote"
- // Cannot authenticate to the default github uri, so specify gitbox.
- git.remote.add(name: 'website-publish',
- url: 'https://gitbox.apache.org/repos/asf/beam.git',
- pushRefSpecs: ['refs/heads/asf-site'])
- }
+
// Because git.push() fails to authenticate, run git push directly.
- exec {
- executable 'sh'
- args '-c', "git push website-publish asf-site"
- }
- // Remove the remote. grgit does not have a remote.remove method.
- exec {
- executable 'sh'
- args '-c', "git remote remove website-publish"
- }
+ shell "git push https://gitbox.apache.org/repos/asf/beam.git asf-site"
}
commitWebsite.dependsOn testWebsite
----------------------------------------------------------------
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: 149675)
Time Spent: 20h 20m (was: 20h 10m)
> 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
> Fix For: 2.8.0
>
> Time Spent: 20h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)