Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Update document to explain how to use with Jenkins #2

Open
KengoTODA opened this issue Feb 20, 2019 · 0 comments
Open

Update document to explain how to use with Jenkins #2

KengoTODA opened this issue Feb 20, 2019 · 0 comments

Comments

@KengoTODA
Copy link
Contributor

In my understanding, we can use following explanation:

Run incremental analysis in Jenkins

If you're using GitHub, use ghprbTargetBranch environment variable generated by GitHub pull request builder plugin:

<profile>
  <id>jenkins-github</id>
  <activation>
    <property>
      <name>env.ghprbTargetBranch</name>
    </property>
  </activation>
  <properties>
    <incremental.spotbugs.target>refs/heads/${env.ghprbTargetBranch}</incremental.spotbugs.target>
  </properties>
</profile>

If you're using GitLab, use gitlabTargetBranch environment variable generated by gitlab-plugin:

<profile>
  <id>jenkins-gitlab</id>
  <activation>
    <property>
      <name>env.gitlabTargetBranch</name>
    </property>
  </activation>
  <properties>
    <incremental.spotbugs.target>refs/heads/${env.gitlabTargetBranch}</incremental.spotbugs.target>
  </properties>
</profile>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant