What is the best way to download bunch of .jar files from specific JFrog Artifactory using ansible script? - jar

What is the best way to download bunch of .jar files from specific JFrog Artifactory using ansible script?

You can use the get_url module which handles basic auth and file retrieval from a URL. This can be combined with the with_items directive containing a list of your jar files.

Related

How to unpack an msbuild web package without deploying it to a web server?

When MSBuild packages an ASP.Net website, it creates a .zip file and a set of xml files. Using msdeploy, I can push that zip file and a set of parameter replacements to an IIS server.
Now, here's the conundrum: given that Web Package zip file, is there a way to unpack it and do the token replacement cleanly without deploying to IIS? Just unpack it to a folder and apply the SetParameters.xml so that it would be ready to robocopy to a file system location?
Msdeploy's parameters are opaque to say the least. I've tried deploying using the file and folder providers, and that doesn't work.
I could roll my own - I'd have to reverse-engineer the token replacement logic and deal with how the zip file contains the entire folder tree right down to the drive root (instead of being relative paths from the project folder, which is what it will use when it deploys). All of this is doable... but very annoying and I was hoping there was a better way.
Thanks in advance.
Following up on this: In the end I had to do it in powershell. The code is tied into a whole bunch of other deployment code that's company-specific, so I can't paste it here, but in short:
Unzip the .zip into a temporary location.
Recurse the directories until you find the packagetmp - this is the actual meat of the zip.
Delete the target web app folder on the webserver (carefully - as many sanity checks as possible need to happen before this step)
Copy the contents of packagetmp to the target folder-path on the web-server.
Apply use xpath operations to do the config transforms in powershell to provide connection strings and logging endpoints.
Restart the app pool (do not skip this step you get subtle failures if you do).
Clean-up (delete the temporary folder).

Conflict in jar usage under plugins

I'm trying to deploy Corda nodes in a windows server. While saving the corda app jar in plugins folder, which jar file do I have to save? Should I generate jar using intellij artifacts or just copy the plugins file from respective nodes which was created using gradlew deployNodes command?
If I've understood your question correctly, the easiest way would be to grab the jar(s) that are created inside the respective node's plugins folder after you've run deployNodes

How to copy specific artifacts across multiple instances in Artifactory?

How can I copy a specific artifact to another instance of Artifactory?
From what I can see the export/import functionality only works for full system or full single repo copying. I don't want to replicate the full repo either. I just want to copy specific artifacts.
Have you tried using the JFrog CLI? It can be used to download artifacts from Artifactory by giving a specific pattern. So, for example, you can download only the "war" files from a specific repository and then import it / deploy it to the rest of the instances that you want. You can also write a script using the JFrog CLI that will download and then publish those artifacts to the other Artifactory instances using the CLI.
https://www.jfrog.com/getcli/
You can use CLI for Jfrog Artifactory for copying the file with the new name to another repo:
jfrog rt cp "your-artifactory-repo/artifact.extension" your-new-artifactory-repo/artifact.extension
Note: you can use * if you want to copy all the artifacts from the folder.

How to download artifacts from Artifactory Server

We have a bunch of jars in the artifactory server (the free version).
How can we download all the jars in a single http request from it ?
Do we need to tar all the jars into a single tar file in order to efficiently download the jars ?
Thanks
Sincerely
Since you are the one who generates the files, you have two options:
As you said, generate the tar before uploading it. You'll still be able to search and browse the files inside it.
Write a afterDownloadError user plugin. Each time the user tries to access a url with .tar in the end, create the tar from the needed files and serve it.

How can I create and download a zip file using Actionscript

I'm developing an application using Adobe Flex 4.5 SDK, in which the user would be able to export multiple files bundled in one zip file. I was thinking that I must need to take the following steps in order for performing this task:
Create a temporary folder on the server for the user who requested the download. Since it is an anonymous type of user, I have to read Sate/Session information to identify the user.
Copy all the requested files into the temporary folder on the server
Zip the copied file
Download the zip file from the server to the client machine
I was wondering if anybody knows any best-practice/sample-code for the task
Thanks
The ByteArray class has some methods for compressing, but this is more for data transport, not for packaging up multiple files.
I don't like saying things are impossible, but I will say that this should be done on the server-side. Depending on your server architecture I would suggest sending the binary files to a server script which could package the files for you.
A quick google search for your preferred server-side language and zipping files should give you some sample scripts to get you started.

Resources