Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dev/run-tests-jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def print_err(msg):
def post_message_to_github(msg, ghprb_pull_id):
print("Attempting to post to Github...")

url = "https://api.github.com/repos/apache/spark/issues/" + ghprb_pull_id + "/comments"
api_url = os.getenv("GITHUB_API_BASE", "https://api.github.com/repos/apache/spark")
url = api_url + "/issues/" + ghprb_pull_id + "/comments"
github_oauth_key = os.environ["GITHUB_OAUTH_KEY"]

posted_message = json.dumps({"body": msg})
Expand Down Expand Up @@ -176,7 +177,8 @@ def main():
build_display_name = os.environ["BUILD_DISPLAY_NAME"]
build_url = os.environ["BUILD_URL"]

commit_url = "https://github.com/apache/spark/commit/" + ghprb_actual_commit
project_url = os.getenv("SPARK_PROJECT_URL", "https://github.com/apache/spark")
commit_url = project_url + "/commit/" + ghprb_actual_commit

# GitHub doesn't auto-link short hashes when submitted via the API, unfortunately. :(
short_commit_hash = ghprb_actual_commit[0:7]
Expand Down
28 changes: 28 additions & 0 deletions docs/building-spark.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,31 @@ For SBT, specify a complete scala version using (e.g. 2.12.6):
./build/sbt -Dscala.version=2.12.6

Otherwise, the sbt-pom-reader plugin will use the `scala.version` specified in the spark-parent pom.

## Running Jenkins tests with enterprise Github
Copy link
Member

@kiszk kiszk Oct 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enterprise Github -> GitHub Enterprise


To run tests with Jenkins:

./dev/run-tests-jenkins

If use an individual repository or an enterprise GitHub, export below environment variables before running above command.
Copy link
Member

@kiszk kiszk Oct 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about an enterprise GitHub -> a repository on GitHub Enterprise?


### Related environment variables

<table class="table">
<tr><th>Variable Name</th><th>Default</th><th>Meaning</th></tr>
<tr>
<td><code>GITHUB_API_BASE</code></td>
<td>https://api.github.com/repos/apache/spark</td>
<td>
The GitHub server API URL. It could be pointed to an enterprise GitHub.
Copy link
Member

@kiszk kiszk Oct 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an enterprise GitHub -> GitHub Enterprise`

</td>
</tr>
<tr>
<td><code>SPARK_PROJECT_URL</code></td>
<td>https://github.com/apache/spark</td>
<td>
The Spark project URL of (enterprise) GitHub.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

</td>
</tr>
</table>