Child pages
  • Phabricator Differential Plugin
Skip to end of metadata
Go to start of metadata

Plugin Information

View Phabricator Differential on the plugin site for more information.

Integrates with Phabricator's Differential and Harbormaster apps

Configuration

Configuration instructions live on GitHub

Changelog

1.9.8 (Unreleased)

  • Abort existing builds when a new build referencing same diff is scheduled (Gautam Korlam)
  • Add a gateway option - used as an override to url in Conduit credentials
  • Add Subversion support (Li-Wen Hsu)

1.9.7 (2016/08/09)

  • Report lint warnings from file (Anup Talwalkar)
  • Add "details" to unit results from "failure" in JUnit files (Haotian Liu)
  • Soften error message on URI artifact to prevent confusion about build failures

1.9.6 (2016/07/17)

  • Fix incorrect line coverage when merging multiple cobertura reports

1.9.5 (2016/05/02)

  • Use filenames to compute set of files to publish line coverage

1.9.4 (2016/04/28)

  • Publish inline coverage data only for changed files in the diff
  • Cleanup coverage files on jenkins master to save disk space

1.9.3 (2016/04/1)

  • Remove deprecated "Build started" comments in favor of Harbormaster

1.9.2 (2016/03/10)

  • Fix Harbormaster coverage filename/path detection for Python's coverage>=4.0.3
  • Add differential variables to environment, display differential summary on build
    summary view
  • Send build URL to Harbormaster when build starts (Chaitanya Pramod)

1.9.1 (2016/01/25)

  • Remove coverage dependency on cobertura build action. Allows Uberalls coverage
    to work when the cobertura plugin is not enabled (for performance
    reasons). (Gautam Korlam)
  • Improve readme (Brody Klapko)
  • Search for coverage files recursively when Cobertura publisher is disabled
    (Gautam Korlam)

1.9.0 (2016/01/19)

  • Add more logging on differential fetch failure
  • Allow user to apply patch with force flag (Chaitanya Pramod)
  • Fix crash when missing cobertura plugin
  • Send Harbormaster status on non-Differential commits

1.8.3 (2015/12/09)

  • JENKINS-31335: Add checkbox to skip git clean step (Alexander Yerenkow)
  • Add option to create branch when applying diff (cellscape)
  • Collapse comment checkboxes when disabled (Gautam Korlam)

1.8.2 (2015/11/01)

  • Fix "comment size" option not being saved
  • Support merging multiple Cobertura coverage files, and fix source root
    detection (Gautam Korlam)

1.8.1 (2015/09/22)

  • Don't require Uberalls to be enabled to post coverage data to Harbormaster
  • Handle UTF-8 strings properly in comment file

1.8.0 (2015/09/09)

  • Qualify log statements with "phabricator:"
  • Send a Harbormaster URI Artifacts for the Jenkins build (Chris Burroughs)
  • Clean up internal Harbormaster API
  • Make the Cobertura plugin an optional dependency (only used for Uberalls)
  • Consistently set defaults for notifiers (Chris Burroughs)
  • Increase unit test coverage to >93%
  • Gracefully ignore missing author names/emails from conduit for summary badge
  • Report Cobertura coverage data to Harbormaster API
  • Add option to preserve formatting in additional comments (Gautam Korlam)
  • Report JUnit/XUnit results to Harbormaster

1.7.2 (2015/08/13)

  • Fix HTML escaping on build summary view (regression from auto-escape in 1.7.1)

1.7.1 (2015/08/13)

  • Fix class loading error in Apache HTTP client
  • Bump minimum required Jenkins version to 1.609.2 (from 1.609) so that class exclusions work for above fix
  • Add escape-by-default to Jelly templates
  • Re-enable Javadoc step

1.7 (2015/08/12)

  • Conduit token and Phabricator URL are now configured via the Credentials plugin
  • Harbormaster messages are now sent over conduit (no more `arc` dependency)
  • Removed deprecated "uber-dot-arcanist" functionality
  • Removed unused JNA and trove4j dependencies
  • Various bugfixes
  • Major refactoring and testing

1.6.1 (2015/06/15)

  • Update wiki path for plugin

1.6 (2015/06/14)

  • Rename plugin from "Phabricator Plugin" to "Phabricator Differential Plugin"
  • Add checkbox to control "Build Started" comments being posted to Phabricator

1.5 (2015/06/09)

  • Handle invalid responses from conduit

23 Comments

  1. Can you elaborate on how to set up the Jenkins bot and on which machine it would go on (Phab instance vs Jenkins Instance) in addition to how to procure the required access token and build the ~/.arcrc? This seems like a crucial step to just overlook. If there's already some convenient documentation for this, I think it would be okay to link to it from here.

    1. Good point, this plugin was originally written assuming that all of the slaves were already configured. I've added/updated the "Configuration" section at the top. Want to take a look and see if that makes sense? Feel free to make edits/suggestions

      1. Didn't quite work. See Github #19

  2. Since I haven't gotten it quite working yet, I don't know the answer to this question, but I thought I'd ask anyway: Do I have to set up a git pull for the Jenkins job, or does the plugin handle the source control for me? 

  3. Thank you for your plugin. I use 1.8.0 for my Jenkins. There is a problem about encoding.

    It cannot surport chinese well. Maybe in ConduitAPIClient.java

              "UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formData);"

    should change to

              "UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formData, "UTF-8");"

    Maybe some environment problems. The hpi which I package cannot use. 

    So, if you have some space time, please fix the problem. Thank you so much.

    1. Thanks for the report. Could you please open up an issue on our GitHub? https://github.com/uber/phabricator-jenkins-plugin/issues/new

      Please include as much detail as possible, e.g. steps to reproduce, any relevant stacktraces. I'll look into it as soon as I understand what's going on.

        1.  E:\workspace\phabricator-jenkins-plugin-utf8-comment\src\test\java\com\uber\jenkins\phabricator\utils\TestUtils.java:0: File does not end with a newline.
          Audit done.
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 10.809 s
          [INFO] Finished at: 2015-09-22T20:36:56+08:00
          [INFO] Final Memory: 29M/262M
          [INFO] ------------------------------------------------------------------------
          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.15:check (validate) on project phabricator-plugin: Failed during checksty
          le execution: There are 73 errors reported by Checkstyle 6.1.1 with config/checkstyle.xml ruleset. -> [Help 1]
          [ERROR]
          [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
          [ERROR] Re-run Maven using the -X switch to enable full debug logging.
          [ERROR]
          [ERROR] For more information about the errors and possible solutions, please read the following articles:
          [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
          I annotate the checkstyle in pom.xml like this:
          <!--<plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-checkstyle-plugin</artifactId>
                  <version>2.15</version>
                  <configuration>
                    <configLocation>config/checkstyle.xml</configLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <suppressionsLocation>config/checkstyle-suppressions.xml</suppressionsLocation>
                    <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
                  </configuration>
                  <executions>
                    <execution>
                      <id>validate</id>
                      <phase>validate</phase>
                      <goals>
                        <goal>check</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>-->
          the "mvn package", but also have an error like this:
          There is also a problem when I git clone the code and "mvn package" :

          E:\workspace\phabricator-jenkins-plugin-utf8-comment\src\test\java\com\uber\jenkins\phabricator\utils\TestUtils.java:0: File does not end with a newline.

          Audit done.

          [INFO] ------------------------------------------------------------------------

          [INFO] BUILD FAILURE

          [INFO] ------------------------------------------------------------------------

          [INFO] Total time: 10.809 s

          [INFO] Finished at: 2015-09-22T20:36:56+08:00

          [INFO] Final Memory: 29M/262M

          [INFO] ------------------------------------------------------------------------

          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.15:check (validate) on project phabricator-plugin: Failed during checksty

          le execution: There are 73 errors reported by Checkstyle 6.1.1 with config/checkstyle.xml ruleset. -> [Help 1]

          [ERROR]

          [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

          [ERROR] Re-run Maven using the -X switch to enable full debug logging.

          [ERROR]

          [ERROR] For more information about the errors and possible solutions, please read the following articles:

          [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

          So I have to annotate the Maven-checkstyle-plugin in pom.xml like this:

          <!--<plugin>

                  <groupId>org.apache.maven.plugins</groupId>

                  <artifactId>maven-checkstyle-plugin</artifactId>

                  <version>2.15</version>

                  <configuration>

                    <configLocation>config/checkstyle.xml</configLocation>

                    <encoding>UTF-8</encoding>

                    <consoleOutput>true</consoleOutput>

                    <failsOnError>true</failsOnError>

                    <includeTestSourceDirectory>true</includeTestSourceDirectory>

                    <suppressionsLocation>config/checkstyle-suppressions.xml</suppressionsLocation>

                    <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>

                  </configuration>

                  <executions>

                    <execution>

                      <id>validate</id>

                      <phase>validate</phase>

                      <goals>

                        <goal>check</goal>

                      </goals>

                    </execution>

                  </executions>

                </plugin>-->

          Then, all will be OK.

  4. Why build of Jenkins trigger by Herald for commit won't push result back to Phabricator?If I add a new Herald for diff, it does send result back to phabricator. Anyone knows? Looking for reply, Thanks.

    build console output:Building in workspace /var/lib/jenkins/jobs/hello-world/workspace
    > git rev-parse --is-inside-work-tree # timeout=10
    Fetching changes from the remote Git repository
    > git config remote.origin.url ssh://git@10.60.1.147/diffusion/A/hello-world.git # timeout=10
    Fetching upstream changes from ssh://git@10.60.1.147/diffusion/A/hello-world.git
    > git --version # timeout=10
    > git fetch --tags --progress ssh://git@10.60.1.147/diffusion/A/hello-world.git +refs/heads/:refs/remotes/origin/
    > git rev-parse refs/remotes/origin/master^

    Unknown macro: {commit}
    1. timeout=10
      > git rev-parse refs/remotes/origin/origin/master^

    # timeout=10
    Checking out Revision ea3952c9116b45d208eed73d7afd2cacb6164224 (refs/remotes/origin/master)
    > git config core.sparsecheckout # timeout=10
    > git checkout -f ea3952c9116b45d208eed73d7afd2cacb6164224
    > git rev-list b0067a83c9062ea9b427f7cf7b6ad34376dc83d3 # timeout=10
    [workspace] $ /bin/sh -xe /tmp/hudson2176321327283632278.sh
    + sh ./build.sh
    + ./hello.out
    Hello world from c
    run sh ./build.shherald rule for diff+ java hello
    Hello world from java
    [phabricator:uberalls] No cobertura results found
    [phabricator:non\-differential] Coverage result not found. Ignoring build.
    Finished: SUCCESS

    1. What does your herald rule look like? Are you passing a DIFF_ID and PHID parameter?

      1. I add a global herald rule trigger for commits,when repository if hello-world, we run build plan "build hello world". In this build plan, there is only one build step which post a http request to jenkins. I did pass a DIFF_ID and PHID parameter.
        Jenkins ver. 1.625.1
        Phabricator Differential Plugin 1.8.1
        Thanks sincerely.

        1. I just released version 1.9.0 of the plugin, which includes support for diffusion/commits as well as differentials.

  5. Phabricator – Jenkins integration issue:
    First a little background, we have not been able to successfully integrate Phabricator with Jenkins. Jenkins has been installed with the Phabricator Differential Plugin, version 1.9.1, installed. There is a test repository on Phabricator, but we have been unable to get a copy of it on the Jenkins server.
    • We configured a parameterized build and tried to kick it off manually, both from Jenkins and Phabricator.
    o It appears the plugin is getting stymied by the self-signed certificate despite the certificate being saved on the server as the custom.pem file, and the skip-certificate check plug-in installed and enabled.
    • Trying to kick off a “Make HTTP Request” in Harbormaster (Phabricator).
    o When I follow the instructions provided here: https://github.com/uber/phabricator-jenkins-plugin the build fails immediately because of the URI format.
    o When I use the URI format found in: http://www.guywarner.com/2014/05/integrating-jenkins-and-phabricator.html, the build works, but the status always stay at “Waiting for Message.”
    o In Jenkins, when I kick off a build in the corresponding job, it fails. It fails with the Console Output of:
    Building in workspace /var/lib/jenkins/jobs/DansItem/workspace
    FATAL: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1916)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1472)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:849)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1035)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    at com.uber.jenkins.phabricator.conduit.ConduitAPIClient.perform(ConduitAPIClient.java:71)
    at com.uber.jenkins.phabricator.conduit.DifferentialClient.callConduit(DifferentialClient.java:133)
    at com.uber.jenkins.phabricator.conduit.DifferentialClient.fetchDiff(DifferentialClient.java:72)
    at com.uber.jenkins.phabricator.PhabricatorBuildWrapper.setUp(PhabricatorBuildWrapper.java:99)
    at hudson.model.Build$BuildExecution.doRun(Build.java:156)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
    at hudson.model.Run.execute(Run.java:1738)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
    at sun.security.validator.Validator.validate(Validator.java:260)
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1454)
    ... 29 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196)
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268)
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
    ... 35 more
    Performing Post build task...
    Match found for : : True
    Logical operation result is TRUE
    Skipping post build task 0 - job status is worse than unstable : FAILURE
    ERROR: Step ‘Post to Phabricator’ aborted due to exception:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1916)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1472)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:849)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1035)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    at com.uber.jenkins.phabricator.conduit.ConduitAPIClient.perform(ConduitAPIClient.java:71)
    at com.uber.jenkins.phabricator.conduit.DifferentialClient.callConduit(DifferentialClient.java:133)
    at com.uber.jenkins.phabricator.conduit.DifferentialClient.fetchDiff(DifferentialClient.java:72)
    at com.uber.jenkins.phabricator.PhabricatorNotifier.perform(PhabricatorNotifier.java:158)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
    at hudson.model.Build$BuildExecution.post2(Build.java:185)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
    at hudson.model.Run.execute(Run.java:1763)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
    at sun.security.validator.Validator.validate(Validator.java:260)
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1454)
    ... 32 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196)
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268)
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
    ... 38 more
    Finished: FAILURE

    1. It sounds like the SSL certificate presented by your Phabricator install isn't verifiable by the JRE.

      Could you please file an issue at github.com/uber/phabricator-jenkins-plugin/issues and I can work on troubleshooting with you?

      I've seen issues with Java 1.6 and SNI, as well as LetsEncrypt certificates. If it's neither of those, it's possible there is a bug we can fix in the plugin, but it's likely at the JRE level.

  6. I have Phabricator and Jenkins integrated. It is a parameterized build. The build is manually triggered in Phabricator. Whenever I set the post build actions to archive the artifacts, the build fails saying that artifact does not exist. I am trying to kick off a build of some Java code; simple "Hello World" stuff. I'm just trying to get Jenkins and Phabricator configured correctly. I followed the directions from the Phabricator-differential plug-in Jenkins wikie page: github.com/uber/phabricator-jenkins-plugin.

    However, when I kick off a parameterized build in either Phabricator or Jenkins, there are no results. My goal is for Jenkins to generate .jar files as artifacts after I kick off a build of Java code. I did try to configure Jenkins with post-build actions to "archive the artifacts." That however causes the builds to fail because there are no artifacts. I am doing a parameterized build. The builds pass, but nothing is generated. The build executes successfully, but as I understand it there should be something generated as a result of that build (jars/wars). My issue is that is not happening at all. As I understand it, Jenkins should generate some artifact after a successful build. However, there are no artifacts showing up in Jenkins

    In Jenkins, the build output is:
    `Building in workspace /var/lib/jenkins/jobs/DansItem/workspace
    ignore-build No differential ID found.
    plugin-provider 'cobertura' plugin not installed.
    non-differential-harbormaster Sending diffusion result as: SUCCESS
    Finished: SUCCESS
    `

    There is nothing in the workspace for that build. Looking at Jenkins documentation, building Java code should result in some .jar .war files. My Jenkins build creates nothing. In Phabricator, there is an artifact tab, that is just a link back to Jenkins.

    I have tried setting the post build actions to archive the artifacts, but whenever I set a post build action, the build fails. I have tried just setting a single wildcard (star) character, and the job fails saying there are no artifacts found. The build fails regardless of what I set the files to archive in the post build actions.

    1. This is the same conversation we were having in GitHub issues, right? If jenkins isn't building you a jar (and your workspace is empty) then it has nothing to do with Phabricator. Are there *zero* files in your workspace? Did you tell it to check out your source repo from git? What is your build command? You have to tell jenkins how to build your project.

      1. Yes, this is the same conversation. I'm sorry, but I have a few weeks experience in Jenkins. The only direction I could find was: github.com/uber/phabricator-jenkins-plugin. I followed those instructions in configuring the Jenkins build.

        There are zero files in my workspace. In Jenkins build configuration, source code management is set to None. I tried to set it to the git repo from Phabricator, and it said, "Failed to connect to repository : Command "/usr/bin/git -c core.askpass=true ls-remote -h" Returned status code 128.

        I don't see where one can set a build command.

        1. You need to configure git credentials for jenkins to be able to pull from phabricator. Check out the instructions on the "git plugin" wiki. You'll probably want to create an SSH key in phabricator for Jenkins to be able to use. Depends on if you're using hosted Phabricator or sideband/imported repos.

  7. I am attempting to configure a Jenkins build and set the source code management as a git repository. I generated an SSH keypair for the Jenkins bot user. I added the Jenkins user with SSH key and pasted the private key. However, each time I attempt to establish the phabricator repository, I get the error, "Failed to connect to repository : Command "git -c core.askpass=true ls-remote -h"

  8. I have a question about harbormaster. It has no relation to this plugin.

    Originally, we have only hundreds of users and we don't use 'diffusion',

    but our Phabricator has about thousands of users now and we start use 'diffusion'.

    Sometimes, harbormaster is OK, and sometimes, those builds' status of harbormaster always are pending.

    I have to restart the daemon, 'phd'.

    But, sometimes, restarting 'phd' works. Sometimes it doesn't have any effect.

    Did you have this state.

  9. I have tried a different approach with the same results.  I created a keypair on my Jenkins box, and added the SSH username with private key as the credentials on the configure job page.  I get the same error as above, "Failed to connect to repository : Command "git -c core.askpass=true ls-remote -h."

    I tried doing a git clone via the command line on the Jenkins bot.  When I attempted to do a git clone via ssh, I got the error, "ssh: connect to host phab.sitcore.net port 22: Connection refused. fatal: Could not read from remote repository."

    I tried doing a git clone via https, and I get the error, "server certificate verification failed.  CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none."

    1. It sounds like your jenkins server may be getting denied via a firewall? I don't know enough about your network layout, but jenkins needs some way to pull source from your phab install.

  10. So, after generating another SSH key; this time leaving the passphrase blank, and setting the "Path to Git executable" to usr/bin/git instead of the default "git." I was able to successfully kick off a build, and artifacts from the phabricator repository are now showing up. BLUF: Leave the passphrase blank when generating the SSH keys and adding the SSH with private key credentials in Jenkins.