TFS Java Build to Octopus

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

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/using-octo.exe

Hope that helps,
Dalmiro

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 :frowning:

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 :frowning:

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

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?

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

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:image002.jpg@01D2D086.21B830C0]

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:image006.jpg@01D2D086.21B830C0]

image002.jpg

image006.jpg

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?

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 :frowning:

  • 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 :frowning:

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

#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.

#2 – I will send you steps.

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

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

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

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

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