Build Artifacts

570 views
Skip to first unread message

Matt

unread,
Oct 10, 2011, 3:30:13 PM10/10/11
to Jenkins Users
I'm new to using Jenkins, and really CI in general, but I'm trying to
get a .Net web project built and deployed. I've got the latest
version of Jenkins (1.434 right now) installed and running as windows
service. I've setup a new project and configured it to be built on-
demand (no scc integration) using the MSBuild plugin (located:
http://wiki.jenkins-ci.org/display/JENKINS/MSBuild+Plugin )

The build seems to complete successfully, but I can't find what it
built. If I browse the JENKINS_HOME/jobs/<project> I can see builds
and workspace folder, and the builds folder is populated, but I've
never seen anything in workspace. I tried using the built in "archive
artifacts" option with no success. This fails the build stating "No
artifacts found that match the file pattern "**""

I've also tried using the ArtifactDeployer plugin (located:
https://wiki.jenkins-ci.org/display/JENKINS/ArtifactDeployer+Plugin )
but it basically states the same thing by printing: [ArtifactDeployer]
- 0 file(s) have been copied from the workspace to 'd:\publish'. I've
also tried to setup a custom workspace, but that seems to make no
difference.

I can't seem to find where any of these build artifacts are created?
I recall reading that there was a workspace cleanup process, is it
really just creating and deleting them before I see them? If so, why
wouldn't ArtifactDeployer see them as it's tied directly in as a build
step?

UPDATE - I turned on logging for Jenkins itself and see numerous
events similar to:

FINEST: Failed to check environment variable match
org.jvnet.winp.WinpException: Failed to read environment variable
table error=299 at .\envvar-cmdline.cpp:114
at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:
114)
at org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:
109)
at hudson.util.ProcessTree$Windows
$1.getEnvironmentVariables(ProcessTree.java:426)
at hudson.util.ProcessTree
$OSProcess.hasMatchingEnvVars(ProcessTree.java:266)
at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:448)
at hudson.Launcher$LocalLauncher.kill(Launcher.java:730)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:
483)
at hudson.model.Run.run(Run.java:1404)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:
88)
at hudson.model.Executor.run(Executor.java:230)

From what I see on this post:
http://jenkins.361315.n4.nabble.com/Re-hudson-util-ProcessTreeTest-test-error-td2269355.html
I wonder if this is maybe a windows specific problem? I could setup a
linux master server, but since I'm using MSBuild for .Net, I believe
I'd still need a Windows build/slave - and therefore I would still
have the same problem?

Thanks for any guidance you can provide, I've not been able to find
many good/current resources for getting all this setup - any
walkthroughs or articles would be nice too!

Matt

Grégory Boissinot

unread,
Oct 10, 2011, 4:19:10 PM10/10/11
to jenkins...@googlegroups.com
Before using the native Jenkins artifact archiver or the ArtifactDeployer plugin, you have to make sure the executables are generated.
Browse your workspace by the UI or by the filesystem (JENKINS_HOME/jobs/<job_name>/workspace).
If you don't see anything, you have to look at your build step with the msbuild tool.
Maybe look at your .NET solution (.sln)?

Matt Klinker

unread,
Oct 10, 2011, 4:23:52 PM10/10/11
to jenkins...@googlegroups.com
Thanks for the quick reply!  I've never been able to see any artifacts within the workspace, custom or otherwise.  From your statement, it sounds like you're saying this build process itself isn't completing?  I've gone to view the console output of the build and see msbuild compiling all the items, but it never says an output.

Other reading I've done makes me believe the workspace is where code is checked out to before building?  Since I don't have this connected to any source provider, I thought the build output would be my normal project/bin folder, but that doesn't appear to be updated either.

Thanks again, appreciate any feedback!

Matt


Matt

unread,
Oct 11, 2011, 12:41:21 AM10/11/11
to Jenkins Users
I don't really think this is much of a solution, but for now I believe
I can work around this by passing a output path parameter to msbuild.
Here's a generic version that should work for any project, hope it
helps.

/p:OutputPath=%JENKINS_HOME%\jobs\%JOB_NAME%\workspace

Matt

On Oct 10, 2:23 pm, Matt Klinker <mklin...@gmail.com> wrote:
> Thanks for the quick reply!  I've never been able to see any artifacts
> within the workspace, custom or otherwise.  From your statement, it sounds
> like you're saying this build process itself isn't completing?  I've gone to
> view the console output of the build and see msbuild compiling all the
> items, but it never says an output.
>
> Other reading I've done makes me believe the workspace is where code is
> checked out to before building?  Since I don't have this connected to any
> source provider, I thought the build output would be my normal project/bin
> folder, but that doesn't appear to be updated either.
>
> Thanks again, appreciate any feedback!
>
> Matt
>
> On Oct 10, 2011, at 2:19 PM, "Grégory Boissinot" <
>
> >http://jenkins.361315.n4.nabble.com/Re-hudson-util-ProcessTreeTest-te...

Grégory Boissinot

unread,
Oct 11, 2011, 7:46:46 AM10/11/11
to jenkins...@googlegroups.com
And with this parameter, do you have the expected output?
Then you can archive them or publish them.

Ahmet Maruf Aytekin

unread,
Oct 11, 2011, 7:55:36 AM10/11/11
to jenkins...@googlegroups.com

Hi All

 

Is there a way to pass maven project version number to Jenkins build as an environment variable etc.?

 

I checked th eplugins but it seems there is no plugin for this.

 

I need to pas sproject version number to “Aggregate the archived artifacts” plugin as the name of Shared directory.

 

Many thanks

Maruf

 



Bu mesaj ve ekleri mesajda gönderildiği belirtilen kişi/kişilere özeldir ve gizlidir. Bu mesaj tarafınıza yanlışlıkla ulaşmış olsa da mesaj içeriğinin gizliliği ve bu gizlilik yükümlülüğüne uyulması zorunluluğu tarafınız için de söz konusudur. Böyle bir durumda, lütfen gönderen kişiyi bilgilendiriniz ve mesajı sisteminizden siliniz. Mesaj ve eklerinde yer alan bilgilerin doğruluğu ve güncelliği konusunda gönderenin ya da Merkezi Kayıt Kuruluşu A.Ş.'nin herhangi bir sorumluluğu bulunmamaktadır. Merkezi Kayıt Kuruluşu A.Ş. mesajın ve bilgilerinin size değisikliğe uğrayarak veya geç ulaşmasından, bütünlüğünün ve gizliliğinin bozulmasından, virus içermesinden ve bilgisayar sisteminize verebileceği herhangi bir zarardan sorumlu tutulamaz.

This message and attachments are confidential and intended solely for the individual(s) stated in this message.If you received this message although you are not the addressee you are responsible to keep confidential the message. In that case please inform the sender and delete the message. The sender has no responsibility for the accuracy or correctness of the information in the message and its attachments. Merkezi Kayit Kurulusu A.S. shall have no liability for any changes or late receiving,loss of integrity and confidentiality, viruses and any damages caused in any way to your computer system.


Matt

unread,
Oct 11, 2011, 11:04:01 AM10/11/11
to Jenkins Users
Yep, sorry for not making that clear. Once the build was actually
creating artifacts within the workspace, everything else worked like a
charm.

Thanks for the help,
Matt

On Oct 11, 5:46 am, Grégory Boissinot <gregory.boissi...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages