Re: Having one executor and want to run multiple jobs one by one

2021-04-08 Thread kamthe kirtee
Hi Gianluca,

Apologies that I'm not able to give a reply on that message.

Actually its a client requirement and I have to have achive that
As I'm new to devops and  jenkins  thought of I'm not explained question
properly hence posted again

Thanks a lot for replaying and giving your valuable time Sorry once again I
just missed replying due to as I got caught  in some other things

Thank you

On Thu, 8 Apr, 2021, 8:23 pm ,  wrote:

> Hi,
>
> I’ve already answered to this question.
>
> If you weren’t happy to my reply … starting a new fresh thread won’t help
> anyway.
>
> To be frank … I’m a bit offended that you ignored my replies and started a
> new thread.
>
> Do you think I wouldn’t notice?
>
>
>
> Cheers,
>
> Gianluca.
>
>
>
>
>
> *From:* jenkinsci-users@googlegroups.com 
> *On Behalf Of *kamthe kirtee
> *Sent:* 08 April 2021 15:41
> *To:* jenkinsci-users@googlegroups.com
> *Subject:* Having one executor and want to run multiple jobs one by one
>
>
>
> Suppose I have one slave and one executor
>
> And I have 1 upstream job which triggered 2 downstream jobs
>
>
>
> We want all these 3 jobs should run sequentially
>
> That means if upstream is start running and when it triggerd downstream
> job 1
>
> Upstream job itself should go to queue or somewhere and free their
> executor for downstream job1 and downstream should start running
>
>
>
> How we can achieve this with only one executor?
>
>
>
> I
>
> --
> 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/CAD0fyGgruEnP_Z4b3wx6peGaGwuk1eirnbjQVZ1nsgRbAJMDaA%40mail.gmail.com
> 
> .
>
> --
> 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/030301d72c86%24eb9b1cd0%24c2d15670%24%40gmail.com
> 
> .
>

-- 
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/CAD0fyGigPcKbdGU5pAoRgK-co7WYOJLbjQarjzvQ6sGEjfeYhQ%40mail.gmail.com.


RE: Having one executor and want to run multiple jobs one by one

2021-04-08 Thread gmaxera
Hi,

I’ve already answered to this question.

If you weren’t happy to my reply … starting a new fresh thread won’t help 
anyway.

To be frank … I’m a bit offended that you ignored my replies and started a new 
thread.

Do you think I wouldn’t notice?

 

Cheers,

Gianluca.

 

 

From: jenkinsci-users@googlegroups.com  On 
Behalf Of kamthe kirtee
Sent: 08 April 2021 15:41
To: jenkinsci-users@googlegroups.com
Subject: Having one executor and want to run multiple jobs one by one

 

Suppose I have one slave and one executor

And I have 1 upstream job which triggered 2 downstream jobs

 

We want all these 3 jobs should run sequentially 

That means if upstream is start running and when it triggerd downstream job 1

Upstream job itself should go to queue or somewhere and free their executor for 
downstream job1 and downstream should start running 

 

How we can achieve this with only one executor?

 

I

-- 
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/CAD0fyGgruEnP_Z4b3wx6peGaGwuk1eirnbjQVZ1nsgRbAJMDaA%40mail.gmail.com
 

 .

-- 
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/030301d72c86%24eb9b1cd0%24c2d15670%24%40gmail.com.


Having one executor and want to run multiple jobs one by one

2021-04-08 Thread kamthe kirtee
Suppose I have one slave and one executor
And I have 1 upstream job which triggered 2 downstream jobs

We want all these 3 jobs should run sequentially
That means if upstream is start running and when it triggerd downstream job
1
Upstream job itself should go to queue or somewhere and free their executor
for downstream job1 and downstream should start running

How we can achieve this with only one executor?

I

-- 
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/CAD0fyGgruEnP_Z4b3wx6peGaGwuk1eirnbjQVZ1nsgRbAJMDaA%40mail.gmail.com.


Re: I cannot run Azure CLI commands from jenkins pipeline

2021-04-08 Thread jesus fernandez
it happened to be an issue with the path, as jenkins uses its own path for 
its user I have not declared the path for the right user

El miércoles, 7 de abril de 2021 a las 9:24:44 UTC+2, jesus fernandez 
escribió:

> az is installed as it runs from the cmd, and it also runs if I start 
> jenkins from a non administrator prompt, it just do not work when starting 
> Jenkins from a admin prompt (which I need to)
>
> El martes, 6 de abril de 2021 a las 21:22:06 UTC+2, Martin Schmude 
> escribió:
>
>> Maybe az has not been installed on the system where the job is executed.
>> Or az is not part of the PATH variable in the context of the job 
>> execution.
>> Let the job execute "echo $env:path" before any "az ..." commands, so 
>> that it prints out its path environment variable.
>>
>> jesusfern...@gmail.com schrieb am Dienstag, 6. April 2021 um 13:21:16 
>> UTC+2:
>>
>>> I am trying to run some az commands from a Jenkins pipeline which 
>>> (running in Windows 10) I already used in my laptop´s Jenkins, but when 
>>> trying to use it on another computer (also running w10) I get this error : 
>>> ```
>>> 11:12:47  powershell.exe : az : The term 'az' is not recognized as the 
>>> name of a cmdlet, function, script file, or operable program. Check the 
>>> 11:12:47  At 
>>> C:\Users\User\.jenkins\workspace\playground@tmp\durable-933c3d89\powershellWrapper.ps1:3
>>>  
>>> char:1
>>> 11:12:47  + & powershell -NoProfile -NonInteractive -ExecutionPolicy 
>>> Bypass -Comm ...
>>> 11:12:47  + 
>>> ~
>>> 11:12:47  + CategoryInfo  : NotSpecified: (az : The term 
>>> '...ram. Check the :String) [], RemoteException
>>> 11:12:47  + FullyQualifiedErrorId : NativeCommandError
>>> 11:12:47   
>>> 11:12:47  spelling of the name, or if a path was included, verify that 
>>> the path is correct and try again.
>>> 11:12:47  At 
>>> C:\Users\User\.jenkins\workspace\playground\tmp\durable-933c3d89\powershellScript.ps1:3
>>>  
>>> char:25
>>> 11:12:47  + az devops configure --defaults 
>>> organization=h ...
>>> 11:12:47  + ~~
>>> 11:12:47  + CategoryInfo  : ObjectNotFound: (az:String) [], 
>>> CommandNotFoundException
>>> 11:12:47  + FullyQualifiedErrorId : CommandNotFoundException
>>> 11:12:47   
>>> 11:12:47  az : The term 'az' is not recognized as the name of a cmdlet, 
>>> function, script file, or operable program. Check the 
>>> 11:12:47  spelling of the name, or if a path was included, verify that 
>>> the path is correct and try again.
>>> 11:12:47  At 
>>> C:\Users\User\.jenkins\workspace\playground@tmp\durable-933c3d89\powershellScript.ps1:4
>>>  
>>> char:35
>>> 11:12:47  + $output = az boards work-item show 
>>> --id=89609 ...
>>> 11:12:47  +   ~~
>>> 11:12:47  + CategoryInfo  : ObjectNotFound: (az:String) [], 
>>> CommandNotFoundException
>>> 11:12:47  + FullyQualifiedErrorId : CommandNotFoundException
>>> ```
>>> However running any command from the cmd / powershell works fine. I have 
>>> set the ```Set-ExecutionPolicy Unrestricted``` command but I do not get any 
>>> hint of what is going wrong
>>>
>>

-- 
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/5bcb14dd-b50c-4fe8-a8af-967fb502720an%40googlegroups.com.


error when sending jelly template using email ext plugin with jenkins

2021-04-08 Thread jesus fernandez
I want to send the cppcheck report through email but I had never used the 
email ext plugin before, so I found this  
https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin
 
with a nice jelly template to do so, I have also followed the steps in the 
documentation, to send my own templates in a pipeline job, I have created 
my template with a .jelly extension and set it into my 
```$JENKINS_HOME\email-templates``` although the email-templates folder did 
not exist, so I am not sure if it should be created beforehand just by 
installing the plugin or what I am missing. This is my stage
```
stage('Mail cppcheck report') {
steps{
script{
def mailRecipients = "em...@email.net"
def jobName = currentBuild.fullDisplayName
mimeType: 'text/html'
emailext body: '''${JELLY_SCRIPT, template="custom"}''',
subject: "[Jenkins] ${jobName}",
to: "${mailRecipients}" 
}
}
}
```

And this is the template I want to use but I keep getting the following 
error ``` JellyException: Could not parse Jelly script : null``` even 
though the email is sent the email body is just the error mentioned above.

```





CPPCHECK RESULT
Found: 
${cppcheckResult.report.getNumberTotal()}




```
I have also tried with some other templates and I get no error but I 
receive an empty email instead, like with this one. 
```

  

  


  Summary

#cppcheckStatistics { width: auto; }
#cppcheckStatistics .number { text-align: right; }


  

  Severity
  Count
  Delta

  
  

  Error
  ${cppcheckResult.statistics.getNumberErrorSeverity()}
  ${cppcheckResult.getDiff().getNumberErrorSeverity()}


  Warning
  ${cppcheckResult.statistics.getNumberWarningSeverity()}
  ${cppcheckResult.getDiff().getNumberWarningSeverity()}


  Style
  ${cppcheckResult.statistics.getNumberStyleSeverity()}
  ${cppcheckResult.getDiff().getNumberStyleSeverity()}


  Performance
  ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
  ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}


  Portability
  ${cppcheckResult.statistics.getNumberPortabilitySeverity()}
  ${cppcheckResult.getDiff().getNumberPortabilitySeverity()}


  Information
  ${cppcheckResult.statistics.getNumberInformationSeverity()}
  ${cppcheckResult.getDiff().getNumberInformationSeverity()}


  No category
  ${cppcheckResult.statistics.getNumberNoCategorySeverity()}
  ${cppcheckResult.getDiff().getNumberNoCategorySeverity()}

  
  

  Total
  ${cppcheckResult.report.getNumberTotal()}
  ${cppcheckResult.getDiff().getNumberTotal()}

  

  

  

```

-- 
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/8ea4ff9c-1e1f-4b63-b05c-7b04bad9f310n%40googlegroups.com.


Re: how can I use my own templates with email ext plugin in Jenkins?

2021-04-08 Thread jesus fernandez
I have also tried with some other templates with the same result, if I 
remove the ```mimeType: 'text/html'``` I do not get an error but I get a 
blank email in both cases

El jueves, 8 de abril de 2021 a las 13:02:11 UTC+2, jesus fernandez 
escribió:

> I want to send the cppcheck report through email but I had never used the 
> email ext plugin before, so I found this  
> https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin
>  
> with a nice jelly template to do so, I have also followed the steps in the 
> documentation, to send my own templates in a pipeline job, I have created 
> my template with a .jelly extension and set it into my 
> ```$JENKINS_HOME\email-templates``` although the email-templates folder did 
> not exist, so I am not sure if it should be created beforehand just by 
> installing the plugin or what I am missing. This is my stage
> ```
> stage('Mail cppcheck report') {
> steps{
> script{
> def mailRecipients = "em...@email.net"
> def jobName = currentBuild.fullDisplayName
> 
> emailext body: '''${JELLY_SCRIPT, 
> template="custom"}''',
> subject: "[Jenkins] ${jobName}",
> to: "${mailRecipients}" 
> }
> }
> }
> ```
>
> And this is the template I want to use but I keep getting the following 
> error ``` JellyException: Could not parse Jelly script : null```
>
> ```
>  xmlns:d="jelly:define">
>   
>  value="${it.getAction('org.jenkinsci.plugins.cppcheck.CppcheckBuildAction')}" 
> />
>   
> 
> 
>   Summary
> 
> #cppcheckStatistics { width: auto; }
> #cppcheckStatistics .number { text-align: right; }
> 
> 
>   
> 
>   Severity
>   Count
>   Delta
> 
>   
>   
> 
>   Error
>   ${cppcheckResult.statistics.getNumberErrorSeverity()}
>   ${cppcheckResult.getDiff().getNumberErrorSeverity()}
> 
> 
>   Warning
>   ${cppcheckResult.statistics.getNumberWarningSeverity()}
>   ${cppcheckResult.getDiff().getNumberWarningSeverity()}
> 
> 
>   Style
>   ${cppcheckResult.statistics.getNumberStyleSeverity()}
>   ${cppcheckResult.getDiff().getNumberStyleSeverity()}
> 
> 
>   Performance
>   ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
>   ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}
> 
> 
>   Portability
>   ${cppcheckResult.statistics.getNumberPortabilitySeverity()}
>   ${cppcheckResult.getDiff().getNumberPortabilitySeverity()}
> 
> 
>   Information
>   ${cppcheckResult.statistics.getNumberInformationSeverity()}
>   ${cppcheckResult.getDiff().getNumberInformationSeverity()}
> 
> 
>   No category
>   ${cppcheckResult.statistics.getNumberNoCategorySeverity()}
>   ${cppcheckResult.getDiff().getNumberNoCategorySeverity()}
> 
>   
>   
> 
>   Total
>href="${rooturl}${build.url}cppcheckResult">${cppcheckResult.report.getNumberTotal()}
>href="${rooturl}${build.url}cppcheckResult/source.all/?before=5after=5states=new">${cppcheckResult.getDiff().getNumberTotal()}
> 
>   
> 
>   
> 
>   
> 
> ```
>
>

-- 
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/43b0776a-7903-46fb-96b6-ef1b73db27can%40googlegroups.com.


how can I use my own templates with email ext plugin in Jenkins?

2021-04-08 Thread jesus fernandez
I want to send the cppcheck report through email but I had never used the 
email ext plugin before, so I found this  
https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin
 
with a nice jelly template to do so, I have also followed the steps in the 
documentation, to send my own templates in a pipeline job, I have created 
my template with a .jelly extension and set it into my 
```$JENKINS_HOME\email-templates``` although the email-templates folder did 
not exist, so I am not sure if it should be created beforehand just by 
installing the plugin or what I am missing. This is my stage
```
stage('Mail cppcheck report') {
steps{
script{
def mailRecipients = "em...@email.net"
def jobName = currentBuild.fullDisplayName

emailext body: '''${JELLY_SCRIPT, template="custom"}''',
subject: "[Jenkins] ${jobName}",
to: "${mailRecipients}" 
}
}
}
```

And this is the template I want to use but I keep getting the following 
error ``` JellyException: Could not parse Jelly script : null```

```

  

  


  Summary

#cppcheckStatistics { width: auto; }
#cppcheckStatistics .number { text-align: right; }


  

  Severity
  Count
  Delta

  
  

  Error
  ${cppcheckResult.statistics.getNumberErrorSeverity()}
  ${cppcheckResult.getDiff().getNumberErrorSeverity()}


  Warning
  ${cppcheckResult.statistics.getNumberWarningSeverity()}
  ${cppcheckResult.getDiff().getNumberWarningSeverity()}


  Style
  ${cppcheckResult.statistics.getNumberStyleSeverity()}
  ${cppcheckResult.getDiff().getNumberStyleSeverity()}


  Performance
  ${cppcheckResult.statistics.getNumberPerformanceSeverity()}
  ${cppcheckResult.getDiff().getNumberPerformanceSeverity()}


  Portability
  ${cppcheckResult.statistics.getNumberPortabilitySeverity()}
  ${cppcheckResult.getDiff().getNumberPortabilitySeverity()}


  Information
  ${cppcheckResult.statistics.getNumberInformationSeverity()}
  ${cppcheckResult.getDiff().getNumberInformationSeverity()}


  No category
  ${cppcheckResult.statistics.getNumberNoCategorySeverity()}
  ${cppcheckResult.getDiff().getNumberNoCategorySeverity()}

  
  

  Total
  ${cppcheckResult.report.getNumberTotal()}
  ${cppcheckResult.getDiff().getNumberTotal()}

  

  

  

```

-- 
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/276b13fb-4be3-4fc3-8268-4c7ea2ddd3b7n%40googlegroups.com.