Re: Techniques for managing an scp call to a remote box, with a specific principal

2016-12-11 Thread David Karr


On Sunday, December 11, 2016 at 1:05:19 PM UTC-8, Rachel Moreno wrote:
>
> Hi David,
>
> I don't know if I've understood what you really need, but please, take a 
> look at:
>
>- https://wiki.jenkins-ci.org/display/JENKINS/SCP+plugin
>- https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+SSH+Plugin
>
> For example, if you have a user/password you can choose "Use password 
> authentication" to configure access to remote location and then sending 
> files.
>

Yes, I've seen those two plugins, but I don't understand how I would use 
either of these from a pipeline job.

On Friday, December 9, 2016 at 11:57:00 PM UTC+1, David Karr wrote:
>
> This mostly isn't a Jenkins question, but I would think many people here 
> would have to deal with this kind of situation.
>
> I have a Jenkins pipeline job that produces a javadoc jar (among other 
> products). I'm going to need to deploy that content into a directory tree 
> on a remote box (using some variation of "scp", I assume), where the 
> directory is owned by a particular non-root user, and this directory is a 
> mapped volume to a Docker container running an apache instance.
>
> I do have a "mechanical id" (you might call it a service account) that I 
> use for automation tasks in bitbucket and jenkins. It presently isn't able 
> to log into my javadoc box, but I have root rights on the box, so I could 
> modify that.
>
> I imagine I'll need to create an ssh key to use for this. Does that make 
> sense here?
>

-- 
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/140cfb7a-bbaf-4172-84b2-c98ae4dace58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to customize the email based on attachments?

2016-12-11 Thread Rachel Moreno
Hi Jyo,

If you install Email-ext plugin 
 you'll have 
this section available when adding an *Editable Email Notification* in a 
job (*Advanced settings*):



*Pre-send Script*

*This script will be run prior to sending the email to allow modifying the 
email before sending. The MimeMessage variable is "msg," the build is also 
available as "build" and a logger is available as "logger." You may also 
cancel sending the email by setting the boolean variable "cancel" to true. *

I hope be useful.

Best regards,
Rachel



On Friday, December 9, 2016 at 6:25:14 PM UTC+1, jsel...@gmail.com wrote:
>
> Hello Friends,
>
> I am new to Jenkins and configuring a job to run my automated selenium 
> tests and have a need to send the email based on my build result and 
> attachments.
>
>
> Current Scenario - After my test run , i am attaching an .xml file and 
> screenshots to the email notification. 
>
>
> Content Type : Default Content Type
> Default Subject : Smoke Test build results
> Default Content : Attached is the html report for smoke tests and screen 
> shots of failed tests.
>
> Attachments:/target/surefire-reports/emailable-report.html,xt/target/surefire-reports/screenshots/*.png
>
>
> My requirements : 
>
> 1. If there is attachment and no screen shots , i need default content to 
> be and only attachment location.
>
> Default Content : Attached is the html report for smoke tests 
>
> Attachments:/target/surefire-reports/emailable-report.html,xt/target/surefire-reports/screenshots/*.png111
>
>
> 2. If there is no attachement and screenshots , default content should be 
>
> Default Content : Configuration issues , attachment missing.
>
>
>
>
> Any help is appreciated. 
>
> Thanks
> Jyo
>

-- 
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/9899d2ce-75af-4f21-8c6b-9ed7c0a1b5d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Techniques for managing an scp call to a remote box, with a specific principal

2016-12-11 Thread Rachel Moreno
Hi David,

I don't know if I've understood what you really need, but please, take a 
look at:

   - https://wiki.jenkins-ci.org/display/JENKINS/SCP+plugin
   - https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+SSH+Plugin

For example, if you have a user/password you can choose "Use password 
authentication" to configure access to remote location and then sending 
files.

I hope be useful.

Best regards,
Rachel

On Friday, December 9, 2016 at 11:57:00 PM UTC+1, David Karr wrote:
>
> This mostly isn't a Jenkins question, but I would think many people here 
> would have to deal with this kind of situation.
>
> I have a Jenkins pipeline job that produces a javadoc jar (among other 
> products). I'm going to need to deploy that content into a directory tree 
> on a remote box (using some variation of "scp", I assume), where the 
> directory is owned by a particular non-root user, and this directory is a 
> mapped volume to a Docker container running an apache instance.
>
> I do have a "mechanical id" (you might call it a service account) that I 
> use for automation tasks in bitbucket and jenkins. It presently isn't able 
> to log into my javadoc box, but I have root rights on the box, so I could 
> modify that.
>
> I imagine I'll need to create an ssh key to use for this. Does that make 
> sense here?
>

-- 
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/d57b6338-35ae-4c8a-a0d5-4dd1e302ecea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline : slave throws an exception on trying to create a tmp folder, despite creating the workspace and a subfolder just fine

2016-12-11 Thread Jonathan Hodgson
Further to the above.

I just forced it to run multiple builds simultaneously, and it generates 
new folders for them as pipeline-test2@2 and pipelin-test2@3.

So the @ symbol is most certainly not the issue.

On Sunday, December 11, 2016 at 7:23:01 PM UTC, Jonathan Hodgson wrote:
>
>
>
> On Sunday, December 11, 2016 at 4:36:24 PM UTC, Daniel Beck wrote:
>>
>> Is this a file system that doesn't like the @ character? 
>>
>
> Seems unlikely, since
>
> 1) I created the folder manually without issue (and then things worked 
> correctly)
> 2) Jenkins previously created those folders just fine, this issue seems to 
> have popped up out of nowhere
> 3) Jenkins also failed to create C:\Jenkins2\worspace  (despite having 
> previously created C:\Jenkins'workspace just fine)
> 4) If I run the slave on another windows system (albeit 10 rather than 7) 
> it works as it should.
>
>
>>

-- 
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/ec9daa57-334e-486b-9f94-71181d87c7a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline : slave throws an exception on trying to create a tmp folder, despite creating the workspace and a subfolder just fine

2016-12-11 Thread Jonathan Hodgson


On Sunday, December 11, 2016 at 4:36:24 PM UTC, Daniel Beck wrote:
>
> Is this a file system that doesn't like the @ character? 
>

Seems unlikely, since

1) I created the folder manually without issue (and then things worked 
correctly)
2) Jenkins previously created those folders just fine, this issue seems to 
have popped up out of nowhere
3) Jenkins also failed to create C:\Jenkins2\worspace  (despite having 
previously created C:\Jenkins'workspace just fine)
4) If I run the slave on another windows system (albeit 10 rather than 7) 
it works as it should.


>

-- 
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/6de76b62-fc84-4864-ba78-c7e2eca236d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Maven project not showing JUnit tests' report?

2016-12-11 Thread Jeff
Nevermind. The user did not have his test methods named properly.

On Thursday, December 8, 2016 at 3:17:06 PM UTC-5, Jeff wrote:
>
> Jenkins 2.15 (production) and 2.19.4 (test box).
>
> We're stumped. Our *successful* build of a Maven project is not showing 
> any test results report. The console output for the build shows:
>
> [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ ALCParser ---
> [JENKINS] Recording test results
> Yet there are no test results or trend graph shown in the build's page.
>
> The content at 
> https://wiki.jenkins-ci.org/display/JENKINS/Building+a+maven2+project says:
>
>
>
>
> *The Maven Integration plugin understands the POMand knows about specific 
> Maven testing plug-ins,such as 
> org.apache.maven.plugins:maven-surefire-plugin,org.eclipse.tycho:tycho-surefire-plugin,
>  etc.*
>
> Does anyone have any ideas?
>
>
>

-- 
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/405745cb-fc11-462e-8b8f-eda770787827%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: HTML report between different jobs ??

2016-12-11 Thread Albert Shamsiyan
not that i enjoy heart my self, yet, using the default value in the html 
publish widget (on testing job) - i can see the following log at very 
button: 

*[htmlpublisher] Archiving at BUILD level 
D:\JenkinsSlave\workspace\**My_Test_job** to 
/local/apps/My_Name/.jenkins/jobs/My_Test_job/builds/383/htmlreports/HTML_Report*


I wonder if I can execute simple shell script to copy file from:

*/local/apps/My_Name/.jenkins/jobs/My_Test_job/builds/383/htmlreports/HTML_Report*

*To: *

*/local/apps/My_Name/.jenkins/jobs/My_Deply_job/builds*


???


On Sunday, December 11, 2016 at 6:53:46 PM UTC+2, Daniel Beck wrote:
>
>
> > On 11.12.2016, at 17:50, Albert Shamsiyan  > wrote: 
> > 
> > managed by the same master, any way to configure the Test to "place" the 
> html report in the Deploy job directory ??? 
>
> If you enjoy implementing a 'worst practice', sure. Of course this will 
> make it much more difficult to grow your Jenkins (both security and 
> scalability suffer), and some plugins (like Compress Artifacts Plugin) will 
> simply not be compatible with this approach. 
>
>

-- 
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/33deddc5-d131-4a38-9eb1-44c4932a1ed1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: HTML report between different jobs ??

2016-12-11 Thread Daniel Beck

> On 11.12.2016, at 17:50, Albert Shamsiyan  wrote:
> 
> managed by the same master, any way to configure the Test to "place" the html 
> report in the Deploy job directory ??? 

If you enjoy implementing a 'worst practice', sure. Of course this will make it 
much more difficult to grow your Jenkins (both security and scalability 
suffer), and some plugins (like Compress Artifacts Plugin) will simply not be 
compatible with this approach.

-- 
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/C5BFD6B4-F1C5-483F-A57F-1AD198DFCDB5%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: HTML report between different jobs ??

2016-12-11 Thread Albert Shamsiyan
Daniel,

Since both Deploy AND Test are managed by the same master, any way to 
configure the Test to "place" the html report in the Deploy job directory 
??? 

On Sunday, December 11, 2016 at 6:34:12 PM UTC+2, Daniel Beck wrote:
>
> If you use the Parameterized Trigger plugin, you could use the build step 
> it provides, which allows waiting for the downstream job to finish. 
>
> Then just configure downstream to archive the report as artifacts, copy 
> its artifacts (Copy Artifacts Plugin, or Jenkins HTTP API) and create an 
> HTML report in the upstream build. 
>
> Of course a side effect is that the deploy job won't actually finish until 
> the downstream job is finished. 
>
> > On 11.12.2016, at 11:55, Albert Shamsiyan  > wrote: 
> > 
> > I have multiple deployment jobs which executes the same downstream 
> testing job. 
> > I would like to attach the HTML report generated by the Testing job to 
> the build report of the upstream deployment job. Is it possible ? How ? 
> > 
> > Example: 
> > 
> > Deploy_Dev -> AutoamtedTest  (Environemt=Dev) 
> > Deploy_QA -> AutoamtedTest   (Environemt=Qa) 
> > Deploy_PQA -> AutoamtedTest (Environemt=PQA) 
> > 
> > in the example above, AutmatedTest build report will show the HTML 
> report per each build, I would like to be able attaching this report to the 
> upstream build report as well  
> > 
> > Note: All jobs using the same master, yet, not necessary they will shall 
> be executed in the same slave ..   
> > 
> > THX.   
> > 
> > -- 
> > 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/1b2d6ae8-75e6-4c28-8d4e-4feadb30ca87%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/e633a148-9ecb-4209-8145-bb6c562d0f23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline : slave throws an exception on trying to create a tmp folder, despite creating the workspace and a subfolder just fine

2016-12-11 Thread Daniel Beck
Is this a file system that doesn't like the @ character?

Set the system property hudson.slaves.WorkspaceList to e.g. _ to use a 
different separator as described on 
https://wiki.jenkins-ci.org/display/JENKINS/Features+controlled+by+system+properties


> On 11.12.2016, at 14:30, Jonathan Hodgson  wrote:
> 
> Ok, adding to the confusion...
> 
> I just tried changing the slave configuration to give a compleely new  root 
> folder (C:\Jenkins2 rather than C:\Jenkins)
> 
> Ran the same same job
> 
> Failed to mkdirs: C:\Jenkins2\workspace\pipeline-test2
> hudson.FilePath.mkdirs(FilePath.java:1169)
> org.jenkinsci.plugins.durabletask.FileMonitoringTask$FileMonitoringController.(FileMonitoringTask.java:99)
> org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.(WindowsBatchScript.java:94)
> org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.(WindowsBatchScript.java:92)
> org.jenkinsci.plugins.durabletask.WindowsBatchScript.doLaunch(WindowsBatchScript.java:60)
> org.jenkinsci.plugins.durabletask.FileMonitoringTask.launchWithCookie(FileMonitoringTask.java:66)
> org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:61)
> 
> 
> 
> As you can see, now it's failing to create the job workspace folder, in fact 
> looking on the slave I see it has failed to create the Jenkins2 filder so I 
> just tried the following...
> 
> 1) manually created C:\Jenkins2
> 
> - Job failed with same stack trace
> 2) Manually created C:\Jenkins2\workspace
> 
> - Job failed with different stackl trace
> 
> 
> Failed to mkdirs: C:\Jenkins2\workspace\pipeline-test2@tmp\durable-e94accb0
> hudson.FilePath.mkdirs(FilePath.java:1169)
> org.jenkinsci.plugins.durabletask.FileMonitoringTask$FileMonitoringController.(FileMonitoringTask.java:101)
> org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.(WindowsBatchScript.java:94)
> org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.(WindowsBatchScript.java:92)
> org.jenkinsci.plugins.durabletask.WindowsBatchScript.doLaunch(WindowsBatchScript.java:60)
> org.jenkinsci.plugins.durabletask.FileMonitoringTask.launchWithCookie(FileMonitoringTask.java:66)
> org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:61)
> org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:158)
> 
> And when I look, I see it has created pipeline-test2!
> 
> So, I can only conclude that the slave creates pipeline-test2 via a different 
> mechanism to either C:\Jenkins2\workspace or pipeline-test2@tmp
> 
> -- 
> 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/6233493b-0b4e-44df-98ff-df7ca47f8f46%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/BAA615F5-1AC4-46EE-B971-7E0A99086970%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: HTML report between different jobs ??

2016-12-11 Thread Daniel Beck
If you use the Parameterized Trigger plugin, you could use the build step it 
provides, which allows waiting for the downstream job to finish.

Then just configure downstream to archive the report as artifacts, copy its 
artifacts (Copy Artifacts Plugin, or Jenkins HTTP API) and create an HTML 
report in the upstream build.

Of course a side effect is that the deploy job won't actually finish until the 
downstream job is finished.

> On 11.12.2016, at 11:55, Albert Shamsiyan  wrote:
> 
> I have multiple deployment jobs which executes the same downstream testing 
> job. 
> I would like to attach the HTML report generated by the Testing job to the 
> build report of the upstream deployment job. Is it possible ? How ? 
> 
> Example: 
> 
> Deploy_Dev -> AutoamtedTest  (Environemt=Dev)
> Deploy_QA -> AutoamtedTest   (Environemt=Qa)
> Deploy_PQA -> AutoamtedTest (Environemt=PQA)
> 
> in the example above, AutmatedTest build report will show the HTML report per 
> each build, I would like to be able attaching this report to the upstream 
> build report as well  
> 
> Note: All jobs using the same master, yet, not necessary they will shall be 
> executed in the same slave ..  
> 
> THX.  
> 
> -- 
> 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/1b2d6ae8-75e6-4c28-8d4e-4feadb30ca87%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/F7E65CD9-3BCE-4294-9514-6B43B08C314D%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline : slave throws an exception on trying to create a tmp folder, despite creating the workspace and a subfolder just fine

2016-12-11 Thread Jonathan Hodgson

>
> Ok, adding to the confusion...
>

I just tried changing the slave configuration to give a compleely new  root 
folder (C:\Jenkins2 rather than C:\Jenkins)

Ran the same same job

Failed to mkdirs: C:\Jenkins2\workspace\pipeline-test2
hudson.FilePath.mkdirs(FilePath.java:1169)
org.jenkinsci.plugins.durabletask.FileMonitoringTask$FileMonitoringController.(FileMonitoringTask.java:99)
org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.(WindowsBatchScript.java:94)
org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.(WindowsBatchScript.java:92)
org.jenkinsci.plugins.durabletask.WindowsBatchScript.doLaunch(WindowsBatchScript.java:60)
org.jenkinsci.plugins.durabletask.FileMonitoringTask.launchWithCookie(FileMonitoringTask.java:66)
org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:61)




As you can see, now it's failing to create the job workspace folder, in 
fact looking on the slave I see it has failed to create the Jenkins2 filder 
so I just tried the following...

1) manually created C:\Jenkins2

- Job failed with same stack trace
2) Manually created C:\Jenkins2\workspace

- Job failed with different stackl trace


Failed to mkdirs: C:\Jenkins2\workspace\pipeline-test2@tmp\durable-e94accb0
hudson.FilePath.mkdirs(FilePath.java:1169)
org.jenkinsci.plugins.durabletask.FileMonitoringTask$FileMonitoringController.(FileMonitoringTask.java:101)
org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.(WindowsBatchScript.java:94)
org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.(WindowsBatchScript.java:92)
org.jenkinsci.plugins.durabletask.WindowsBatchScript.doLaunch(WindowsBatchScript.java:60)
org.jenkinsci.plugins.durabletask.FileMonitoringTask.launchWithCookie(FileMonitoringTask.java:66)
org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:61)
org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:158)


And when I look, I see it has created pipeline-test2!

So, I can only conclude that the slave creates pipeline-test2 via a 
different mechanism to either C:\Jenkins2\workspace or pipeline-test2@tmp

-- 
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/6233493b-0b4e-44df-98ff-df7ca47f8f46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pipeline : slave throws an exception on trying to create a tmp folder, despite creating the workspace and a subfolder just fine

2016-12-11 Thread Jonathan Hodgson
I tried a couple of experiments today.

Launching a cmd windows as an administrator and running the slave from 
there... no difference.

Manually created the pipeline-test2@tmp directory - build was successful

Deleted both pipeline-test2 and pipeline-test2@tmp and ran build - jenkins 
recreated pipeline-test2 but failed to create pipeline-test2@tmp

Tried running the slave on a different windows machine (running WIndows 10, 
it's my development laptop) - build was successful

This has me confused. The fact that it's different on two different 
machines makes me think permisssions.

But if permissions allow the creation of pipeline-test2 by the slave, they 
should also allow the creation of pipeline-test2@tmp right next to it 
surely?

On Thursday, December 8, 2016 at 5:59:15 PM UTC, Jonathan Hodgson wrote:
>
> Hi,
>
> I've been experiementing trying to get some information which might give a 
> clue to the issues I'm having with my Windows slave.
>
> It's rather confusing, since to start with it worked fine. and the errors 
> aren't consistent (looking for past logs I see an error with unstashing 
> which I don't seem to be getting now).
>
> Anyway, I created a pipeline with this groovy script
>
> @NonCPS def printException(err)
> {
> message = err.getMessage()
> stacktrace = err.getStackTrace()
> stacktrace.each { stackElem ->
> message += "\n" + stackElem.toString()
> }
> print message
> }
>
> def batch(platform)
> {
> try {
> if (isUnix())
> {
> sh script:"echo running shell script"
> }
> else
> {
> bat script:"echo running batch script"
> }
> echo "Batch file ran ok"
> }
> catch (Exception err)
> {
> echo "Failed to run batch file on $platform"
> printException(err)
> }
> }
>
> def dirStep(platform)
> {
> try {
> dir ("mySubDirectory")
> {
> echo "In subdirectory"
> writeFile file:"mySubFile.txt", text:"this is a file in 
> $platform"
> }
> }
> catch (Exception err)
> {
> echo "Failed enter subdirectory on $platform"
> printException(err)
> } 
> }
>
> def writeFileStep(platform)
> {
> try {
> writeFile file:"myFile.txt", text:"this is a file in $platform"
> echo "wrote File on $platform"
> }
> catch (Exception err)
> {
> echo "Failed to create file on $platform"
> printException(err)
> }   
> }
>
> def testUnstash(platform)
> {
>  try {
> unstash "myStash"
> echo "instashed on $platform"
> }
> catch (Exception err)
> {
> echo "Failed to unstash on $platform"
> printException(err)
> }  
> }
>
> def runTests(nodeID)
> {
> node (nodeID)
> {
> batch(nodeID)
> writeFileStep(nodeID)
> dirStep(nodeID)
> testUnstash(nodeID)
> }
> }
>
> stage("testing")
> {
> node ("master")
> {
> writeFile file:"toStash.txt",text:"Testing stashing and unstashing"
> stash name:"myStash", include:"toStash.txt"
> }
> runTests("master")
> runTests("XCode")
> runTests("VS2013")
> }
>
>
> And when I run it, everything seems to work fine, except for the batch 
> file step on windows. which gives an error related to MkDir
>
> Started by user Jonathan Hodgson 
> [Pipeline] 
> stage[Pipeline] { (testing)[Pipeline] nodeRunning on master in 
> /var/lib/jenkins/workspace/pipeline-test2[Pipeline] {[Pipeline] 
> writeFile[Pipeline] stashStashed 3 file(s)[Pipeline] }[Pipeline] // 
> node[Pipeline] nodeRunning on master in 
> /var/lib/jenkins/workspace/pipeline-test2[Pipeline] {[Pipeline] 
> isUnix[Pipeline] sh[pipeline-test2] Running shell script
> + echo running shell script
> running shell script[Pipeline] echoBatch file ran ok[Pipeline] 
> writeFile[Pipeline] echowrote File on master[Pipeline] dirRunning in 
> /var/lib/jenkins/workspace/pipeline-test2/mySubDirectory[Pipeline] 
> {[Pipeline] echoIn subdirectory[Pipeline] writeFile[Pipeline] }[Pipeline] // 
> dir[Pipeline] unstash[Pipeline] echoinstahsed on master[Pipeline] }[Pipeline] 
> // node[Pipeline] nodeRunning on iMac in 
> /Users/jon/jenkins/workspace/pipeline-test2[Pipeline] {[Pipeline] 
> isUnix[Pipeline] sh[pipeline-test2] Running shell script
> + echo running shell script
> running shell script[Pipeline] echoBatch file ran ok[Pipeline] 
> writeFile[Pipeline] echowrote File on XCode[Pipeline] dirRunning in 
> /Users/jon/jenkins/workspace/pipeline-test2/mySubDirectory[Pipeline] 
> {[Pipeline] echoIn subdirectory[Pipeline] writeFile[Pipeline] }[Pipeline] // 
> dir[Pipeline] unstash[Pipeline] echoinstahsed on XCode[Pipeline] }[Pipeline] 
> // node[Pipeline] nodeRunning on Asus K51 in 
> C:\Jenkins\workspace\pipeline-test2[Pipeline] {[Pipeline] isUnix[Pipeline] 
> bat[Pipeline] echoFailed to run batch file on VS20

Re: Pipeline: Hos to test them locally

2016-12-11 Thread Victor Martinez
I'll follow that jira ticket then. Thanks Michael

On Saturday, 10 December 2016 18:00:10 UTC, Michael Kobit wrote:
>
> You can use the "Replay" option, which might help you iterate a little bit 
> faster. There isn't really a good way to test and validate that your 
> pipeline is correct other than just running it.
>
> https://issues.jenkins-ci.org/browse/JENKINS-33925 is open for a test 
> framework for Jenkinsfile.
>
> On Fri, Dec 9, 2016 at 1:20 AM Victor Martinez  > wrote:
>
>> Hi there,
>>
>> Just wondering if there is any new supported feature of testing 
>> Jenkinsfile, aka pipelines, locally, if so, where can i find some 
>> examples/docs? I want to get rid of the manual and tedious process of 
>> pushing changes to my repo then look at the jebkibs job andsee whether it 
>> does what i coded. I'd like to speed up my development with lets say some 
>> TDD. If no, will it be supported in the near future? Or it doesnt make 
>> sense?
>>
>> Thanks guys
>>
>> --
>> 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/c6122b07-85f3-407b-8e81-ae23651e0b27%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/ffbacbcc-a6db-4b52-966a-df8d0a0b88e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


HTML report between different jobs ??

2016-12-11 Thread Albert Shamsiyan
I have multiple deployment jobs which executes the same downstream testing 
job. 
I would like to attach the HTML report generated by the Testing job to the 
build report of the upstream deployment job. Is it possible ? How ? 

Example: 

Deploy_Dev -> AutoamtedTest  (Environemt=Dev)
Deploy_QA -> AutoamtedTest   (Environemt=Qa)
Deploy_PQA -> AutoamtedTest (Environemt=PQA)

in the example above, AutmatedTest build report will show the HTML report 
per each build, I would like to be able attaching this report to the 
upstream build report as well  

Note: All jobs using the same master, yet, not necessary they will shall be 
executed in the same slave ..  

THX.  

-- 
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/1b2d6ae8-75e6-4c28-8d4e-4feadb30ca87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.