You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Shanky Sharma (Jira)" <ji...@apache.org> on 2022/12/02 17:11:00 UTC
[jira] [Comment Edited] (HBASE-22924) GitHUB PR job should use when clause to filter to just PRs.
[ https://issues.apache.org/jira/browse/HBASE-22924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642536#comment-17642536 ]
Shanky Sharma edited comment on HBASE-22924 at 12/2/22 5:10 PM:
----------------------------------------------------------------
[~busbey] [~zhangduo] - I am new to the HBase project and want to understand more about the improvement. Is the idea to add the below block in the [Jenkinsfile_GitHub|https://github.com/apache/hbase/blob/master/dev-support/Jenkinsfile_GitHub#L196] file before the 'yetus jdk8 Hadoop3 checks' stage? Thanks
{code:java}
stage ('precommit-run') {
when
{ changeRequest() }
steps {
echo "Change request found. Full Build will be created"
}
}
{code}
was (Author: JIRAUSER298478):
[~busbey] [~zhangduo] - I am new to the HBase project and want to understand more about the improvement. Is the idea to add the below block in the [Jenkinsfile_GitHub|https://github.com/apache/hbase/blob/master/dev-support/Jenkinsfile_GitHub#L196] file before the 'yetus jdk8 Hadoop3 checks' stage? Thanks
stage ('precommit-run') \{
when { changeRequest() }
steps \{
echo "Change request found. Full Build will be created"
}
}
> GitHUB PR job should use when clause to filter to just PRs.
> -----------------------------------------------------------
>
> Key: HBASE-22924
> URL: https://issues.apache.org/jira/browse/HBASE-22924
> Project: HBase
> Issue Type: Improvement
> Components: build, community
> Reporter: Sean Busbey
> Priority: Minor
> Labels: beginner
>
> Right now the GitHub PR checking job uses a Jenkins environment variable to stop branch builds:
> {code}
> # If CHANGE_URL is set (e.g., Github Branch Source plugin), process it.
> # Otherwise exit, because we don't want HBase to do a
> # full build. We wouldn't normally do this check for smaller
> # projects. :)
> if [[ -z "${CHANGE_URL}" ]]; then
> echo "Full build skipped" > "${WORKSPACE}/${PATCHDIR}/report.html"
> exit 0
> fi
> {code}
> instead we should use a Jenkinsfile {{when}} clause ([ref|https://jenkins.io/doc/book/pipeline/syntax/#when]) and the {{changeRequest()}} filter to say we want to build PRs. Assuming the eventual adaptation of the JIRA precommit job properly sets that it's testing a change this should also help reuse there.
> {code}
> stage ('precommit-run') {
> when { changeRequest() }
> steps {
> ...
> }
> }
> {code}
> it would also be nice to fold things into a single stage so that we skip the yetus checkout when we're not going to run tests.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)