Create webdeploy package from regular .zip file - deployment

Currently, as a part of our build-process, we organize the target wwwroot folder structure and build a .zip of it. This is our deployment artifact.
The structure of the .zip file is:
/App_Browsers
/App_Config
/App_data
/App_Start
/bin
/data
/dist
/layouts
/views
default.aspx
web.config
Is it possible to convert this regular .zip file to a file that can be deployed using webdeploy/msdeploy? Or can webdeploy/msdeploy also deploy regular .zip files?

Is it possible to convert this regular .zip file to a file that can be deployed using webdeploy/msdeploy? Or can webdeploy/msdeploy also deploy regular .zip files?
The answer is yes.
AFAIK, msdeploy does not support packages, which were zipped using other than built in windows zip archiver.
So, to resolve this issue, you could unzip this regular .zip file, and zipped with built in windows zip archiver, like, the task Archive Files task or 7z.exe.
You could check this thread for some more details.
Hope this helps.

Related

Teamcity deployment to another server via ssh

I'm trying to use teamcity deployer plugin to send my build result (war file) via ssh to another computer in network.
my problem is how to config deployer to find my builded war file.
I used %teamcity.build.workingDir%**/*.war in Artifacts path setting but it can not find any file in there.
The log show that it try to find my file in here /home/teamcity/TeamCity/buildAgent/work/c4bca27d2b00a6fe**/*.war.
the path is correct but It's not working...
the teamcity document for Accessing Build Artifacts is not clear, and does not show what should i use in setting dialog.
Update:
I tried to use **/mywar-1.0.war and **/build/libs/mywar-1.0.war, both works but now the problem is, it deploy the file with it's subdirectories like this dest/build/libs/mywar-1.0.war
but i need dest/mywar-1.0.war,
so still don't know how to configure it...
Teamcity deployer plugin, uses pattern as a Artifacts path to find files for deploy, in most cases as #Vlad said using **/*.fileType or **/filename.type is enough,
for example : **/*.war or **/myprojectfile.war
but sometimes your output files are in subdirectory tree, so using pattern case the deployer to create those subdirectories on destination.
in this case, I just need the war file without its subdirectory so the right way is using complete path to that file.
for example :
my war file is in build/libs/ folder after build process
so using build/libs/mywar.war as a Artifacts path, will deploy the war to destination without its subdirectory.
Artifacts resolved under checkout directory as documentation says, so just **/*.war is enough.

How to Copy Files on War Start

I have a number for Word Docs and PDFs that need to be copied to a file storage on start of my Grails app.
I figured I can just leverage BootStrap.groovy to check for existing files then copy if none found. However, I don't know the best practice of including the files into the WAR file.
How can I copy these files?
I don't know if it is a best practice, however we have all our external files into web-app directory. i.e. We have directories reports and pdf besides css and images directories. All that files are package and deploy into war file.

What files should I check in for an SSIS project?

In my SSIS project folder I have extra files in addition to the three package (.dtsx) files that I created. There is a ProjectName.database file, a ProjectName.dtproj file, and a ProjectName.dtproj.user file.
When I build the project, the dtsx files are copied to a folder called "bin" inside the project folder.
When I create a deployment manifest, the three package files are copied to a folder called "bin/Deployment" along with a new ProjectName.SSISDeploymentManifest file.
Which of these files should I check in to source control?
I think only the three package files and the deployment manifest are useful to me.
You will want to keep:
*.dtsx - your packages
*.dtproj file - project files
.sln file - solution file - if You have only one project you might not have this one
*.database - take a look at quotation below
deployment manifest file - allows you to deploy your packages to a target location using a wizard
MSDN states following:
The *.database file contains information that Business Intelligence Development Studio requires to open the Integration Services project.
*.dtproj.user and .sln.suo files are not needed because they (from the same link): contain information about your preferences for working with the project.

How do you unwar a .war file with ant on windows?

I'm only remotely familiar with what ant does, but apparently I have to setup a service that's run on jboss and put it into a deploy directory...
the problem is the .war file -- I only have winzip 7zip and ant and I dont know how to ge the contentsa out of the .war file to put it in the deploy directory...
are there other conf and build.xml files a well that are needed?
thanks for your help!
//edit
the problem is the instructions say to unwar the .war file. And I Dont know how to do this via JBOSS or any other means. How?
//edit
7zip unwar-ed the file but I'm not sure where to put the contents in jboss.
/server/ ?
Thanks for your help. As this is my first time doing this I'm completely clueless.
Usually you can just place the WAR file into the directory and the container will take care of unpacking it.
But, a WAR file is simply a ZIP file with a different extension, so you could also use any popular unzip tool (WinZip, WinRAR, 7Zip, etc) to unzip it manually if need be.
Ant has an unzip task as well.
JBoss should be able to deploy a war file and unpack it on it's own. You shouldn't be writing scripts that unpack war files for JBoss.
Using unzip task: http://ant.apache.org/manual/Tasks/unzip.html
Unless you have something else in mind1, you don't have to depoy you war in an "exploded" format (i.e. unpacked). Just deploy you war on JBoss and JBoss will deal with it. To do so, just copy your war into /server/default/deploy.
1 The only good reason I can see to deploy a war in an exploded format is if you plan to make incremental changes to the content (e.g. changing just a class) without deploying the whole webapp again. But this doesn't seem to be the case. So just deploy you war without unpacking it.

In a Netbeans java project: How can I copy misc. data files into build directory

After a build of a java applet I would like to copy a file, or files from $PROJECT_DIR\data into the build directory. Can I do this easily somehow by marking the files in some way, or must I write an ant copy statement?
Ant build.xml is the way to go, IMO.