Re: Jenkins Pipeline - fail a stage but continue the build

2018-02-21 Thread Cameron Jeffries
Can you please link to the syntax for the Blue Ocean metadata to use?  I'm 
having trouble finding it.

On Tuesday, January 3, 2017 at 11:15:12 AM UTC-8, Andrew Bayer wrote:
>
> There's no *easy* way to do this - in Declarative + Blue Ocean, we now 
> have this capability, but it relies on adding some additional metadata to 
> the "failed" stage that Blue Ocean reads. That said, if you don't care 
> about the visualization (i.e., the stage is marked as passed in Blue Ocean 
> or the Stage View, the build continues, but at the end of the build the 
> whole build is marked as failed), catchError will do the trick - 
> https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#code-catcherror-code-catch-error-and-set-build-result
>
> A.
>
> On Tue, Jan 3, 2017 at 8:10 AM, 'Stefan Golas' via Jenkins Users <
> jenkins...@googlegroups.com > wrote:
>
>> Hello,
>> I would like to fail a stage in a pipeline job without aborting the build 
>> (pipeline). Is there a way?
>>
>> regards Stefan
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/6cfbefd9-99da-40a1-afe2-5005c72a5b5f%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d162304a-f064-4fb3-8cfd-8728ea283025%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins issue on installing Email-ext plugin[--Urgent--]

2018-02-21 Thread Mark Waite
I continue to suspect that the problem is due to manually uploading plugins 
without satisfying all the dependencies.

You might try installing the support-core plugin.  Use it to generate a 
support bundle so that it can be compared with a working system.

As an experiment, I installed the email-ext plugin in my Jenkins and it did 
not include any additional dependencies beyond the plugins I already have 
installed.  The plugins I have installed are listed in my docker image 
, 
in case you want to compare my plugin list and yours. I did not attempt to 
send mail with the email-ext plugin, I only tested installing it to see if 
it would require additional dependencies that I do not already have.

Mark Waite

On Wednesday, February 21, 2018 at 7:28:51 PM UTC-7, iqbal md wrote:
>
> Hi Mark,
>
> Thanks for replying.
>
> I am using Oracle Java 1.8.
>
> I have tried installing the email-extension template from the "Manage 
> Plugins" section as well as installed the .hpi file. In both the cases it 
> installed the necessary dependencies, meaning I didn't observed any 
> difference there with respect to dependencies atleast.
>
> Yes, I keep restarting the Jenkins after each installation to make the 
> changes effective. 
>
> Can you please brief me over the Plugin Manager page here which you are 
> asking for verifying upon the satisfaction of dependencies. Is it the 
> "Updates" section available in the "Manage Plugins" section or is the 
> Jenkins Plugin link which mentions the Required/Optional dependencies.
>
> The moment I get plugins(workflow-job and workflow-support) installed as 
> part of the dependencies I start hitting this issue, otherwise until then 
> the pipeline runs absolutely fine just that the email feature is not able 
> to relay mails.
>
> With Regards
> Iqbal
>
> On Wednesday, 21 February 2018 10:16:34 UTC+5:30, Mark Waite wrote:
>>
>> The RunWithSCM class is part of Jenkins core.  The report of class not 
>> found for a class in Jenkins core is quite surprising.  You say that you're 
>> running "Java 1.8".  Are you running Oracle Java 1.8, OpenJDK 1.8, or IBM 
>> Java 1.8?  If you're using IBM Java 1.8, then there are known problems 
>> running Jenkins over the IBM Java Runtime Environment.  Switch to OpenJDK 
>> or Oracle JDK. 
>>
>> The missing class message for the mail related class seems to indicate 
>> that one or more required plugins might be missing from your installation.
>>
>> Have you checked the "Manage Plugins" page to see if it highlights any 
>> dependencies which are not satisfied?  Have you restarted the Jenkins 
>> server recently and reviewed the Plugin Manager page to confirm that 
>> required dependencies are satisfied?
>>
>> Did you install all the plugins using the plugin manager, or did you 
>> install some of them using the "Advanced" option to upload a specific 
>> plugin (instead of using the plugin manager)?  If you use the Advanced 
>> option, then you are responsible to upload all the required dependencies.
>>
>> Mark Waite
>>
>> On Tue, Feb 20, 2018 at 9:28 PM iqbal md  wrote:
>>
>>> I have been setting up pipeline job in Jenkins which is basically aimed 
>>> at checking out code from Subversion, build and deploy it into Weblogic, 
>>> run Cucumber test and then send out an email notification.
>>>
>>> PFB my environment related information:
>>> Java 1.8
>>> Weblogic 12c
>>> SMTP server(For mailing)
>>>
>>> My pipeline is running fine until executing Cucumber test but the job 
>>> meant for sending email is not working for me. I have tried sending email 
>>> as individual job also but no luck.
>>>
>>> I installed the email-ext template plugin thinking it will resolve my 
>>> issue around triggering emails. However this plugin mandates the email-ext 
>>> plugin to upgrade to 1.0 along with which workflow related 
>>> plugins(workflow-job and workflow-support) get installed as dependencies. 
>>> And then when I trigger any job I keep getting this error:
>>>
>>> FATAL: jenkins/scm/RunWithSCM
>>> java.lang.NoClassDefFoundError: jenkins/scm/RunWithSCM
>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
>>> at 
>>> jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
>>> at 
>>> hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:878)
>>> at 
>>> jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
>>> at 
>>> jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
>>> at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
>>> at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>>> at 
>>> org.jenkinsci.plugins.workflow.job.WorkflowJob$SCMListenerImpl.onCheckout(WorkflowJob.java:651)
>>> at 
>>> 

Re: Jenkins issue on installing Email-ext plugin[--Urgent--]

2018-02-21 Thread iqbal md
Hi Mark,

Thanks for replying.

I am using Oracle Java 1.8.

I have tried installing the email-extension template from the "Manage 
Plugins" section as well as installed the .hpi file. In both the cases it 
installed the necessary dependencies, meaning I didn't observed any 
difference there with respect to dependencies atleast.

Yes, I keep restarting the Jenkins after each installation to make the 
changes effective. 

Can you please brief me over the Plugin Manager page here which you are 
asking for verifying upon the satisfaction of dependencies. Is it the 
"Updates" section available in the "Manage Plugins" section or is the 
Jenkins Plugin link which mentions the Required/Optional dependencies.

The moment I get plugins(workflow-job and workflow-support) installed as 
part of the dependencies I start hitting this issue, otherwise until then 
the pipeline runs absolutely fine just that the email feature is not able 
to relay mails.

With Regards
Iqbal

On Wednesday, 21 February 2018 10:16:34 UTC+5:30, Mark Waite wrote:
>
> The RunWithSCM class is part of Jenkins core.  The report of class not 
> found for a class in Jenkins core is quite surprising.  You say that you're 
> running "Java 1.8".  Are you running Oracle Java 1.8, OpenJDK 1.8, or IBM 
> Java 1.8?  If you're using IBM Java 1.8, then there are known problems 
> running Jenkins over the IBM Java Runtime Environment.  Switch to OpenJDK 
> or Oracle JDK. 
>
> The missing class message for the mail related class seems to indicate 
> that one or more required plugins might be missing from your installation.
>
> Have you checked the "Manage Plugins" page to see if it highlights any 
> dependencies which are not satisfied?  Have you restarted the Jenkins 
> server recently and reviewed the Plugin Manager page to confirm that 
> required dependencies are satisfied?
>
> Did you install all the plugins using the plugin manager, or did you 
> install some of them using the "Advanced" option to upload a specific 
> plugin (instead of using the plugin manager)?  If you use the Advanced 
> option, then you are responsible to upload all the required dependencies.
>
> Mark Waite
>
> On Tue, Feb 20, 2018 at 9:28 PM iqbal md  
> wrote:
>
>> I have been setting up pipeline job in Jenkins which is basically aimed 
>> at checking out code from Subversion, build and deploy it into Weblogic, 
>> run Cucumber test and then send out an email notification.
>>
>> PFB my environment related information:
>> Java 1.8
>> Weblogic 12c
>> SMTP server(For mailing)
>>
>> My pipeline is running fine until executing Cucumber test but the job 
>> meant for sending email is not working for me. I have tried sending email 
>> as individual job also but no luck.
>>
>> I installed the email-ext template plugin thinking it will resolve my 
>> issue around triggering emails. However this plugin mandates the email-ext 
>> plugin to upgrade to 1.0 along with which workflow related 
>> plugins(workflow-job and workflow-support) get installed as dependencies. 
>> And then when I trigger any job I keep getting this error:
>>
>> FATAL: jenkins/scm/RunWithSCM
>> java.lang.NoClassDefFoundError: jenkins/scm/RunWithSCM
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
>> at 
>> jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
>> at 
>> hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:878)
>> at 
>> jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
>> at 
>> jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
>> at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
>> at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> at 
>> org.jenkinsci.plugins.workflow.job.WorkflowJob$SCMListenerImpl.onCheckout(WorkflowJob.java:651)
>> at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
>> at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
>> at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
>> at hudson.model.Run.execute(Run.java:1741)
>> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
>> at hudson.model.ResourceController.execute(ResourceController.java:98)
>> at hudson.model.Executor.run(Executor.java:410)
>> Caused by: java.lang.ClassNotFoundException: jenkins.scm.RunWithSCM
>> at 
>> jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
>> at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
>> at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> ... 17 more
>> Email was triggered for: Always
>> Sending email for trigger: Always
>> Sending email to: iqbal.m...@xx.com (sample, while actually 

Re: Kubernetes Plugin 1.2 Agents unable to establish connection to master, but log they can

2018-02-21 Thread brandon
I've downgraded to the 1.2 version of the plugin and gone through the debug 
steps listed here https://github.com/jenkinsci/kubernetes-plugin

No luck. 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b17a41a6-25f2-4aff-906d-b53879d33f0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins motioning

2018-02-21 Thread niristotle okram
How about a hello world page as well? Is that okay

On Mon, Feb 19, 2018 at 11:13 PM vikram reddy 
wrote:

> display details  the of below metrics
>  Pipeline capabilities usage (how many use sonar, how many use nexus, etc)
> How many apps have a pipeline at all
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/6a7e42ba-5ea6-404f-adbf-8ae9f445b7b0%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Sent from mobile device, excuse typos if any.

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


Re: List of git branches using Jenkinsfile parameters

2018-02-21 Thread Stephen Connolly
On 21 February 2018 at 02:03,  wrote:

> I want to selectively build branches. So anything that is committed to
> master is built automatically, but in order to build a specific branch a
> user has to run "build with parameters" and choose the branch to build
>
>
WHY would you want to use multibranch to work that way?

That is not the way multibranch is designed to work.

To get that kind of flow with multibranch you would do the following:

1. Install the Basic Branch Build Strategy plugin
2. Configure the multibranch to only build "master" branch automatically.
3. User wants to build a specific branch, they trigger a build of that
branch by clicking "build" on that branch

No parameter mess, nice clean build history for each branch.


> As for the pipeline job, yes with jenkins groovy dsl. All the parameters
> are defined through the gui and then called by the jobdsl. I want to do it
> all in code as the Jenkinsfile is in scm and automatically added/built
>
> And listing the remote git branches, that's what I am looking for, that's
> my original request. How do I list the branches in the job parameters
> before starting the build?
>
> On Tuesday, 20 February 2018 09:11:45 UTC+11, ok999 wrote:
>>
>> What kind of pipeline job is that? The one with jenkins groovy dsl or the
>> declarative one? How r u listing remote git branches in the job parameters
>> to be selected by a user before starting a build?
>>
>> I haven’t came accoss that feature. And for the multi branch job, wasnt
>> it suppose to build any new branch? Why do u want to select specific branch
>> with it?
>>
>> On Mon, Feb 19, 2018 at 10:13 AM  wrote:
>>
>>> Hmm, I was wondering that myself, but the pipeline job can run and
>>> populate the parameter list at runtime, so I was wondering if/hoping the
>>> multibranch can do the same
>>>
>>>
>>> On Monday, 19 February 2018 15:14:17 UTC+11, ok999 wrote:
>>>
 I dont have much experience with multi branch job types. Nonetheless,
 The below requirement may not be possible unless there is some plugin to do
 so.

 The job / local workspace will not have any idea of remote branches
 before you trigger it. A workaround may be to start the job, create a stage
 that checks out the remote branches, and use the input dsl for a users
 input.







 On Mon, Feb 19, 2018 at 9:33 AM  wrote:

>>> Correct. If I choose to "Build with parameters" I want a Branch
> parameter to list all the branches of that jobs repository, but defined in
> a Jenkinsfile as a multibranch pipeline
>
>
> On Monday, 19 February 2018 14:39:07 UTC+11, ok999 wrote:
>
>> Not sure, if i am following this requirement. Am I understanding it
>> right, if you want to list the remote branches of a repository on jenkins
>> job as a parameters?
>>
>> On Mon, Feb 19, 2018 at 8:43 AM  wrote:
>>
> What I want to be able to do -
>>>
>>> Have a Jenkinsfile that will automatically build a git master branch
>>> if triggered automatically on commit but prompt the user to select from 
>>> a
>>> branch if run manually
>>>
>>> Selecting the master if triggered automatically is no problem using
>>> parameter default value, but I cannot for the life of me figure out a 
>>> way
>>> to populate the branch parameter
>>>
>>> I've looked for a way to use the Git parameters plugin but while
>>> there is plenty of examples on how to use it though the gui with a 
>>> pipeline
>>> script, I cant find any documentation or examples on how to use it with
>>> multibranch/Jenkinsfile using code
>>>
>>> can anyone help with the above, or any other method?
>>>
>>> thanks
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>>
>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to jenkinsci-use...@googlegroups.com.
>>
>>
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/1995eb74-
>>> 988c-4fb2-b972-f849771769c2%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> Sent from mobile device, excuse typos if any.
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/c987a2f1-
>