TFS Java Build to Octopus

nitin.gautam's Avatar

nitin.gautam

12 May, 2017 07:38 PM

Hi,

I am new and trying to configure Octpus so that it read Feed from my TFS build server. But it is not identifying my Zip file. I tried creating a zip using Octo.exe that also it not listing when trying to test Feed path.

What I am missing?

Is there a way i can push this code straight from server to server? Or how to identify my java pack in feed?

Thanks

  1. Support Staff 1 Posted by Dalmiro Grañas on 12 May, 2017 09:02 PM

    Dalmiro Grañas's Avatar

    Hi,

    Thanks for reaching out! Octopus can work with zip files only when they are on its own built-in Nuget feed. Since you are using the feed from your TFS build server, you'll need to package them into Nuget packages.

    Luckly for you Octo.exe can help you create .zip, as well as Nuget packages: https://octopus.com/docs/packaging-applications/nuget-packages/usin...

    Hope that helps,
    Dalmiro

  2. 2 Posted by nitin.gautam on 12 May, 2017 09:39 PM

    nitin.gautam's Avatar

    Thanks for reply. I did tried

    Octo.exe pack --id=OfaWeb --version=1.0.0.0 --format=zip

    Octopus Deploy Command Line Tool, version 4.15.3

    Packing OfaWeb version "1.0.0.0"...
    Saving "OfaWeb.1.0.0.0.zip" to "C:\workspace\\Nucleus"...
    Adding files from "C:\workspace\\Nucleus" matching pattern "**"
    Done.

    Inside that ZIP no meta was there and still Feed Test was showing no file on that path where I kept this ZIP :(

  3. Support Staff 3 Posted by Dalmiro Grañas on 15 May, 2017 03:11 PM

    Dalmiro Grañas's Avatar

    Hi,

    In your last message it seems you have 2 issues:

    1) Inside that ZIP no meta was there

    What do you mean by "No meta was there"? Please be as specific as possible and feel free to include screenshots

    2) Feed Test was showing no file on that path where I kept this ZIP :(

    Could you show me a screenshot of the feed configuration in Library -> External Feeds -> [your feed] -> Edit? And please also show me a screenshot of what you see when you test the feed.

    Thanks,
    Dalmiro

  4. 4 Posted by nitin.gautam on 19 May, 2017 03:50 AM

    nitin.gautam's Avatar

    Thanks for reply.

    My scenario is I have created a ZIP for my Java code using Octo.exe, when I setting up feed inside Octopus and place that file in there. It is not coming in list of feed.
    Why my Zip not being identified?

  5. Support Staff 5 Posted by Dalmiro Grañas on 19 May, 2017 02:51 PM

    Dalmiro Grañas's Avatar

    Hi,

    You say you set up a feed inside Octopus and placed the package there. Could you share me some screenshots of where is this feed and how did you place the file on it?

    If you could also send me the full name of your ZIP file so I can check its a valid one, that'll be great.

    Thanks,
    Dalmiro

  6. 6 Posted by nitin.gautam on 19 May, 2017 03:13 PM

    nitin.gautam's Avatar

    Here is the Zip file name - ConfigToolPk.2017.5.19.83925.zip
    c:\Octo.exe pack --id=ConfigToolPk –format=zip

    And below is inside content.

    [cid:[email blocked]]

    Where as when I create a Nuget pack it do contain a pakcage meta xml file that have id, owner etc information. If I use nuget file in feed it get identified whereas above ZIP created by Octo not being identified for which I doubt that while using ZIP no meta is added. Why meta is not added in ZIP file?

    NUGET pack of same artifacts, you can see some additional stuff is there.
    c:\Octo.exe pack --id=ConfigToolPk

    [cid:[email blocked]]

  7. Support Staff 7 Posted by Dalmiro Grañas on 22 May, 2017 04:45 PM

    Dalmiro Grañas's Avatar

    As explained in our docs, only the Nuget format supports metadata in that way. For .zip,.tar,etc there's no metadata available and we resolve the package ID and version from the file name.

    Is there a specific reason why you want to use zip instead of nupkg?

  8. 8 Posted by nitin.gautam on 22 May, 2017 04:48 PM

    nitin.gautam's Avatar

    Only reason is I have no way to generate nuget format for java code using ANT. I am trying some alternatives.
    Let me know if you have a way for that?

    For ZIP files when I user name of zip still never show up as package ☹

  9. Support Staff 9 Posted by Dalmiro Grañas on 22 May, 2017 05:55 PM

    Dalmiro Grañas's Avatar
    • Only reason is I have no way to generate nuget format for java code using ANT. I am trying some alternatives.

    I have never used ANT, but it seems its possible to tell it to run a specific .exe as part of its build process. Isn't it possible to tell it to run Octo.exe and package this as a nupkg?

    • For ZIP files when I user name of zip still never show up as package ☹

    This is definitely an issue. Could you please send me the info I asked on this previous comment so I can help troubleshooting this?

  10. 10 Posted by nitin.gautam on 22 May, 2017 07:30 PM

    nitin.gautam's Avatar

    #1 – This is what I am doing with ANT EXEC task using which I can run Octo.exe with some arguments, which generating my nuget package. I have to keep versioning changed all times it generate a new package as of now it geneting same, so I believe I have to pass some other parameters.

    As of now it not support Target/Destination URL/Path where want to create octo generated file. So I have to move it to a directory then deploy ZIP file on traget where then using powershell have to extract ZIP at required location.

    <target name="octo" depends="zip">
                 <exec executable="c:\octo.exe" dir="${AntBuildDropLocation}/${BuildNumber}/artifacts">
                       <arg value="pack"/>
                       <arg value="--id=ConfgiToolPk"/>
                 </exec>
           </target>

    #2 – I will send you steps.

  11. Support Staff 11 Posted by Dalmiro Grañas on 23 May, 2017 04:17 PM

    Dalmiro Grañas's Avatar

    #1 - Octo.exe pack has a --version parameter so you can define the package version: https://octopus.com/docs/packaging-applications/nuget-packages/usin...

    #2 - Looking forward those steps. Lots of screenshots please :)

  12. 12 Posted by nitin.gautam on 24 May, 2017 08:55 PM

    nitin.gautam's Avatar

    For me #1 - default version working well. and i am using that Nuget generated from Octo working fine for #2.

  13. Support Staff 13 Posted by Dalmiro Grañas on 25 May, 2017 11:35 AM

    Dalmiro Grañas's Avatar

    Glad to hear #1 and #2 are working well.

    Don't hesitate to let me know if you have extra questions about this subject.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac