Re: Accessing PR head commit sha from a pipeline using branch source plugin

2019-07-02 Thread Julien HENRY
Hi Jesse,

Here are 3 PRs to implement the proposed change. I did only Bitbucket so
far, but if you confirm I'm on the good track, I will submit the same for
GitHub (I have the changes locally, just haven't tested end-to-end).
https://github.com/jenkinsci/scm-api-plugin/pull/71
https://github.com/jenkinsci/branch-api-plugin/pull/163
https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/206

I think having a JIRA ticket to refer would be great, should I create one?

I'm open to discussion to improve the code, either on this thread or on PRs
themselves.

++
Julien Henry | SonarSource

Developer
https://sonarsource.com


Le jeu. 13 juin 2019 à 15:44, Jesse Glick  a écrit :

> On Thu, Jun 13, 2019 at 8:53 AM Julien HENRY
>  wrote:
> > the GIT_COMMIT variable […] was not defined out of the box in my tests.
> I had to get it from the return of the checkout step
>
> Yes, each `checkout` step in the build, of which there could be zero
> or more, can return its own metadata.
>
> For a branch project (such as a build of a GH PR),
> `BranchNameContributor` sets build-wide environment variables
> corresponding to the revision associated with the build overall. This
> is what you would get if you `checkout scm`.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-dev/-ojqklsaKbw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2d5Uawmzr-ybfbFjL8jNorY03NZ2Gjc2uoi0YyFxT-Ww%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxG5eSS35n3i96qYoyJ90eY1ETz4T4cXyphGw7OWU5zP6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing PR head commit sha from a pipeline using branch source plugin

2019-06-13 Thread Julien HENRY
Hi Ivan,

Thanks for the notice. Your solution is heavily relying on the presence of
the GIT_COMMIT variable, which was not defined out of the box in my tests.
I had to get it from the return of the checkout step, which is not a good
solution for us, since we want our step to work without asking users to do
extra logic in their pipeline.


Julien Henry | SonarSource

Developer
https://sonarsource.com


Le jeu. 13 juin 2019 à 13:46, Ivan Fernandez Calvo 
a écrit :

> we faced the same problem a few months ago, we've resolved it by adding a
> calculated environment variable for more details see
> https://groups.google.com/forum/#!topic/jenkinsci-dev/Dus0VX6y04g
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-dev/-ojqklsaKbw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/ee8163ba-5f14-48f8-b888-0983d67e22f4%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/ee8163ba-5f14-48f8-b888-0983d67e22f4%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxETk-FSuxLWz_sgrbtJD4MDdOUkLgeS6cHRxH%3De0SDS%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing PR head commit sha from a pipeline using branch source plugin

2019-06-12 Thread Julien HENRY
Hi Jesse,

Our users are strongly asking for a better support of PR status update by 
SonarQube/SonarCloud when build is triggered by Jenkins. We don't like the 
try-fail strategy (trying to annotate current commit, then fallback on 
parent).
Would you be ok to accept a contribution from SonarSource where we would 
add a new env variable (like CHANGE_COMMIT) to expose the PR head commit 
sha to the pipeline? We are interested to support both GitHub and 
Bitbucket, so we would ensure it works at least for those 2 plugins.

++

Julien

Le mercredi 5 juin 2019 18:11:17 UTC+2, Jesse Glick a écrit :
>
> On Wed, Jun 5, 2019 at 11:06 AM Julien HENRY 
> > wrote: 
> > 
> https://github.com/deis/workflow-cli/blob/a285f6914f10ce81d0afe5d53603aa36cda78ccd/Jenkinsfile#L67
>  
>
> That particular implementation is wrong anyway, since the PR head 
> commit might happen to be a merge commit, for example by a developer 
> resolving conflicts with the base branch. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/b5024d40-f47d-4893-b225-4593e984dc00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing PR head commit sha from a pipeline using branch source plugin

2019-06-05 Thread Julien HENRY
FYI, the kind of trick I would like to avoid to maintain is what this 
project is doing:
https://github.com/deis/workflow-cli/blob/a285f6914f10ce81d0afe5d53603aa36cda78ccd/Jenkinsfile#L67


Le mercredi 5 juin 2019 16:03:34 UTC+2, Jesse Glick a écrit :
>
> On Wed, Jun 5, 2019 at 8:21 AM Julien HENRY 
> > wrote: 
> > Since the commit hash we are collecting currently in the pipeline is 
> something transient that doesn't exists on GitHub 
>
> Note that as of JENKINS-43194 it _may_ be visible from GitHub APIs. I 
> would not advise relying on that, though. 
>
> > Jenkins offers multiple PR strategies (with merge or not). So we would 
> have to do some logic to find if current commit is a merge commit 
>
> Well my offhand suggestion was: 
>
> · Try publishing a status for the recorded commit as is. If that worked, 
> great. 
> · If that gave a 422, and the commit was a merge commit, try 
> publishing a status for its parent parent. 
>
> > some users are doing some Git operations in their pipeline. That could 
> affect our heuristic since our scanner may be called after they already 
> manipulated the repo. 
>
> Yes, this is always a risk. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/792283f1-f5d7-4620-9d94-f7536b57d68b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing PR head commit sha from a pipeline using branch source plugin

2019-06-05 Thread Julien HENRY
Hi Jesse,

Publishing of PR status happens on SonarQube server side, asynchronously. 
Since the commit hash we are collecting currently in the pipeline is 
something transient that doesn't exists on GitHub, it is impossible to find 
the parent. We would have to collect the parent in advance directly in the 
scanner/pipeline, running some Git commands. I started to think about it, 
but I see many corner cases.

First issue is that Jenkins offers multiple PR strategies (with merge or 
not). So we would have to do some logic to find if current commit is a 
merge commit, or maybe look directly for symbolic ref 
refs/remotes/origin/${BRANCH_NAME} 
?
Second issue is that I know some users are doing some Git operations in 
their pipeline. That could affect our heuristic since our scanner may be 
called after they already manipulated the repo.

In my opinion it would be much more reliable to have the branch source 
plugin exposing it as an env variable directly. I don't think this is 
something too SonarQube specific, since this commit hash is what is needed 
to report PR status/GitHub check/Bitbucket Code Insight.

@Joseph thanks for the tips, but we would like our scanner to be used in a 
Jenkins pipeline as a "normal" command line tool. So we don't have access 
to Jenkins API, only to the job env variables, and possibly doing some Git 
operations.


Le mercredi 5 juin 2019 03:07:31 UTC+2, Jesse Glick a écrit :
>
> On Tue, Jun 4, 2019 at 5:16 PM Julien HENRY 
> > wrote: 
> > Is there any simple way (except some fragile local Git operation) to 
> access the original Git sha1 that triggered the PR build? In my example I 
> need to get ab86fe3afa0b9473ea9da76c87872bf89b9b5f3b 
>
> There is not currently any environmental variable for that purpose 
> that I know of. You can simply try publishing a commit status for the 
> hash you are given, and if that gives a 422 response, try its first 
> parent instead, as I suggested in the thread leading to 
>
> https://jira.sonarsource.com/browse/SONAR-10794 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/df3df1c1-5ff8-4ff7-92c4-ae08fa7ac08e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Accessing PR head commit sha from a pipeline using branch source plugin

2019-06-04 Thread Julien HENRY
Hi,

We are trying to simplify integration of SonarQube with most popular pull
request provider, like GitHub or Bitbucket.
Those ALM usually provide some API to report issues on PR (GitHub checks,
Bitbucket Code Insight, ...). The APIs require to pass the PR HEAD commit
sha1.

We are trying to get this commit ref automatically when the SonarQube
scanner is executed in a Jenkins pipeline. The problem I'm facing is that
Jenkins is creating a local merge of the PR head with the PR base branch,
and the value of GIT_COMMIT is the ref of this local transcient commit,
which is pretty useless for reporting back to the ALM.

Example:

For PR with HEAD at ab86fe3afa0b9473ea9da76c87872bf89b9b5f3b:
[image: image.png]

Using this pipeline:

node {
stage 'Checkout'
def scmVars = checkout scm
def commitHash = scmVars.GIT_COMMIT
println commitHash

}

Produces this log:

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url
https://github.com/henryju/test-jenkins.git # timeout=10
Fetching without tags
Fetching upstream changes from https://github.com/henryju/test-jenkins.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials
 > git fetch --no-tags --force --progress
https://github.com/henryju/test-jenkins.git
+refs/pull/1/head:refs/remotes/origin/PR-1
+refs/heads/master:refs/remotes/origin/master
Merging remotes/origin/master commit
57ff7166357a4939da69bc43db84961536557c21 into PR head commit
ab86fe3afa0b9473ea9da76c87872bf89b9b5f3b
 > git config core.sparsecheckout # timeout=10
 > git checkout -f ab86fe3afa0b9473ea9da76c87872bf89b9b5f3b
 > git merge 57ff7166357a4939da69bc43db84961536557c21 # timeout=10
 > git rev-parse HEAD^{commit} # timeout=10
Merge succeeded, producing 6a95262014cca41cf11e810401bd5c1bc0954515
Checking out Revision 6a95262014cca41cf11e810401bd5c1bc0954515 (PR-1)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 6a95262014cca41cf11e810401bd5c1bc0954515
Commit message: "Merge commit
'57ff7166357a4939da69bc43db84961536557c21' into HEAD"
 > git rev-list --no-walk ab86fe3afa0b9473ea9da76c87872bf89b9b5f3b # timeout=10



GIT_COMMIT will return 6a95262014cca41cf11e810401bd5c1bc0954515 while this
is useless for reporting issues in GitHub. Is there any simple way (except
some fragile local Git operation) to access the original Git sha1 that
triggered the PR build? In my example I need to get
ab86fe3afa0b9473ea9da76c87872bf89b9b5f3b

Note that I have the same need with the Bitbucket Branch Source Plugin.

Thanks,

Julien Henry | SonarSource

Developer
https://sonarsource.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxE5J9JN5H%2BToScP-vjudgoj3B59sRn07SrQtvr4uOiy3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: acceptance-test-harness questions

2019-03-20 Thread Julien HENRY
Hi Olivier,

Any suggestion on how to achieve this? Basically I would like to take a
copy of the update center corresponding to the oldest version of Jenkins we
support, and use it in our ITs. This page
<https://github.com/jenkinsci/acceptance-test-harness/blob/master/docs/SUT-VERSIONS.md>
give several ways to control plugin versions, but I haven't found a way to
point the update center to a local json file for example.

Julien Henry | SonarSource

Developer
https://sonarsource.com


Le mar. 19 mars 2019 à 19:20, Oliver Gondža  a écrit :

> On 19/03/2019 17.26, Julien HENRY wrote:
> > My tests are green when executed with Jenkins 2.164.1! That's already
> > great news, thanks for your help.
> >
> > But with the oldest Jenkins version we are supporting (2.89.4), all
> > pipeline related tests are failing. I wonder if this could be an issue
> > with the update center.
>
> Quite likely, see[1] to check for which LTS lines we still distribute
> update centers. 2.89 is the latest we have dropped the UC for to this
> day. The infra falls back to UC for latest weekly and it is not able to
> satisfy plugin dependencies given the ancient core.
>
> You might want to setup and maintain you own UC for releases you support
> to prevent this from happening (as upstream UCs are rotated
> (a)periodically) if you have not already.
>
> [1] https://updates.jenkins-ci.org/
>
> > @WithPlugins("workflow-aggregator")
> >
> > In logs, I can see:
> >
> > *16:27:41* INFO: workflow-aggregator is not installed
> >
> > [...]
> >
> > *16:27:41* Mar 19, 2019 4:27:41 PM
> org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1 installPlugins
> > *16:27:41* INFO: Installing plugins for test: [workflow-aggregator,
> sonar, filesystem_scm, plain-credentials]
> >
> > [...]
> >
> > *16:28:27* master57755|INFO: Adding dependent install of
> pipeline-model-definition for plugin workflow-aggregator
> >
> > [...]
> >
> > *16:28:27* master57755|INFO: Adding dependent install of
> workflow-cps-global-lib for plugin pipeline-model-definition
> >
> > [...]
> >
> > *16:28:35* master57755|INFO: Starting the installation of Pipeline:
> Shared Groovy Libraries on behalf of anonymous
> > *16:28:35* Mar 19, 2019 4:28:35 PM
> org.jenkinsci.test.acceptance.update_center.MockUpdateCenter
> lambda$ensureRunning$3
> > *16:28:35* INFO: serving
> /home/ssjenka/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-cps-global-lib/2.13/workflow-cps-global-lib-2.13.hpi
> > *16:28:36* master57755|Mar 19, 2019 4:28:35 PM
> hudson.model.UpdateCenter$UpdateCenterConfiguration download
> > *16:28:36* master57755|INFO: Downloading Pipeline: Shared Groovy
> Libraries
> > *16:28:36* master57755|Mar 19, 2019 4:28:35 PM hudson.PluginManager
> dynamicLoad
> > *16:28:36* master57755|INFO: Attempting to dynamic load
> /home/ssjenka/cix/workspace/sonar-scanner-jenkins-qa/4adbdb2c/its/target/jenkins1486774028372987495home/plugins/workflow-cps-global-lib.jpi
> > *16:28:36* master57755|Mar 19, 2019 4:28:36 PM
> hudson.model.UpdateCenter$DownloadJob run
> > *16:28:36* master57755|SEVERE: Failed to install Pipeline: Shared Groovy
> Libraries
> > *16:28:36* master57755|java.io.IOException: Failed to dynamically
> deploy this plugin
> > *16:28:36* master57755|   at
> hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1893)
> > *16:28:36* master57755|   at
> hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1651)
> > *16:28:36* master57755|   at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> > *16:28:36* master57755|   at
> java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > *16:28:36* master57755|   at
> hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
> > *16:28:36* master57755|   at java.lang.Thread.run(Thread.java:748)
> > *16:28:36* master57755|Caused by: java.io.IOException: Failed to install
> workflow-cps-global-lib plugin
> > *16:28:36* master57755|   at
> hudson.PluginManager.dynamicLoad(PluginManager.java:882)
> > *16:28:36* master57755|   at
> hudson.PluginManager.dynamicLoad(PluginManager.java:821)
> > *16:28:36* master57755|   at
> hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1889)
> > *16:28:36* master57755|   ... 5 more
> > *16:28:36* master57755|Caused by: java.io.IOException: Pipeline: Shared
> Groovy Libraries v2.13 failed to load.
> > *16:28:36* master57755| - You must update Jenkins from v2.89.4 to
> v2.107.3 or later to run this plugin.
> > *16:28:36* master57755|   at

Re: acceptance-test-harness questions

2019-03-17 Thread Julien HENRY
Hi Olivier,

I opened a PR:
https://github.com/jenkinsci/acceptance-test-harness/pull/492

Regarding tools:

> They ware checked in in order to speed things up and IIRC prevent a race
> condition of attempting to configure those tools in test before the
> updates are fetched. It is hackish as hell but I suspect it will be
> quite elaborate to get rid of that. Feel free to just check in a newer
> version to keep you going.


I'm really surprised some existing acceptance tests but ours are depending
on installing the SonarScanner. Would it be possible to submit a PR
removing the file, and see what happen? Is the full test suite executed on
PRs?

Another issues I faced: it seems the code to configure tools isn't generic
enough to support adding more than one tool version. This is because in
"recent" Jenkins releases, tool area is collapsed as soon as there is a
first entry, so the "Add" button is not visible until you expand. I opened
a PR:
https://github.com/jenkinsci/acceptance-test-harness/pull/493

Julien Henry | SonarSource

Developer
https://sonarsource.com


Le lun. 11 mars 2019 à 14:43, Oliver Gondža  a écrit :

> On 07/03/2019 22.46, Julien HENRY wrote:
> > Hi folks,
>
> Hey, I am sorry to hear you have come such a long way without
> discovering what is already available. (my replies inline)
>
> > In the SonarQube plugin
> > <https://github.com/SonarSource/sonar-scanner-jenkins>, we have
> > developed our own WebDriver based framework
> > <
> https://github.com/SonarSource/sonar-scanner-jenkins/blob/sonar-2.8.1/its/src/test/java/com/sonar/it/jenkins/orchestrator/JenkinsOrchestrator.java>
>
> > to test our plugin, including many Jenkins UI utility methods (create
> > job, configure tools, ...). I discovered only "recently" the official
> > acceptance-test-harness
> > <https://github.com/jenkinsci/acceptance-test-harness> project that
> > seems to aim at the same goal. Maybe it was not existing when we started
> > writing ITs but that's not important.
> >
> > Today I would like to drop our own code, and use the common
> > acceptance-test-harness, in order to save us some efforts, but I'm also
> > ready to contribute. I have started migrating our test suites but so far
> > I faced two issues:
> >
> > 1) location of the gecko driver
> >
> > On my box, this code
> > <
> https://github.com/jenkinsci/acceptance-test-harness/blob/0973fb5d80f9936e32bdd2387eeeacf2096e4331/src/main/java/org/jenkinsci/test/acceptance/FallbackConfig.java#L168>
>
> > looks wrong, since it ends up configuring gecko driver property to:
> > which: no geckodriver in ()
> >
> > Also I tried to force manually the path using the property
> > -Dwebdriver.gecko.driver=xxx but it doesn't work, since the same code
> > always override the property, without checking first if it was already
> > defined. To me it seems the code only work when geckodriver *is* in the
> > PATH.
>
> Yeah, it appears to be an expectation in the code, but keeping the
> property if configured makes sense to me. Please, file that PR.
>
> > 2) SonarQube Scanner tool automatic installer returns outdated entries
> >
> > My test was failing because it was not able to configure a SonarQube
> > Scanner tool. After debugging, I was surprised to discover that the
> > installer metadata are already cached
> > <
> https://github.com/jenkinsci/acceptance-test-harness/blob/master/src/main/tool_installers/updates/hudson.plugins.sonar.SonarRunnerInstaller>
>
> > when the JUT starts (and uses a very old copy). So the real update
> > center
> > <
> https://updates.jenkins.io/updates/hudson.plugins.sonar.SonarRunnerInstaller.json>
>
> > is never called.
> >
> > Is there any reason to have
> > this hudson.plugins.sonar.SonarRunnerInstaller file in the
> > acceptance-test-harness distribution? Can I simply open a PR to remove
> > it, or is there a good reason to keep it?
>
> They ware checked in in order to speed things up and IIRC prevent a race
> condition of attempting to configure those tools in test before the
> updates are fetched. It is hackish as hell but I suspect it will be
> quite elaborate to get rid of that. Feel free to just check in a newer
> version to keep you going.
>
> --
> oliver
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-dev/BNuQMy3lsFY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-dev+unsubscr...@googl

acceptance-test-harness questions

2019-03-07 Thread Julien HENRY
Hi folks,

In the SonarQube plugin 
, we have developed 
our own WebDriver based framework 

 
to test our plugin, including many Jenkins UI utility methods (create job, 
configure tools, ...). I discovered only "recently" the official 
acceptance-test-harness 
 project that seems 
to aim at the same goal. Maybe it was not existing when we started writing 
ITs but that's not important.

Today I would like to drop our own code, and use the common 
acceptance-test-harness, in order to save us some efforts, but I'm also 
ready to contribute. I have started migrating our test suites but so far I 
faced two issues:

1) location of the gecko driver

On my box, this code 

 
looks wrong, since it ends up configuring gecko driver property to:
which: no geckodriver in ()

Also I tried to force manually the path using the property 
-Dwebdriver.gecko.driver=xxx but it doesn't work, since the same code 
always override the property, without checking first if it was already 
defined. To me it seems the code only work when geckodriver *is* in the 
PATH.

I will try to submit a PR with some improvements, except if you told me I 
missed something.


2) SonarQube Scanner tool automatic installer returns outdated entries

My test was failing because it was not able to configure a SonarQube 
Scanner tool. After debugging, I was surprised to discover that the 
installer metadata are already cached 

 
when the JUT starts (and uses a very old copy). So the real update center 

 
is never called.

Is there any reason to have this hudson.plugins.sonar.SonarRunnerInstaller 
file in the acceptance-test-harness distribution? Can I simply open a PR to 
remove it, or is there a good reason to keep it?


Thanks for any insight

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/9812d38a-495d-4a1a-99e5-160e4137853a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Startup deadlock when using a GlobalConfiguration + Initializer < JOB_LOADED

2018-04-10 Thread Julien HENRY
Hi,

Our plugin uses a GlobalConfiguration extension, and to migrate old data, 
we added an Initializer.

Following the javadoc 

 
of Initializer, I set after=PLUGINS_PREPARED

@Extension
public class MyGlobalConfiguration extends GlobalConfiguration {

  public MyGlobalConfiguration() {
load();
  }

  @Initializer(after = InitMilestone.PLUGINS_PREPARED)
  public void migrateData() {
// ...
  }

}

But this lead to a startup deadlock.

"GitSCM.onLoaded":
 waiting for ownable synchronizer 0x85777f80, (a 
java/util/concurrent/locks/ReentrantLock$NonfairSync),
 which is held by "MyGlobalConfiguration.migrateData"
"MyGlobalConfiguration.migrateData":
  waiting to lock Monitor@0x7f9ef0282808 (Object@0x84f2b888, a 
hudson/ExtensionList$Lock),
  which is held by "GitSCM.onLoaded"

Seems that the OldDataMonitor is somehow involed in the deadlock (see stack 
traces).

After spending a lot of time on it, I found the solution in the logstash 

 
plugin: change the Initializer to after=JOB_LOADED

Could it be possible to improve the situation, by at least completing the 
Javadoc, or maybe detecting and failing fast when a GlobalConfiguration 
tries to use an Initializer earlier than JOB_LOADED ?

Thread 5233: (state = BLOCKED)
 - hudson.ExtensionList.ensureLoaded() @bci=40, line=303 (Interpreted frame)
 - hudson.ExtensionList.iterator() @bci=6, line=158 (Interpreted frame)
 - jenkins.model.Jenkins.getAdministrativeMonitor(java.lang.String) @bci=4, 
line=2109 (Interpreted frame)
 - hudson.diagnosis.OldDataMonitor.get(jenkins.model.Jenkins) @bci=3, 
line=82 (Interpreted frame)
 - hudson.diagnosis.OldDataMonitor.report(hudson.model.Saveable, 
java.util.Collection) @bci=196, line=217 (Interpreted frame)
 - hudson.util.RobustReflectionConverter.doUnmarshal(java.lang.Object, 
com.thoughtworks.xstream.io.HierarchicalStreamReader, 
com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=734, 
line=371 (Interpreted frame)
 - 
hudson.util.RobustReflectionConverter.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader,
 
com.thoughtworks.xstream.converters.UnmarshallingContext) @bci=11, line=270 
(Interpreted frame)
 - com.thoughtworks.xstream.core.TreeUnmarshaller.convert(java.lang.Object, 
java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=15, 
line=72 (Interpreted frame)
 - 
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(java.lang.Object,
 
java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=175, 
line=65 (Interpreted frame)
 - 
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang.Object, 
java.lang.Class, com.thoughtworks.xstream.converters.Converter) @bci=82, 
line=66 (Interpreted frame)
 - 
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(java.lang.Object, 
java.lang.Class) @bci=4, line=50 (Interpreted frame)
 - 
com.thoughtworks.xstream.core.TreeUnmarshaller.start(com.thoughtworks.xstream.converters.DataHolder)
 
@bci=20, line=134 (Interpreted frame)
 - 
com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(java.lang.Object,
 
com.thoughtworks.xstream.io.HierarchicalStreamReader, 
com.thoughtworks.xstream.converters.DataHolder, 
com.thoughtworks.xstream.converters.ConverterLookup, 
com.thoughtworks.xstream.mapper.Mapper) @bci=15, line=32 (Interpreted frame)
 - 
com.thoughtworks.xstream.XStream.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader,
 
java.lang.Object, com.thoughtworks.xstream.converters.DataHolder) @bci=15, 
line=1189 (Interpreted frame)
 - 
hudson.util.XStream2.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader,
 
java.lang.Object, com.thoughtworks.xstream.converters.DataHolder, boolean) 
@bci=54, line=160 (Interpreted frame)
 - 
hudson.util.XStream2.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader,
 
java.lang.Object, com.thoughtworks.xstream.converters.DataHolder) @bci=5, 
line=131 (Interpreted frame)
 - 
com.thoughtworks.xstream.XStream.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader,
 
java.lang.Object) @bci=4, line=1173 (Interpreted frame)
 - hudson.XmlFile.unmarshal(java.lang.Object, boolean) @bci=102, line=178 
(Interpreted frame)
 - hudson.XmlFile.unmarshal(java.lang.Object) @bci=3, line=161 (Interpreted 
frame)
 - hudson.model.Descriptor.load() @bci=15, line=893 (Interpreted frame)
 - hudson.plugins.sonar.MyGlobalConfiguration.() @bci=18, line=49 
(Interpreted frame)
 - 
hudson.plugins.sonar.MyGlobalConfiguration$$FastClassByGuice$$9ca8165c.newInstance(int,
 
java.lang.Object[]) @bci=24 (Interpreted frame)
 - 
com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(java.lang.Object[])
 

Re: Nullable single constructor parameter with declarative pipeline

2018-03-19 Thread Julien HENRY
I watched the ticket, thanks!

Le lundi 19 mars 2018 12:51:13 UTC+1, Andrew Bayer a écrit :
>
> So, there is a ticket for this in Declarative - 
> https://issues.jenkins-ci.org/browse/JENKINS-42772 - but I have yet to be 
> happy with a solution. I can’t, so far as I’m aware, check the 
> DescribableModel for the class in question, and see it’s got a sole 
> required argument *and* see that it could be null. Is annoying.
>
> The reason for this use case, btw, is so you can call step(“foo”) without 
> naming the parameter - that only works with a @DataBoundConstructor.
>
> A.
>
> On Mon, Mar 19, 2018 at 7:16 AM Baptiste Mathus <m...@batmat.net 
> > wrote:
>
>> Though it's possibly a bug, why use @DataBoundConstructor instead of 
>> @DataBoundSetter? I generally use the constructor for required params, and 
>> setters for optional ones.
>>
>> 2018-03-19 11:48 GMT+01:00 Julien HENRY <julien...@sonarsource.com 
>> >:
>>
>>> Hi folks,
>>>
>>> Our SonarQube plugin has a build step that contains a "single nullable 
>>> parameter":
>>>
>>> @DataBoundConstructor
>>> public OurStep(@Nullable String param) {
>>>   //
>>> }
>>>
>>> This allows users to use one of the two syntaxes in their scripted 
>>> pipelines:
>>>
>>> ourStep {
>>> }
>>>
>>> or
>>>
>>> ourStep('value') {
>>> }
>>>
>>> With declarative pipeline, it doesn't seem to work the same way. Trying 
>>> to use
>>>
>>> ourStep {
>>> }
>>>
>>> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
>>> failed:
>>> WorkflowScript: 7: Missing required parameter: "param" @ line 7, column 
>>> 9.
>>>ourStep {
>>>^
>>>
>>> 1 error
>>>
>>> at 
>>> org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
>>> at 
>>> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
>>> at 
>>> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
>>> at 
>>> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
>>> at 
>>> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
>>> at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
>>> at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
>>> at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
>>> at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:133)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:557)
>>> at 
>>> org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:518)
>>> at 
>>> org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:290)
>>> at hudson.model.ResourceController.execute(ResourceController.java:97)
>>> at hudson.model.Executor.run(Executor.java:429)
>>>
>>>
>>> Is there a way to have a similar behavior, or is it definitely something 
>>> forbidden in the declarative pipeline?
>>>
>>> Thanks,
>>>
>>> Julien Henry | SonarSource
>>>
>>> Developer
>>> https://sonarsource.com
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-de...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxEyhW9%2B1txF-MgvbX35Bs5y4J906W7rDyo6OYn0kbYV8Q%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxEyhW9%2B1txF-MgvbX35Bs5y4J906W7rDyo6OYn0kbYV8Q%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-de...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-dev/CANWgJS7ytEyvQdhHXt7-kxqfxRqOm7W2YnV%3DW6%2BnM9gywAcfEw%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-dev/CANWgJS7ytEyvQdhHXt7-kxqfxRqOm7W2YnV%3DW6%2BnM9gywAcfEw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/f3b4befc-9fc9-47cd-86b3-15d101e8261b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Nullable single constructor parameter with declarative pipeline

2018-03-19 Thread Julien HENRY
Hi folks,

Our SonarQube plugin has a build step that contains a "single nullable
parameter":

@DataBoundConstructor
public OurStep(@Nullable String param) {
  //
}

This allows users to use one of the two syntaxes in their scripted
pipelines:

ourStep {
}

or

ourStep('value') {
}

With declarative pipeline, it doesn't seem to work the same way. Trying to
use

ourStep {
}

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed:
WorkflowScript: 7: Missing required parameter: "param" @ line 7, column 9.
   ourStep {
   ^

1 error

at
org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
at
org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
at
org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
at
org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
at
org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:133)
at
org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
at
org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:557)
at
org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:518)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:290)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)


Is there a way to have a similar behavior, or is it definitely something
forbidden in the declarative pipeline?

Thanks,

Julien Henry | SonarSource

Developer
https://sonarsource.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxEyhW9%2B1txF-MgvbX35Bs5y4J906W7rDyo6OYn0kbYV8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is UnprotectedRootAction broken?

2017-06-08 Thread Julien HENRY
Hi Oleg,

We do have non regression tests, using Webdriver. They were developed few
years ago, so we are not using Jenkins ATH, but that sound interesting to
consider moving to it, just to share the effort.
https://github.com/SonarSource/sonar-scanner-jenkins/blob/master/its/src/test/java/com/sonar/it/jenkins/orchestrator/JenkinsOrchestrator.java

We even have a ticket for that in our backlog ;)
https://jira.sonarsource.com/browse/SONARJNKNS-268

++

Julien

Julien Henry | SonarSource

Developer
http://sonarsource.com

2017-06-08 10:42 GMT+02:00 Oleg Nenashev <o.v.nenas...@gmail.com>:

> No problem, it happens.
> You may want to create a Jenkins ATH
> <https://github.com/jenkinsci/acceptance-test-harness/> test to be sure
> that Jenkins changes do not break your plugin logic.
>
> BR, Oleg
>
> среда, 7 июня 2017 г., 18:49:19 UTC+2 пользователь Arvid Huss написал:
>>
>> Hi,
>>
>> Sorry for the disturbance. It was entirely my fault, the webhook stoped
>> working due to me misspelling the webhook URL.
>>
>> Sorry for any inconvenience.
>> Arvid
>>
>>
>> ons 7 juni 2017 kl 14:51 skrev Julien HENRY <julien...@sonarsource.com>:
>>
>>>
>>>
>>> Le mardi 6 juin 2017 21:56:33 UTC+2, Jesse Glick a écrit :
>>>
>>>> On Tue, Jun 6, 2017 at 1:27 PM, Arvid Huss <arvid...@jayway.com>
>>>> wrote:
>>>> > I have already been in contact with the plugin developer and he
>>>> refered me
>>>> > to jenkins-dev mailing list.
>>>>
>>>> Well they will need to do some more evaluation on their end.
>>>>
>>>
>>> Hi guys,
>>>
>>> I'm sorry if I missed something obvious, this is not my intention to
>>> pass the buck, but the documentation
>>> <https://wiki.jenkins-ci.org/display/JENKINS/Action+and+its+family+of+subtypes>
>>> says:
>>>
>>>> There's a variant of this called UnprotectedRootAction
>>>> <http://javadoc.jenkins-ci.org/byShortName/UnprotectedRootAction> that
>>>> is made accessible even to anonymous users without the read access to
>>>> Jenkins.
>>>
>>> Also we are doing a very similar implementation than what the Jenkins
>>> GitHub plugin does. Finally I made a simple test (run Jenkins 2.64, enable
>>> security, disable anonymous read) and everything looks fine.
>>>
>>> So if on Jenkins side you confirm there is no regression, my last guess
>>> for this 403 error would be that there is an issue on your side Arvid.
>>> Maybe you could try to temporarily enable anonymous read to see if that
>>> bring back access to the /sonarqube-webhook/ URL. Also you can try
>>> to access your Jenkins server without using the proxy (just to eliminate it
>>> from the equation).
>>>
>>> ++
>>>
>>> Julien
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Jenkins Developers" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/jenkinsci-dev/Vsa8f9r6mak/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> jenkinsci-de...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jenkinsci-dev/f4aec9f4-4f08-41b5-8bfe-9d124b6d944a%40goo
>>> glegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-dev/f4aec9f4-4f08-41b5-8bfe-9d124b6d944a%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-dev/Vsa8f9r6mak/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/d61d56cf-7f20-4fca-9a46-34ac53e67742%
> 40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/d61d56cf-7f20-4fca-9a46-34ac53e67742%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxHPwstOyYLv7Nfp%2B5eYMJ_oipQsrd7MqX3Wr8JrMy3PeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is UnprotectedRootAction broken?

2017-06-07 Thread Julien HENRY


Le mardi 6 juin 2017 21:56:33 UTC+2, Jesse Glick a écrit :
>
> On Tue, Jun 6, 2017 at 1:27 PM, Arvid Huss  > wrote: 
> > I have already been in contact with the plugin developer and he refered 
> me 
> > to jenkins-dev mailing list. 
>
> Well they will need to do some more evaluation on their end. 
>

Hi guys,

I'm sorry if I missed something obvious, this is not my intention to pass 
the buck, but the documentation 
 
says:

> There's a variant of this called UnprotectedRootAction 
>  that is 
> made accessible even to anonymous users without the read access to Jenkins.

Also we are doing a very similar implementation than what the Jenkins 
GitHub plugin does. Finally I made a simple test (run Jenkins 2.64, enable 
security, disable anonymous read) and everything looks fine.

So if on Jenkins side you confirm there is no regression, my last guess for 
this 403 error would be that there is an issue on your side Arvid. Maybe 
you could try to temporarily enable anonymous read to see if that bring 
back access to the /sonarqube-webhook/ URL. Also you can try to 
access your Jenkins server without using the proxy (just to eliminate it 
from the equation).

++

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/f4aec9f4-4f08-41b5-8bfe-9d124b6d944a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Update SonarQube crawler

2017-03-30 Thread Julien HENRY
Hi guys,

I have submitted an update for the SonarQube crawler:
https://github.com/jenkinsci/backend-crawler/pull/56

Could someone have a look and merge please?

Thanks

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxFc4WTuBQhvbJ6v4FJH9-TQ5PAkJwYydJ7dzLL439cVeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-23 Thread Julien HENRY
Thanks Idan, we'll release 2.6.1.

2017-03-22 16:22 GMT+01:00 Idan Adar <i...@adar.me>:

> I can confirm that in my case the updated plug-in now works!
>
>
> On Wednesday, March 22, 2017 at 4:53:16 PM UTC+2, Julien HENRY wrote:
>>
>> Here is a release candidate fixing the issue with master/slave behavior:
>> https://repox.sonarsource.com/sonarsource-public-builds/org/
>> jenkins-ci/plugins/sonar/2.6.1.1212/sonar-2.6.1.1212.hpi
>>
>> Could you please test it and confirm that it solves your problems?
>>
>> Thanks
>>
>> Julien
>>
>> 2017-03-22 11:19 GMT+01:00 Julien HENRY <julien...@sonarsource.com>:
>>
>>> Guys,
>>>
>>> I was finally able to reproduce. Here is the ticket for details:
>>> https://jira.sonarsource.com/browse/SONARJNKNS-282
>>>
>>> We will release a bugfix quickly for this specific problem.
>>> The issue with Gradle will deserve more thinking and a dedicated sprint.
>>> BTW there is a workaround (--info) so that's not a blocker issue.
>>>
>>> Thanks again for your feedback and help to investigate the issue. I will
>>> probably ask you to test the bugfix version before releasing it.
>>>
>>> ++
>>>
>>> Julien
>>>
>>> 2017-03-22 10:23 GMT+01:00 Idan Adar <id...@adar.me>:
>>>
>>>> To recap,
>>>> I've updated the stage to:
>>>>
>>>> stage ("SonarQube analysis") {
>>>>steps {
>>>>   script {
>>>>  withSonarQubeEnv('SonarQube') {
>>>> sh "../../../sonar-scanner-2.9.0.670/bin/sonar-scanner"
>>>>  }
>>>>
>>>>  def qualitygate = waitForQualityGate()
>>>>  if (qualitygate.status != "OK") {
>>>> error "Pipeline aborted due to quality gate coverage
>>>> failure: ${qualitygate.status}"
>>>>  }
>>>>   }
>>>>}
>>>> }
>>>>
>>>> It might be that doing this in the same stage it not possible?
>>>> This fails with:
>>>>
>>>> java.lang.IllegalStateException: Unable to get SonarQube task id
>>>>> and/or server name. Please use the 'withSonarQubeEnv' wrapper to run your
>>>>> analysis.
>>>>
>>>>
>>>> Under SonarQube servers section in the Jenkins settings I have:
>>>> Name: SonarQube
>>>> Server: http://:9000/sonarqube
>>>>
>>>> In the console log I do see:
>>>>
>>>> INFO: ANALYSIS SUCCESSFUL, you can browse http://
>>>>> :9000/sonarqube/dashboard/index/cert-mgmt-dashboard
>>>>> INFO: Note that you will be able to access the updated dashboard once
>>>>> the server has processed the submitted analysis report
>>>>> INFO: More about the report processing at http://
>>>>> :9000/sonarqube/api/ce/task?id=AVr1S35oyohgD3UCfaIt
>>>>
>>>>
>>>> The second link has this:
>>>>
>>>> {"task":{"organization":"default-organization","id":"AVr1S35
>>>> oyohgD3UCfaIt","type":"REPORT","componentId":"AVrnCD3cyohgD3UCfaG0",
>>>> "componentKey":"","componentName":"","componentQualifier":"TRK"
>>>> ,"analysisId":"AVr1S4EhtEGQbCizBv8A","status":"SUCCESS","submittedAt":
>>>> "2017-03-22T11:14:09+0200","submitterLogin":"","startedAt":
>>>> "2017-03-22T11:14:10+0200","executedAt":"2017-03-22T11:14:11+0200","e
>>>> xecutionTimeMs":473,"logs":false,"hasScannerContext":true}}
>>>>
>>>> What is missing, other than this being run on a slave (the build
>>>> machine used by Jenkins is also the same machine used for the SonarQube
>>>> server)?
>>>>
>>>>
>>>> On Wednesday, March 22, 2017 at 10:57:01 AM UTC+2, Julien HENRY wrote:
>>>>>
>>>>>
>>>>> 2017-03-22 9:42 GMT+01:00 Jan Fabry <jan@thanksys.com>:
>>>>>
>>>>>> (but it's not always clear to me which
>>>>>> ones actually do that, and since which version)
>>>>>>
>>>>&g

Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-22 Thread Julien HENRY
Here is a release candidate fixing the issue with master/slave behavior:
https://repox.sonarsource.com/sonarsource-public-builds/org/jenkins-ci/plugins/sonar/2.6.1.1212/sonar-2.6.1.1212.hpi

Could you please test it and confirm that it solves your problems?

Thanks

Julien

2017-03-22 11:19 GMT+01:00 Julien HENRY <julien.he...@sonarsource.com>:

> Guys,
>
> I was finally able to reproduce. Here is the ticket for details:
> https://jira.sonarsource.com/browse/SONARJNKNS-282
>
> We will release a bugfix quickly for this specific problem.
> The issue with Gradle will deserve more thinking and a dedicated sprint.
> BTW there is a workaround (--info) so that's not a blocker issue.
>
> Thanks again for your feedback and help to investigate the issue. I will
> probably ask you to test the bugfix version before releasing it.
>
> ++
>
> Julien
>
> 2017-03-22 10:23 GMT+01:00 Idan Adar <i...@adar.me>:
>
>> To recap,
>> I've updated the stage to:
>>
>> stage ("SonarQube analysis") {
>>steps {
>>   script {
>>  withSonarQubeEnv('SonarQube') {
>> sh "../../../sonar-scanner-2.9.0.670/bin/sonar-scanner"
>>  }
>>
>>  def qualitygate = waitForQualityGate()
>>  if (qualitygate.status != "OK") {
>> error "Pipeline aborted due to quality gate coverage
>> failure: ${qualitygate.status}"
>>  }
>>   }
>>}
>> }
>>
>> It might be that doing this in the same stage it not possible?
>> This fails with:
>>
>> java.lang.IllegalStateException: Unable to get SonarQube task id and/or
>>> server name. Please use the 'withSonarQubeEnv' wrapper to run your analysis.
>>
>>
>> Under SonarQube servers section in the Jenkins settings I have:
>> Name: SonarQube
>> Server: http://:9000/sonarqube
>>
>> In the console log I do see:
>>
>> INFO: ANALYSIS SUCCESSFUL, you can browse http://:9000/sonarqube/das
>>> hboard/index/cert-mgmt-dashboard
>>> INFO: Note that you will be able to access the updated dashboard once
>>> the server has processed the submitted analysis report
>>> INFO: More about the report processing at http://:9000/sonarqube/api
>>> /ce/task?id=AVr1S35oyohgD3UCfaIt
>>
>>
>> The second link has this:
>>
>> {"task":{"organization":"default-organization","id":"AVr1S35
>> oyohgD3UCfaIt","type":"REPORT","componentId":"AVrnCD3cyohgD3UCfaG0",
>> "componentKey":"","componentName":"","componentQualifier":"TRK",
>> "analysisId":"AVr1S4EhtEGQbCizBv8A","status":"SUCCESS","submittedAt":
>> "2017-03-22T11:14:09+0200","submitterLogin":"","startedAt":"2017-03-
>> 22T11:14:10+0200","executedAt":"2017-03-22T11:14:11+0200","e
>> xecutionTimeMs":473,"logs":false,"hasScannerContext":true}}
>>
>> What is missing, other than this being run on a slave (the build machine
>> used by Jenkins is also the same machine used for the SonarQube server)?
>>
>>
>> On Wednesday, March 22, 2017 at 10:57:01 AM UTC+2, Julien HENRY wrote:
>>>
>>>
>>> 2017-03-22 9:42 GMT+01:00 Jan Fabry <jan@thanksys.com>:
>>>
>>>> (but it's not always clear to me which
>>>> ones actually do that, and since which version)
>>>>
>>>
>>> See: https://docs.sonarqube.org/display/SCAN/Analyzing+with+
>>> SonarQube+Scanner+for+Jenkins#AnalyzingwithSonarQubeScannerf
>>> orJenkins-AnalyzinginaJenkinspipeline
>>>
>>> It should work for:
>>>   - SQ Scanner 2.8+
>>>   - SQ Scanner for Maven 3.1+
>>>   - SQ Scanner for Gradle 2.1+
>>>
>>> It doesn't work currently with the Scanner for MSBuild.
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Jenkins Developers" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/jenkinsci-dev/7so6S2mAhzg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> jenkinsci-dev+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/jenkinsci-dev/9fe415f6-4f2c-435f-b77c-8158082818e5%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/9fe415f6-4f2c-435f-b77c-8158082818e5%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxFOBiq2CFH1GBtd3uhS7rbgW1sqdNQuO7%3DPBvJN%3DHHPeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-22 Thread Julien HENRY
Guys,

I was finally able to reproduce. Here is the ticket for details:
https://jira.sonarsource.com/browse/SONARJNKNS-282

We will release a bugfix quickly for this specific problem.
The issue with Gradle will deserve more thinking and a dedicated sprint.
BTW there is a workaround (--info) so that's not a blocker issue.

Thanks again for your feedback and help to investigate the issue. I will
probably ask you to test the bugfix version before releasing it.

++

Julien

2017-03-22 10:23 GMT+01:00 Idan Adar <i...@adar.me>:

> To recap,
> I've updated the stage to:
>
> stage ("SonarQube analysis") {
>steps {
>   script {
>  withSonarQubeEnv('SonarQube') {
> sh "../../../sonar-scanner-2.9.0.670/bin/sonar-scanner"
>  }
>
>  def qualitygate = waitForQualityGate()
>  if (qualitygate.status != "OK") {
> error "Pipeline aborted due to quality gate coverage failure:
> ${qualitygate.status}"
>  }
>   }
>}
> }
>
> It might be that doing this in the same stage it not possible?
> This fails with:
>
> java.lang.IllegalStateException: Unable to get SonarQube task id and/or
>> server name. Please use the 'withSonarQubeEnv' wrapper to run your analysis.
>
>
> Under SonarQube servers section in the Jenkins settings I have:
> Name: SonarQube
> Server: http://:9000/sonarqube
>
> In the console log I do see:
>
> INFO: ANALYSIS SUCCESSFUL, you can browse http://:9000/sonarqube/
>> dashboard/index/cert-mgmt-dashboard
>> INFO: Note that you will be able to access the updated dashboard once the
>> server has processed the submitted analysis report
>> INFO: More about the report processing at http://:9000/sonarqube/
>> api/ce/task?id=AVr1S35oyohgD3UCfaIt
>
>
> The second link has this:
>
> {"task":{"organization":"default-organization","id":"AVr1S35oyohgD3UCfaIt"
> ,"type":"REPORT","componentId":"AVrnCD3cyohgD3UCfaG0","componentKey":
> "","componentName":"","componentQualifier":"TRK","analysisId":"
> AVr1S4EhtEGQbCizBv8A","status":"SUCCESS","submittedAt":"
> 2017-03-22T11:14:09+0200","submitterLogin":"","startedAt":
> "2017-03-22T11:14:10+0200","executedAt":"2017-03-22T11:14:11+0200","
> executionTimeMs":473,"logs":false,"hasScannerContext":true}}
>
> What is missing, other than this being run on a slave (the build machine
> used by Jenkins is also the same machine used for the SonarQube server)?
>
>
> On Wednesday, March 22, 2017 at 10:57:01 AM UTC+2, Julien HENRY wrote:
>>
>>
>> 2017-03-22 9:42 GMT+01:00 Jan Fabry <jan@thanksys.com>:
>>
>>> (but it's not always clear to me which
>>> ones actually do that, and since which version)
>>>
>>
>> See: https://docs.sonarqube.org/display/SCAN/Analyzing+with+
>> SonarQube+Scanner+for+Jenkins#AnalyzingwithSonarQubeScannerf
>> orJenkins-AnalyzinginaJenkinspipeline
>>
>> It should work for:
>>   - SQ Scanner 2.8+
>>   - SQ Scanner for Maven 3.1+
>>   - SQ Scanner for Gradle 2.1+
>>
>> It doesn't work currently with the Scanner for MSBuild.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-dev/7so6S2mAhzg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/9fe415f6-4f2c-435f-b77c-8158082818e5%
> 40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/9fe415f6-4f2c-435f-b77c-8158082818e5%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxG9u3_iCFtWmLQX%2BL3nLx2m8A8YJ98hMtrVwU-oM2fFFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-22 Thread Julien HENRY
2017-03-22 9:42 GMT+01:00 Jan Fabry :

> (but it's not always clear to me which
> ones actually do that, and since which version)
>

See:
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins#AnalyzingwithSonarQubeScannerforJenkins-AnalyzinginaJenkinspipeline

It should work for:
  - SQ Scanner 2.8+
  - SQ Scanner for Maven 3.1+
  - SQ Scanner for Gradle 2.1+

It doesn't work currently with the Scanner for MSBuild.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxGvYgrnqFSaA%2BLfXqsSQfjAYu3qAEzJMsGs-drun75j6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-22 Thread Julien HENRY
Hi Jan,

Thanks for confirming my guess about log parsing. I think we need to
provide a more robust solution for Gradle users. sonar-scanner users should
be unaffected since logs should be there.
https://jira.sonarsource.com/browse/SONARJNKNS-281

Still we need to understand the master/slave issue. As I said, I already
tried the master/slave scenario (ok, the slave is on the same machine, but
I don't see why this would affect the process).

After the end of the withSonarQubeEnv closure (and assuming log parsing was
working), we should have collected server URL and taskId, and stored them
in a Jenkins "action". It should be visible in the build.xml of the build.
Something like:


  localhost
  AVrxNskUNRuu9JoQMGou
  
http://localhost:9000/dashboard/index/org.sonarsource.clirr:sonar-clirr-plugin

  true
  false


Can you confirm that you see this in your master/slave test?

Thanks

Julien

2017-03-22 8:38 GMT+01:00 Jan Fabry :

> This does not work if you run it on a slave. If I change the "agent
> any" to "agent { label: "some-slave" }", then it fails for me. My
> setup has one master (Linux) and one slave (macOS). Both can reach the
> SonarQube server. The badge in the build history does link to the
> SonarQube project, so that part is parsed successfully.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxGrJaNORBfLUUtaRm-or19YCeuOT%3DGq5u%2BoBUfH26FY1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-21 Thread Julien HENRY
Hi Jan,

I think I understand why it doesn't work with Gradle.

2017-03-21 19:32 GMT+01:00 Jan Fabry :

> Let me know if  you want any other tests.


Please try to run sh './gradlew *--info* sonarqube' and I guess it should
work.

++

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxH88hozgKwCix_o0hiuOYMA%2B5U1K73JOF-THifQGjzwGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-21 Thread Julien HENRY
2017-03-21 14:42 GMT+01:00 Jesse Glick <jgl...@cloudbees.com>:

> On Tue, Mar 21, 2017 at 8:40 AM, Julien HENRY
> <julien.he...@sonarsource.com> wrote:
> > script {
>
> Should not be necessary AFAIK—you can use block-scoped steps like
> `withSonarQubeEnv`.
>
> > withEnv(["JAVA_HOME=${ tool '8u121' }", "PATH+MAVEN=${tool
> '3.3.9'}/bin:${env.JAVA_HOME}/bin"]) {
>
> `tools` section
>

Indeed, it works fine without script block.

>
> > script  {
> >   def qg = waitForQualityGate()
> >   if (qg.status != 'OK') {
> > error "Pipeline aborted due to quality gate failure: ${qg.status}"
>
> This part is not Declarative-friendly. You could add an option to
> `waitForQualityGate` to set the build result to `UNSTABLE`.
>

Here is a ticket: https://jira.sonarsource.com/browse/SONARJNKNS-280

Still that doesn't explain why the "communication" between the
withSonarQubeEnv and the waitForQualityGate steps is not working for some
people.

Jesse, withSonarQubeEnv is a SimpleBuildWrapper. We attach to it a Disposer
that collect some properties, and attach them to the build using
an InvisibleAction. Then later the waitForQualityGate step try to read it
back to get the values. For some people it seems to fail somewhere, in a
mater/slave configuration. I was not able to reproduce but are you aware of
any problem with this approach?

Thanks

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxEaRoFuvffGq8bx%2Bn8CjirFwLMao1pEPSUq5aDKV0Zbxg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-21 Thread Julien HENRY
OK, I did a test with a declarative pipeline, and it works fine. Here is my
sample pipeline. Can you try on your own instance and see how it goes (you
have to replace bold values by your own)?

pipeline {
agent none
stages {
stage("build & SonarQube Scan") {
agent any
steps {
  git changelog: false, poll: false, url: '
https://github.com/SonarQubeCommunity/sonar-clirr.git'
  script {
  withEnv(["JAVA_HOME=${ tool '*8u121*' }",
"PATH+MAVEN=${tool '*3.3.9*'}/bin:${env.JAVA_HOME}/bin"]) {
withSonarQubeEnv('*localhost*') {
   sh 'mvn clean package sonar:sonar -DskipTests'
}
  }
  }
}
}

stage("Quality Gate") {
steps {
timeout(time: 1, unit: 'HOURS') {
script  {
def qg = waitForQualityGate()
if (qg.status != 'OK') {
error "Pipeline aborted due to quality gate
failure: ${qg.status}"
}
}
}
}
}
}
}


2017-03-21 12:23 GMT+01:00 Tim Downey <timothy.dow...@gmail.com>:

> Hi Julien,
>
> 'steps' is part of declarative pipeline which is becoming the
> recommendation from the Jenkins folks on how to write your Jenkinsfiles.
>
> https://jenkins.io/doc/book/pipeline/
>
> Tim
>
> On Tue, Mar 21, 2017 at 4:29 AM, Julien HENRY <
> julien.he...@sonarsource.com> wrote:
>
>> Hi,
>>
>> Can you tell me what is this "steps" keyword? When I try to use it I get
>> NoSuchMethodError: No such DSL method 'steps'
>>
>> Also, what is the point of the script block?
>>
>> In short, what happen if you simplify your script to:
>>
>> stage ("SonarQube analysis") {
>>STAGE_NAME = "SonarQube analysis"
>>
>>if (BRANCH_NAME == "develop") {
>>   echo "In 'develop' branch, don't analyze."
>>}
>>else { // this is a PR build, run sonar analysis
>>   withSonarQubeEnv("SonarGate") {
>>  sh "../../../sonar-scanner-2.9.0.670/bin/sonar-scanner"
>>   }
>>}
>>   }
>>
>>   stage ("SonarQube Gatekeeper") {
>>STAGE_NAME = "SonarQube Gatekeeper"
>>
>>if (BRANCH_NAME == "develop") {
>>   echo "In 'develop' branch, skip."
>>}
>>else { // this is a PR build, fail on threshold spill
>>   def qualitygate = waitForQualityGate()
>>   if (qualitygate.status != "OK") {
>>  error "Pipeline aborted due to quality gate coverage 
>> failure: ${qualitygate.status}"
>>   }
>>}
>>   }
>>
>>
>>
>> 2017-03-20 23:46 GMT+01:00 Idan Adar <i...@adar.me>:
>>
>>> I'd like to join the growing number of users unable to make this work...
>>>
>>> Jenkins 2.5
>>> SonarQube 6.2
>>> 1 master and 1 slave machine
>>>
>>> The following fails with: java.lang.IllegalStateException: Unable to
>>> get SonarQube task id and/or server name. Please use the 'withSonarQubeEnv'
>>> wrapper to run your analysis.
>>>
>>>
>>> stage ("SonarQube analysis") {
>>>  steps {
>>> script {
>>>STAGE_NAME = "SonarQube analysis"
>>>
>>>if (BRANCH_NAME == "develop") {
>>>   echo "In 'develop' branch, don't analyze."
>>>}
>>>else { // this is a PR build, run sonar analysis
>>>   withSonarQubeEnv("SonarGate") {
>>>  sh "../../../sonar-scanner-2.9.0.670/bin/sonar-scanner"
>>>   }
>>>}
>>> }
>>>  }
>>>   }
>>>
>>>   stage ("SonarQube Gatekeeper") {
>>>  steps {
>>> script {
>>>STAGE_NAME = "SonarQube Gatekeeper"
>>>
>>>if (BRANCH_NAME == "develop") {
>>>   echo "In 'develop' branch, skip."
>>>}
>>>else { // this is a PR build, fail on threshold spill
>>>   def

Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-21 Thread Julien HENRY
Hi,

Can you tell me what is this "steps" keyword? When I try to use it I get
NoSuchMethodError: No such DSL method 'steps'

Also, what is the point of the script block?

In short, what happen if you simplify your script to:

stage ("SonarQube analysis") {
   STAGE_NAME = "SonarQube analysis"

   if (BRANCH_NAME == "develop") {
  echo "In 'develop' branch, don't analyze."
   }
   else { // this is a PR build, run sonar analysis
  withSonarQubeEnv("SonarGate") {
 sh "../../../sonar-scanner-2.9.0.670/bin/sonar-scanner"
  }
   }
  }

  stage ("SonarQube Gatekeeper") {
   STAGE_NAME = "SonarQube Gatekeeper"

   if (BRANCH_NAME == "develop") {
  echo "In 'develop' branch, skip."
   }
   else { // this is a PR build, fail on threshold spill
  def qualitygate = waitForQualityGate()
  if (qualitygate.status != "OK") {
 error "Pipeline aborted due to quality gate coverage
failure: ${qualitygate.status}"
  }
   }
  }



2017-03-20 23:46 GMT+01:00 Idan Adar <i...@adar.me>:

> I'd like to join the growing number of users unable to make this work...
>
> Jenkins 2.5
> SonarQube 6.2
> 1 master and 1 slave machine
>
> The following fails with: java.lang.IllegalStateException: Unable to get
> SonarQube task id and/or server name. Please use the 'withSonarQubeEnv'
> wrapper to run your analysis.
>
>
> stage ("SonarQube analysis") {
>  steps {
> script {
>STAGE_NAME = "SonarQube analysis"
>
>if (BRANCH_NAME == "develop") {
>   echo "In 'develop' branch, don't analyze."
>}
>else { // this is a PR build, run sonar analysis
>   withSonarQubeEnv("SonarGate") {
>  sh "../../../sonar-scanner-2.9.0.670/bin/sonar-scanner"
>   }
>}
> }
>  }
>   }
>
>   stage ("SonarQube Gatekeeper") {
>  steps {
> script {
>STAGE_NAME = "SonarQube Gatekeeper"
>
>if (BRANCH_NAME == "develop") {
>   echo "In 'develop' branch, skip."
>}
>else { // this is a PR build, fail on threshold spill
>   def qualitygate = waitForQualityGate()
>   if (qualitygate.status != "OK") {
>  error "Pipeline aborted due to quality gate coverage 
> failure: ${qualitygate.status}"
>       }
>}
> }
>  }
>   }
>
>
>
> I did also post more information on StackOverflow, but given that there
> hasn't been any interaction there, I'll just mention here as well...
> https://stackoverflow.com/questions/42909439/using-
> waitforqualitygate-in-a-jenkins-declarative-pipeline
>
>
> On Wednesday, February 22, 2017 at 5:02:24 PM UTC+2, Julien HENRY wrote:
>>
>> Hi,
>>
>> I would like to collect feedback before the upcoming release of the
>> SonarQube Scanner for Jenkins.
>>
>> The main new feature is that we introduced a new pipeline step that would
>> put the pipeline in pause until SonarQube analysis is finished, and the
>> step will then give access to the quality gate status. You can then
>> implement any logic you want.
>>
>> Example:
>>   stage("build & SonarQube analysis") {
>>   node {
>>   withSonarQubeEnv('My SonarQube Server') {
>>  sh 'mvn clean package sonar:sonar'
>>   }
>>   }
>>   }
>>
>>   stage("Quality Gate"){
>>   timeout(time: 1, unit: 'HOURS') {
>>   def qg = *waitForQualityGate()*
>>   if (qg.status != 'OK') {
>>   error "Pipeline aborted due to quality gate failure:
>> ${qg.status}"
>>   }
>>   }
>>   }
>>
>> You can test using this artifact:
>> https://repox.sonarsource.com/sonarsource-public-builds/org/
>> jenkins-ci/plugins/sonar/2.6-build1166/sonar-2.6-build1166.hpi
>>
>> Documentation is available directly on the step in the pipeline snippet
>> generator.
>>
>> Feedback period is open until Friday.
>>
>> Regards,
>>
>> Julien
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers

Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-17 Thread Julien HENRY
Hi Jan,

Le mercredi 15 mars 2017 11:11:30 UTC+1, jan.fa...@thanksys.com a écrit :
>
> *Should* the waitForQualityGate be outside a node, or *must* it be outside 
> of a node? We have some existing scripts which use a single node scope for 
> the whole script, and would like to integrate the quality gate with minimal 
> changes. The extra wait time is no issue at the moment.
>

It *should* be outside a node
but
It *must* be outside the withSonarQubeEnv closure (since collecting 
analysis id is done at the end of the closure).

I was not able to reproduce the problem, so please try to produce a sample 
reproducer (with precise Jenkins version, number of slaves, and of course 
the pipeline script).

Thanks

Julien
 

>
> We also have the "Unable to get task id" issue, not sure whether this is 
> related? It's also not clear to me yet how I should start debugging it (I'm 
> looking at the Java code of the plugin, but I'm not sure how many 
> structures I can access in my Jenkinsfile to print their values, e.g. to 
> get the SonarAnalysisAction).
>
> Regards,
>
> Jan Fabry
>
> On Friday, 24 February 2017 17:42:24 UTC+1, Julien HENRY wrote:
>>
>> Hi Tim,
>>
>> The step waitForQualityGate has to be used outside withSonarQubeEnv. Also 
>> remember that the purpose is to not occupy a Jenkins executor during the 
>> wait, so your sh step should be in a node, but not the waitForQualityGate.
>>
>> HTH
>>
>> Julien
>>
>>
>> Le mercredi 22 février 2017 18:13:09 UTC+1, Tim Downey a écrit :
>>>
>>> Hi Julien,
>>>
>>> This is terrific, but I'm having issues.  I'm trying to use this within 
>>> a pipeline model definition build.  I'm struggling with 
>>> `waitForQualityGate`.  Wherever I put it, I'm getting an exception.  I've 
>>> tried the `waitForQualityGate` both in the same and in separate stages. 
>>>  Any suggestions?
>>>
>>> java.lang.IllegalStateException: Unable to get SonarQube task id and/or 
>>> server name. If you are not using the 'withSonarQubeEnv' wrapper to run 
>>> your analysis, you have to pass the attributes manually to this step.
>>> at 
>>> org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.processStepParameters(WaitForQualityGateStep.java:127)
>>> at 
>>> org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.start(WaitForQualityGateStep.java:107)
>>>
>>>
>>> stage('sonar-build') {
>>>
>>> steps {
>>> script {
>>> withSonarQubeEnv('VantageSonar') {
>>> sh 'mvn clean package sonar:sonar'
>>>
>>> def qg = waitForQualityGate()
>>> if (qg.status != 'OK') {
>>>   error "Pipeline aborted due to quality gate 
>>> failure: ${qg.status}"
>>> }
>>> }
>>> }
>>> }
>>> }Enter code here...
>>>
>>>
>>> On Wednesday, February 22, 2017 at 10:02:30 AM UTC-5, Julien HENRY wrote:
>>>>
>>>> Hi,
>>>>
>>>> I would like to collect feedback before the upcoming release of the 
>>>> SonarQube Scanner for Jenkins.
>>>>
>>>> The main new feature is that we introduced a new pipeline step that 
>>>> would put the pipeline in pause until SonarQube analysis is finished, and 
>>>> the step will then give access to the quality gate status. You can then 
>>>> implement any logic you want.
>>>>
>>>> Example:
>>>>   stage("build & SonarQube analysis") {
>>>>   node {
>>>>   withSonarQubeEnv('My SonarQube Server') {
>>>>  sh 'mvn clean package sonar:sonar'
>>>>   }
>>>>   }
>>>>   }
>>>>   
>>>>   stage("Quality Gate"){
>>>>   timeout(time: 1, unit: 'HOURS') {
>>>>   def qg = *waitForQualityGate()*
>>>>   if (qg.status != 'OK') {
>>>>   error "Pipeline aborted due to quality gate failure: 
>>>> ${qg.status}"
>>>>   }
>>>>   }
>>>>   }
>>>>
>>>> You can test using this artifact:
>>>>
>>>> https://repox.sonarsource.com/sonarsource-public-builds/org/jenkins-ci/plugins/sonar/2.6-build1166/sonar-2.6-build1166.hpi
>>>>
>>>> Documentation is available directly on the step in the pipeline snippet 
>>>> generator.
>>>>
>>>> Feedback period is open until Friday.
>>>>
>>>> Regards,
>>>>
>>>> Julien
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/ecaea6e9-b898-45c8-b49f-77243ea21b2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-14 Thread Julien HENRY
Hi Arvid,

Could you please share your pipeline script? Remember that
waitForQualityGate should be used after/outside withSonarQubeEnv closure.

withSonarQubeEnv() {
   xxx
}
def qg = waitForQualityGate()

++

Julien

2017-03-14 10:11 GMT+01:00 Arvid Huss :

> Hi Julien,
>
> I am facing exactly the same behaviour as Tim describes, the difference
> with my setup is that it works for a single Jenkins server setup but not in
> a Jenkins master/slave environment. When I run my pipeline script on the
> master/slave jenkins I get the IllegalStateException!  waitForQualityGate
> fails since it cannot find either server or task id from the previous
> analysis.
>
> Is there any workaround for this?
>
> brg
> Arvid
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxEuQLNm2jcet89bymD%3DVQYzzfP5Hv-5yqWFPF8Qky7xig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-03-03 Thread Julien HENRY
Hi Georg,

Le mardi 28 février 2017 14:02:33 UTC+1, georg@netcentric.biz a écrit :
>
> Hi Julien, 
>
> this feature is nice but it has been easily possible to achieve the same 
> with https://github.com/SonarQubeCommunity/sonar-build-breaker 
>

Build breaker was using polling, which has several drawback. That's why we 
were not supporting it. Also here you get the status in your pipeline 
script. You can decide to implement any logic, not always fail the build. 
For example use the input step to ask for a manual user confirmation before 
moving the pipeline forward.
 

> (or https://github.com/AmadeusITGroup/sonar-stash that we use ATM). 
>

I don't consider that reporting issues on a pull request and getting 
quality gate status in your Jenkins pipeline are similar features.
 

>
> A lot more important would be the long-standing issue 
> https://jira.sonarsource.com/browse/SONAR-6763 
> <https://www.google.com/url?q=https%3A%2F%2Fjira.sonarsource.com%2Fbrowse%2FSONAR-6763=D=1=AFQjCNGnwGKfz6SPcgK_wbQgShbuIyiYxw>
>  
> - any news when quality gates on incremental (or if not incremental, at 
> least on "non-server-side-saving") sonar runs will be possible?
>

That's a different topic, so I will not respond here.
 

>
> Best Regards
> Georg
>
> On Wednesday, 22 February 2017 16:02:24 UTC+1, Julien HENRY wrote:
>>
>> Hi,
>>
>> I would like to collect feedback before the upcoming release of the 
>> SonarQube Scanner for Jenkins.
>>
>> The main new feature is that we introduced a new pipeline step that would 
>> put the pipeline in pause until SonarQube analysis is finished, and the 
>> step will then give access to the quality gate status. You can then 
>> implement any logic you want.
>>
>> Example:
>>   stage("build & SonarQube analysis") {
>>   node {
>>   withSonarQubeEnv('My SonarQube Server') {
>>  sh 'mvn clean package sonar:sonar'
>>   }
>>   }
>>   }
>>   
>>   stage("Quality Gate"){
>>   timeout(time: 1, unit: 'HOURS') {
>>   def qg = *waitForQualityGate()*
>>   if (qg.status != 'OK') {
>>   error "Pipeline aborted due to quality gate failure: 
>> ${qg.status}"
>>   }
>>   }
>>   }
>>
>> You can test using this artifact:
>>
>> https://repox.sonarsource.com/sonarsource-public-builds/org/jenkins-ci/plugins/sonar/2.6-build1166/sonar-2.6-build1166.hpi
>>
>> Documentation is available directly on the step in the pipeline snippet 
>> generator.
>>
>> Feedback period is open until Friday.
>>
>> Regards,
>>
>> Julien
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/055101bf-7873-4656-8bb2-8ac8a928c5b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Random failure in SonarQube plugin tests (using JenkinsRule)

2017-02-27 Thread Julien HENRY
Hi guys,

This is an issue I'm facing for a long time now, without having managed to
find the root cause.

Some of our plugin tests are randomly failing. Our test suite is using the
Jenkins test harness, and I can't manage to find the root cause.
Only a few tests among all the test suite are affected.

For example this simple one:
https://github.com/SonarSource/sonar-scanner-jenkins/blob/master/src/test/java/hudson/plugins/sonar/MigrationTest.java

hudson.plugins.sonar.MigrationTest.testShouldMigrateDatabasePasswords(hudson.plugins.sonar.MigrationTest)

 Run 1: MigrationTest.testShouldMigrateDatabasePasswords:56 NullPointer
 Run 2: MigrationTest.testShouldMigrateDatabasePasswords:56 NullPointer
 Run 3: MigrationTest.testShouldMigrateDatabasePasswords:56 NullPointer
 Run 4: MigrationTest.testShouldMigrateDatabasePasswords:56 NullPointer
 Run 5: MigrationTest.testShouldMigrateDatabasePasswords:56 NullPointer


It look like the plugin under test is sometimes not properly loaded in the
Jenkins instance.

I can even reproduce by running this test alone:

mvn clean verify -Dtest=MigrationTest

After a few runs, I get:

Running hudson.plugins.sonar.MigrationTest
Feb 27, 2017 12:16:29 PM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @355ms
Exploding
/home/julien/.m2/repository/org/jenkins-ci/main/jenkins-war/2.32.2/jenkins-war-2.32.2-war-for-test.jar
into
/home/julien/Prog/Projects/jenkins-sonar-plugin/target/jenkins-for-test
Feb 27, 2017 12:16:31 PM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.2.12.v20150709
Feb 27, 2017 12:16:31 PM
org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
INFO: NO JSP Support for /jenkins, did not find
org.eclipse.jetty.jsp.JettyJspServlet
Feb 27, 2017 12:16:31 PM org.eclipse.jetty.server.handler.ContextHandler
doStart
INFO: Started 
o.e.j.w.WebAppContext@3a3e78f{/jenkins,file:/home/julien/Prog/Projects/jenkins-sonar-plugin/target/jenkins-for-test/,AVAILABLE}{/home/julien/Prog/Projects/jenkins-sonar-plugin/target/jenkins-for-test}

Feb 27, 2017 12:16:31 PM org.eclipse.jetty.server.AbstractConnector doStart
INFO: Started ServerConnector@7ca33c24{HTTP/1.1}{localhost:39063}
Feb 27, 2017 12:16:31 PM org.eclipse.jetty.server.Server doStart
INFO: Started @1903ms
Feb 27, 2017 12:16:31 PM org.jvnet.hudson.test.JenkinsRule createWebServer
INFO: Running on http://localhost:39063/jenkins/
Loading $JENKINS_HOME from
/home/julien/Prog/Projects/jenkins-sonar-plugin/target/test-classes/hudson/plugins/sonar/MigrationTest

Feb 27, 2017 12:16:31 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Feb 27, 2017 12:16:35 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Feb 27, 2017 12:16:35 PM
jenkins.bouncycastle.api.SecurityProviderInitializer addSecurityProvider
INFO: Initializing Bouncy Castle security provider.
Feb 27, 2017 12:16:35 PM
jenkins.bouncycastle.api.SecurityProviderInitializer addSecurityProvider
INFO: Bouncy Castle security provider initialized.
Feb 27, 2017 12:16:35 PM jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Initializing plugin sonar
java.lang.NullPointerException
   at
hudson.plugins.sonar.SonarPlugin.postInitialize(SonarPlugin.java:48)
   at hudson.PluginManager$2$1$2.run(PluginManager.java:542)
   at
org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)

   at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
   at jenkins.model.Jenkins$7.runTask(Jenkins.java:1085)
   at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
   at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

   at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

   at java.lang.Thread.run(Thread.java:745)


Any help would be much appreciated.

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxERj%3D2935dDf0wpaRx4VVDhrYOJk6rtESGN8%3DBqPsE0VQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RFF] SonarQube Scanner for Jenkins 2.6

2017-02-24 Thread Julien HENRY
Hi Tim,

The step waitForQualityGate has to be used outside withSonarQubeEnv. Also 
remember that the purpose is to not occupy a Jenkins executor during the 
wait, so your sh step should be in a node, but not the waitForQualityGate.

HTH

Julien


Le mercredi 22 février 2017 18:13:09 UTC+1, Tim Downey a écrit :
>
> Hi Julien,
>
> This is terrific, but I'm having issues.  I'm trying to use this within a 
> pipeline model definition build.  I'm struggling with `waitForQualityGate`. 
>  Wherever I put it, I'm getting an exception.  I've tried the 
> `waitForQualityGate` both in the same and in separate stages.  Any 
> suggestions?
>
> java.lang.IllegalStateException: Unable to get SonarQube task id and/or 
> server name. If you are not using the 'withSonarQubeEnv' wrapper to run your 
> analysis, you have to pass the attributes manually to this step.
> at 
> org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.processStepParameters(WaitForQualityGateStep.java:127)
> at 
> org.sonarsource.scanner.jenkins.pipeline.WaitForQualityGateStep$Execution.start(WaitForQualityGateStep.java:107)
>
>
> stage('sonar-build') {
>
> steps {
> script {
> withSonarQubeEnv('VantageSonar') {
> sh 'mvn clean package sonar:sonar'
>
> def qg = waitForQualityGate()
> if (qg.status != 'OK') {
>   error "Pipeline aborted due to quality gate 
> failure: ${qg.status}"
> }
> }
> }
>     }
> }Enter code here...
>
>
> On Wednesday, February 22, 2017 at 10:02:30 AM UTC-5, Julien HENRY wrote:
>>
>> Hi,
>>
>> I would like to collect feedback before the upcoming release of the 
>> SonarQube Scanner for Jenkins.
>>
>> The main new feature is that we introduced a new pipeline step that would 
>> put the pipeline in pause until SonarQube analysis is finished, and the 
>> step will then give access to the quality gate status. You can then 
>> implement any logic you want.
>>
>> Example:
>>   stage("build & SonarQube analysis") {
>>   node {
>>   withSonarQubeEnv('My SonarQube Server') {
>>  sh 'mvn clean package sonar:sonar'
>>   }
>>   }
>>   }
>>   
>>   stage("Quality Gate"){
>>   timeout(time: 1, unit: 'HOURS') {
>>   def qg = *waitForQualityGate()*
>>   if (qg.status != 'OK') {
>>   error "Pipeline aborted due to quality gate failure: 
>> ${qg.status}"
>>   }
>>   }
>>   }
>>
>> You can test using this artifact:
>>
>> https://repox.sonarsource.com/sonarsource-public-builds/org/jenkins-ci/plugins/sonar/2.6-build1166/sonar-2.6-build1166.hpi
>>
>> Documentation is available directly on the step in the pipeline snippet 
>> generator.
>>
>> Feedback period is open until Friday.
>>
>> Regards,
>>
>> Julien
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/f9154b14-2ca3-4779-a642-29c51c46a794%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[RFF] SonarQube Scanner for Jenkins 2.6

2017-02-22 Thread Julien HENRY
Hi,

I would like to collect feedback before the upcoming release of the
SonarQube Scanner for Jenkins.

The main new feature is that we introduced a new pipeline step that would
put the pipeline in pause until SonarQube analysis is finished, and the
step will then give access to the quality gate status. You can then
implement any logic you want.

Example:
  stage("build & SonarQube analysis") {
  node {
  withSonarQubeEnv('My SonarQube Server') {
 sh 'mvn clean package sonar:sonar'
  }
  }
  }

  stage("Quality Gate"){
  timeout(time: 1, unit: 'HOURS') {
  def qg = *waitForQualityGate()*
  if (qg.status != 'OK') {
  error "Pipeline aborted due to quality gate failure:
${qg.status}"
  }
  }
  }

You can test using this artifact:
https://repox.sonarsource.com/sonarsource-public-builds/org/jenkins-ci/plugins/sonar/2.6-build1166/sonar-2.6-build1166.hpi

Documentation is available directly on the step in the pipeline snippet
generator.

Feedback period is open until Friday.

Regards,

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxEpf977L%3DxpzxaBZ0qMqOPO2CDQDEym7ue8MUGimhM2sQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Develop a custom step that would make pipeline wait for a webhook

2016-11-30 Thread Julien HENRY
Hi Jesse,

Thanks for the pointers.

2016-11-29 0:51 GMT+01:00 Jesse Glick <jgl...@cloudbees.com>:

> On Fri, Nov 25, 2016 at 4:14 AM, Julien HENRY
> <julien.he...@sonarsource.com> wrote:
> > I found this ticket https://issues.jenkins-ci.org/browse/JENKINS-27127
> that
> > is really close to what we need.
>
> Yes, sounds like it. The issue needs to be “defuzzed” somewhat:
> concrete proposals written up, possibly broken into multiple features.
>
> > Is there any progress on that topic?
>
> Not currently.
>
> > Waiting for this generic step, do you think it would be possible to
> > implement the feature with a custom step?
>
> Sure, there is nothing stopping you from writing a limited version of
> this feature tailored to your needs.
>
> https://github.com/jenkinsci/workflow-step-api-plugin/#
> creating-an-asynchronous-step
>
> plus probably an `UnprotectedRootAction` (take care to consider
> malicious payloads).
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-dev/C3rixeHrSrY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/CANfRfr0eoqDrV_sMtvN7XR3aPExECjwki4Ckzqg8O93H
> LKL08A%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxHWayrhCVTAz_j%3DS%3DgJXpzQgRuO47%3DOZoUtASuPpHXfRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Develop a custom step that would make pipeline wait for a webhook

2016-11-25 Thread Julien HENRY
Hi guys,

We would like to implement a feature in the SonarQube plugin that would 
make the pipeline wait for some external/asynchronous processing to be 
completed (SonarQube analysis). In addition we would like to get some data 
(JSON payload) from this external process. Something like:

def analysisResult;
withSonarQubeEnv('mySonar') {
sh 'mvn sonar:sonar' // Submit asynchronous analysis
analysisResult = waitForSonarQubeAnalysis 
}
if (analysisResult.isSuccess) {
  promote()
} else {
  notifyKO(analysisResult)
}


I found this ticket https://issues.jenkins-ci.org/browse/JENKINS-27127 that 
is really close to what we need. Is there any progress on that topic? 
Waiting for this generic step, do you think it would be possible to 
implement the feature with a custom step?

Thanks

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/4f120390-f613-4ec9-9acd-303a7c9d3457%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Requesting feedback on upcoming pipeline compatible SonarQube plugin

2016-09-19 Thread 'Julien HENRY' via Jenkins Developers
Hi guys,
We worked last weeks on making the SonarQube Scanner for Jenkins (aka 
sonar-plugin) compatible with pipeline. Before doing a final release I'm 
requesting feedback both from end users and also from Jenkins developers.
My concern is that once the plugin will be released it will be hard to change 
the DSL, so speak now or forever hold your peace :)
Here is a link to the official announcement with more 
details:https://groups.google.com/forum/#!topic/sonarqube/V6YSZfZ_rH0

For code reviewer:
https://github.com/SonarSource/sonar-scanner-jenkins

Thanks!
Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/1771378472.1556508.1474277241636%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Are backend crawlers still executed?

2016-04-25 Thread Julien HENRY
Hi guys,

We have deployed SonarQube Scanner 2.6 on central few days ago but it is 
still not visible in Jenkins. Running the crawler locally works fine so I 
wanted to ask if you could check that crawlers are still executed.

2.6 on central:
http://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/2.6/

but not in Jenkins update center:
http://mirrors.jenkins-ci.org/updates/updates/hudson.plugins.sonar.SonarRunnerInstaller.json


Thanks

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/1e351830-344e-487d-becf-a14f80f99d68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Update of crawler scripts for SonarQube Scanners

2016-02-24 Thread Julien HENRY
Hi guys,

I have submitted a P/R to update some crawlers:
https://github.com/jenkinsci/backend-crawler/pull/49



Could someone have a look and merge if everything is ok?

Many thanks

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/1283865443.5918666.1456333070399.JavaMail.yahoo%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Re: [VOTE] Release SonarQube Jenkins plugin 2.2.1

2015-04-16 Thread Julien HENRY
I'll close the vote to have the release done today. Thanks for testing.

2015-04-14 15:29 GMT+02:00 Julien HENRY julien.he...@sonarsource.com:

 As a last minute change I have added a contribution to improve performance:
 http://jira.codehaus.org/browse/SONARJNKNS-215

 Feel free to download a fresh SNAPSHOT to test this change.

 2015-04-14 9:04 GMT+02:00 Julien HENRY julien.he...@sonarsource.com:

 Hi,

 I would like to release a bugfix of SonarQube Jenkins plugin. There is a
 regression in version 2.2 that prevent to execute tasks with SonarQube
 Runner.

 *1 issue has been solved*

 https://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=12930version=21124
 *You can test using this SNAPSHOT:*
 https://sonarplugins.ci.cloudbees.com/job/jenkins/ws/target/sonar.hpi

 *Documentation*
 http://redirect.sonarsource.com/plugins/jenkins.html

 *Vote** open to everybody for 72 hours.*

  [ ] +1
 [ ] +0
 [ ] -1

 Regards,

 Julien




-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxE8w608Ng2RB%2BK4VdchBPB1gcz8iNNC3xOMv_v2eurLzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[VOTE] Release SonarQube Jenkins plugin 2.2.1

2015-04-14 Thread Julien HENRY
Hi,

I would like to release a bugfix of SonarQube Jenkins plugin. There is a
regression in version 2.2 that prevent to execute tasks with SonarQube
Runner.

*1 issue has been solved*
https://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=12930version=21124
*You can test using this SNAPSHOT:*
https://sonarplugins.ci.cloudbees.com/job/jenkins/ws/target/sonar.hpi

*Documentation*
http://redirect.sonarsource.com/plugins/jenkins.html

*Vote** open to everybody for 72 hours.*

 [ ] +1
[ ] +0
[ ] -1

Regards,

Julien

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxF7xMCsO0bgzmCgyfaifMfWoFc61DZnKaGzdXKSTXcp1A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [VOTE] Release SonarQube Jenkins plugin 2.2.1

2015-04-14 Thread Julien HENRY
As a last minute change I have added a contribution to improve performance:
http://jira.codehaus.org/browse/SONARJNKNS-215

Feel free to download a fresh SNAPSHOT to test this change.

2015-04-14 9:04 GMT+02:00 Julien HENRY julien.he...@sonarsource.com:

 Hi,

 I would like to release a bugfix of SonarQube Jenkins plugin. There is a
 regression in version 2.2 that prevent to execute tasks with SonarQube
 Runner.

 *1 issue has been solved*

 https://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=12930version=21124
 *You can test using this SNAPSHOT:*
 https://sonarplugins.ci.cloudbees.com/job/jenkins/ws/target/sonar.hpi

 *Documentation*
 http://redirect.sonarsource.com/plugins/jenkins.html

 *Vote** open to everybody for 72 hours.*

  [ ] +1
 [ ] +0
 [ ] -1

 Regards,

 Julien



-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD9wyxGN3Ccp3_VYxWCWz2m%3DuZUFHs_Yn%2BdqR8d5TGZ61OWLZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with tool auto-installer feature?

2015-03-13 Thread 'Julien HENRY' via Jenkins Developers

 Installing new tool installers should probably trigger an update check by 
 core.
+1 should I create a JIRA entry?

 That said, an easy workaround is to click 'Check Now' in Manage Plugins » 
 Advanced (or on any tab in Manage Plugins starting with 1.602 or so).
Works! Thanks. Note that only the button on Advanced tab was working. The one 
on default tab leads to http://jenkins/updateCenter/ and files are not 
updated.
++
Julien

  

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/1141095664.1566188.1426243463970.JavaMail.yahoo%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issue with tool auto-installer feature?

2015-03-13 Thread 'Julien HENRY' via Jenkins Developers
 You didn't click the button that says 'Download now and install after 
 restart' and is completely unrelated, did you?
No I clicked the Check Now button, but it seems to have the same result than 
Download now and install after restart. It is working properly only on the 
Advanced tab.

  De : Daniel Beck m...@beckweb.net
 À : jenkinsci-dev@googlegroups.com 
 Envoyé le : Vendredi 13 mars 2015 12h08
 Objet : Re: Issue with tool auto-installer feature?
   



On 13.03.2015, at 11:44, 'Julien HENRY' via Jenkins Developers 
jenkinsci-dev@googlegroups.com wrote:

 The one on default tab leads to http://jenkins/updateCenter/ and files are 
 not updated.

You didn't click the button that says 'Download now and install after restart' 
and is completely unrelated, did you?

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/0C730CB9-557D-4449-979E-F6F52D534996%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


  

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/478647582.3104811.1426253471482.JavaMail.yahoo%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Issue with tool auto-installer feature?

2015-03-12 Thread 'Julien HENRY' via Jenkins Developers
Hi guys,
During our test of the SonarQube Jenkins plugin we have noticed the following 
bad behavior:  - start from scratch (drop ~/.jenkins)  - start a clean Jenkins 
with java -jar jenkins.war  - go in administration page and see that all tools 
auto-install drop down list are populated (and indeed there are appropriate 
files in ~/.jenkins/updates)  - install SonarQube Jenkins plugin manually 
(upload sonar.hpi)
  - restart Jenkins  - go in administration page and see SonarQube Runner tool 
auto-install feature is broken (a text box is rendered instead of the drop 
down)  - in ~/.jenkins/updates/ there is indeed no 
hudson.plugins.sonar.SonarRunnerInstaller file

To fix that I only found 2 options:  - either wait for a very long time (1 
day?) as it seems this is the default interval for downloading json files from 
update center  - delete entire folder ~/.jenkins/updates and restart Jenkins = 
then all files (including hudson.plugins.sonar.SonarRunnerInstaller) are 
downloaded
So my question is: is it a known issue on core side or did I do something wrong 
in my 
implementation:https://github.com/SonarSource/jenkins-sonar-plugin/blob/master/src/main/java/hudson/plugins/sonar/SonarRunnerInstaller.java
Thanks
Julien

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/1650556883.697311.1426170080118.JavaMail.yahoo%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Can someone apply the PR updating SQ Runner crawler

2015-03-11 Thread 'Julien HENRY' via Jenkins Developers
Hi guys,
Can someone apply the following pull 
request:https://github.com/jenkinsci/backend-crawler/pull/31
Thanks
Julien

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/227088028.4287372.1426074965602.JavaMail.yahoo%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Migrate SonarQube plugin to new Jenkins API: question on Callable::checkRoles

2015-03-06 Thread 'Julien HENRY' via Jenkins Developers
Hi guys,
I'm trying to upgrade SQ plugin to new Jenkins API. I discovered the new method 
to be implemented on Callable and I have read 
https://wiki.jenkins-ci.org/display/JENKINS/Slave+To+Master+Access+Control. But 
still I'm not sure of what to do.
In SonarRunnerBuilder [1] we need to get the path of the installed SonarRunner 
tool. The code was largely inspired from Ant 
plugin:https://github.com/SonarSource/jenkins-sonar-plugin/blob/2.1/src/main/java/hudson/plugins/sonar/SonarRunnerInstallation.java#L59
What do you suggest to me? Should I use MasterToSlaveCallable ?

Thanks
Julien

[1] 
https://github.com/SonarSource/jenkins-sonar-plugin/blob/2.1/src/main/java/hudson/plugins/sonar/SonarRunnerBuilder.java#L196
 

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/815717568.6975290.1425652430691.JavaMail.yahoo%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Re: Migrate SonarQube plugin to new Jenkins API: question on Callable::checkRoles

2015-03-06 Thread 'Julien HENRY' via Jenkins Developers
 Does the wiki need to be clarified?
In fact it's just that I don't know what is my situation (Master To Slave, 
Slave To Master, other?). Here I have a Builder extension perform method that 
need to know where is located the InstallableTool on the slave running the 
build. But I don't know where is executed the perform method. My guess was 
that it was executed on master (Master to Slave) but maybe it could be directly 
executed on the slave. In this case maybe there was no need for the Callable 
stuff.
Anyway thanks for the answer.
++
Julien

  De : Jesse Glick jgl...@cloudbees.com
 À : Jenkins Dev jenkinsci-dev@googlegroups.com 
 Envoyé le : Vendredi 6 mars 2015 17h51
 Objet : Re: Migrate SonarQube plugin to new Jenkins API: question on 
Callable::checkRoles
   
On Fri, Mar 6, 2015 at 9:33 AM, 'Julien HENRY' via Jenkins Developers


jenkinsci-dev@googlegroups.com wrote:
 What do you suggest to me? Should I use MasterToSlaveCallable ?



-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0sM-rLBs2ofpme_OstB0OiL9%2Bo%2BZP0Uh-A64Lbrm%3D7dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


  

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/1616382900.7115084.1425661192552.JavaMail.yahoo%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Re: Update Sonar Runner crawler

2013-04-18 Thread Julien HENRY
Hi,

Is there any news concerning backend crawlers? 

Regards,

Julien






 De : Julien HENRY henr...@yahoo.fr
À : jenkinsci-dev@googlegroups.com jenkinsci-dev@googlegroups.com 
Envoyé le : Jeudi 4 avril 2013 17h40
Objet : Re: Update Sonar Runner crawler
 


Thanks for letting me know.




 De : Larry Shatzer, Jr. lar...@gmail.com
À : jenkinsci-dev@googlegroups.com 
Envoyé le : Mercredi 3 avril 2013 16h49
Objet : Re: Update Sonar Runner crawler
 

I lack the privileges to pull that request in. Also, I know that since 
February sometime the back end crawler has not been running at all, or dying. 
I noticed this since Maven 3.0.5 is not available for automatic tool install 
from Jenkins. I mentioned this in IRC and Kohsuke is aware.



On Wed, Apr 3, 2013 at 6:23 AM, Julien HENRY henr...@yahoo.fr wrote:

Hi,


I did a pull request to update Sonar Runner crawler:
https://github.com/jenkinsci/backend-crawler/pull/16


Can someone review it and apply it to make latest Sonar Runner version 
available in Jenkins plugin?


Thanks

Julien-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 




-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Expose pom properties in MavenModule

2013-04-09 Thread Julien HENRY
Hi Ulli,

My specific use case was to read property sonar.branch from the resolved pom 
of the project being built. But in fact we decided to go another route so no 
more need for this feature for now.

Anyway thanks for your support,

Julien






 De : Ulli Hafner ullrich.haf...@gmail.com
À : jenkinsci-dev@googlegroups.com 
Envoyé le : Lundi 8 avril 2013 17h04
Objet : Re: Expose pom properties in MavenModule
 

Hi Julien,


feel free to add a new pull request. 


Aren't properties already expanded automatically in the methods of MojoInfo? 
E.g. mojo.getConfigurationValue(outputFile, String.class); 
should return the expanded result. Or do you need to read individual 
properties in your plug-in?


Ulli


Am 08.04.2013 um 15:59 schrieb Julien HENRY henr...@yahoo.fr:

Hi,

Except if I missed something there is no way for a plugin to read resolved 
Maven properties using Jenkins API. Jenkins parse poms and expose some 
informations like groupId, artifactId, version, packaging, ... but not 
properties.

I would like to contribute a patch to add properties attribute to the 
MavenModule class.

WDYT?

Julien





-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 




-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Expose pom properties in MavenModule

2013-04-08 Thread Julien HENRY
Hi,

Except if I missed something there is no way for a plugin to read resolved 
Maven properties using Jenkins API. Jenkins parse poms and expose some 
informations like groupId, artifactId, version, packaging, ... but not 
properties.

I would like to contribute a patch to add properties attribute to the 
MavenModule class.

WDYT?

Julien

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Update Sonar Runner crawler

2013-04-04 Thread Julien HENRY
Thanks for letting me know.





 De : Larry Shatzer, Jr. lar...@gmail.com
À : jenkinsci-dev@googlegroups.com 
Envoyé le : Mercredi 3 avril 2013 16h49
Objet : Re: Update Sonar Runner crawler
 

I lack the privileges to pull that request in. Also, I know that since 
February sometime the back end crawler has not been running at all, or dying. 
I noticed this since Maven 3.0.5 is not available for automatic tool install 
from Jenkins. I mentioned this in IRC and Kohsuke is aware.



On Wed, Apr 3, 2013 at 6:23 AM, Julien HENRY henr...@yahoo.fr wrote:

Hi,


I did a pull request to update Sonar Runner crawler:
https://github.com/jenkinsci/backend-crawler/pull/16


Can someone review it and apply it to make latest Sonar Runner version 
available in Jenkins plugin?


Thanks

Julien -- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 




-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Update Sonar Runner crawler

2013-04-03 Thread Julien HENRY
Hi,

I did a pull request to update Sonar Runner crawler:
https://github.com/jenkinsci/backend-crawler/pull/16

Can someone review it and apply it to make latest Sonar Runner version 
available in Jenkins plugin?

Thanks

Julien

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Can't push to github.com/jenkinsci/jenkins

2012-10-19 Thread Julien HENRY
It seems github was under a DDOS attack: https://status.github.com/




 De : Kohsuke Kawaguchi kkawagu...@cloudbees.com
À : jenkinsci-dev@googlegroups.com 
Envoyé le : Vendredi 19 octobre 2012 8h24
Objet : Can't push to github.com/jenkinsci/jenkins
 
I somehow can't push to the Jenkins repository for past 8 hours or so.
It hangs after the Total line and eventually times out.

I'm traveling, so it's not impossible to imagine that the network is
doing something funny, but then the traffic is over SSH, so I find it
odd that it could interfere like this. I wonder if others are seeing
the same issue, or if it's just me.

% git remote -v
origin    g...@github.com:jenkinsci/jenkins.git (fetch)
origin    g...@github.com:jenkinsci/jenkins.git (push)
% git push origin master rc
Counting objects: 159, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (98/98), done.
Writing objects: 100% (102/102), 16.25 KiB, done.
Total 102 (delta 71), reused 5 (delta 1)
Write failed: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly


-- 
Kohsuke Kawaguchi





Re: Add a new installer crawler for sonar runner

2012-10-16 Thread Julien HENRY
Many thanks!

It works fine.



 De : Kohsuke Kawaguchi kkawagu...@cloudbees.com
À : jenkinsci-dev@googlegroups.com 
Cc : Julien HENRY henr...@yahoo.fr 
Envoyé le : Samedi 13 octobre 2012 5h58
Objet : Re: Add a new installer crawler for sonar runner
 

Oops, my bad.

sonarrunner.groovy not having an executable bit set was causing the 
crawler to skip the execution.

I just fixed it and re-triggered the execution, so it should be up there 
in an hour or so.

On 10/12/2012 04:13 AM, Julien HENRY wrote:
 Up!

 Can someone do something to have the sonar runner json file published on 
 Jenkins
 update center? We have updated the plugin but release is waiting for the json
 file to be deployed.

 Thanks

 Julien


 
 *From: * Julien HENRY henr...@yahoo.fr;
 *To: * jenkinsci-dev@googlegroups.com jenkinsci-dev@googlegroups.com;
 *Subject: * Re: Add a new installer crawler for sonar runner
 *Sent: * Wed, Oct 10, 2012 8:07:06 AM

 Pull request sent. Please note that I'm not a groovy expert so I mostly
 duplicate what was done in another crawler.

 Thanks


 - Mail original -
    De : Kohsuke Kawaguchi kkawagu...@cloudbees.com javascript:return
    À : jenkinsci-dev@googlegroups.com javascript:return
    Cc : Julien HENRY henr...@yahoo.fr javascript:return
    Envoyé le : Mercredi 10 octobre 2012 0h16
    Objet : Re: Add a new installer crawler for sonar runner
   
   
    Go for it, and send in a pull request to
    https://github.com/jenkinsci/backend-crawler
   
    On 10/09/2012 10:26 AM, Julien HENRY wrote:
 Hi,
   
 I would like to provide sonar-runner as an installable tool in 
Jenkins. It
    seems we need to produce a JSON file hosted in Jenkins update site. Do 
you think
    it would be possible to do something in order to publish a
    hudson.plugins.sonar.SonarRunnerInstaller.json based on the content of 
the Maven
    repository [1]? If nobody see an objection I will write the groovy 
script that
    produces the json by parsing [2].
   
   
 Regards,
   
 Julien
   
   
 [1] 
http://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-runner/
 [2]
   
 http://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-runner/maven-metadata.xml
   
   
   
   
    --
    Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/
    Try Nectar, our professional version of Jenkins
   



-- 
Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/
Try Nectar, our professional version of Jenkins





Re: Add a new installer crawler for sonar runner

2012-10-10 Thread Julien HENRY
Pull request sent. Please note that I'm not a groovy expert so I mostly 
duplicate what was done in another crawler.

Thanks


- Mail original -
 De : Kohsuke Kawaguchi kkawagu...@cloudbees.com
 À : jenkinsci-dev@googlegroups.com
 Cc : Julien HENRY henr...@yahoo.fr
 Envoyé le : Mercredi 10 octobre 2012 0h16
 Objet : Re: Add a new installer crawler for sonar runner
 
 
 Go for it, and send in a pull request to 
 https://github.com/jenkinsci/backend-crawler
 
 On 10/09/2012 10:26 AM, Julien HENRY wrote:
  Hi,
 
  I would like to provide sonar-runner as an installable tool in Jenkins. It 
 seems we need to produce a JSON file hosted in Jenkins update site. Do you 
 think 
 it would be possible to do something in order to publish a 
 hudson.plugins.sonar.SonarRunnerInstaller.json based on the content of the 
 Maven 
 repository [1]? If nobody see an objection I will write the groovy script 
 that 
 produces the json by parsing [2].
 
 
  Regards,
 
  Julien
 
 
  [1] http://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-runner/
  [2] 
 http://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-runner/maven-metadata.xml
 
 
 
 
 -- 
 Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/
 Try Nectar, our professional version of Jenkins