Using Jenkins to publish tar.gz to Nexus

185 views
Skip to first unread message

Jason Tran

unread,
Oct 14, 2015, 5:07:04 PM10/14/15
to Jenkins Users
Hello there,

This is problem I am trying to solve:

1. checkout code from Github to a local directory D
2. run configure command inside directory D
3. create a tar.gz for directory
4. upload taz.gz file to Nexus

I am stuck at step 3:
- I can specify the verison in Maven pom.xml file, but is there a way to automatically create a build version every time Jenkins is run?
- If I specify <packaging>tar.gz</packaging> in pom.xml file, I would get: Unknown packaging: gz @ line 6, column 13


If I specify jar inside packaging, there is no error, and files are upload to Nexus successfully.

Any advice would help, thanks!

Vincent Latombe

unread,
Oct 15, 2015, 6:23:14 AM10/15/15
to Jenkins Users
Hi Jason,

your questions are related to Maven usage, and they were kindly answered by other folks in the other thread (even if this should be a thread on the maven-users mailing list). The only thing that may be Jenkins-specific is that Jenkins provides you with an environment variable BUILD_NUMBER containing the build number. (hint, use versions-maven-plugin). If you want more fancy versioning system, you can have a look at https://wiki.jenkins-ci.org/display/JENKINS/Version+Number+Plugin .

Cheers,

Vincent

--
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/97610ea9-04c6-4d8d-b4c8-e49488b38131%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages