Jenkins Plugin for AWS CodeDeploy not deploying all files in workspace - powershell

I have a freestyle project (mostly JavaScript and HTML/CSS files) in Jenkins that uses Windows PowerShell to build it specifically using npm commands. It creates a build folder and builds the project as expected with all files. Now in my Workspace on Jenkins that is pulling from a Bitbucket repo I have a number folders and files. In my other projects where I use my Jenkins Plugin for AWS CodeDeploy post build action all my files in my Workspace were deployed. For some reason when this project is deployed to my EC2 instance only my first four folders in the Workspace are being deployed and my two important folders that I need other than my build folder, src and service, are not. I have tried messing with the "Include Files" parameter in the plugin setup but nothing has been successful. Below is a screenshot of the plugin setup:
Please any help is appreciated as this has been an issue for days now, thank you.

Related

Files have been deleted after deploy

I'm using Azure DevOps to deploy my source in a WebApp.
I have two pipelines for two projects, the first project have been deployed like a charm, but the second not!
When I deploy the second project for a moment I saw the files in wwwroot folder from Kudo Editor, but after some seconds the files disappear and return the old files (webapps folder and hostingstart.html)
I noticed an AppSetting that not appear in first WebApp after deploy:
WEBSITE_ENABLE_SYNC_UPDATE_SITE
But in documentation I didn't find something that impact it.
Ps: Perhaps wrong, I'm using the same AppService Plan in both WebApp. I think this not impact because the first project works well.
Some help?
Edit:
In /data/SitePackages/ has all zip's from my tries of release,
so the deploying is working, but for some reason instead of unzip in wwwroot folder, only appear after release a webapps folder inside wwwroot.
In you web app deploy task, under additional deployment options, make sure that you have the same deployment method for both of the deployments.
Ideally, Web Deploy.

Building multiple Gradle projects in Jenkins with AWS CodePipeline

I have a Gradle project that consists of a master project and 2 others that included using includeFlat directive. Each of these 3 projects has its own repo on GitHub. To build it I checkout all 3 projects into a common top folder then cd into the master project and run gradle build. And it works great!
Now I need to deploy the resulting app to AWS EB (Elastic Beanstalk) which is also works great when I produce the artifact locally and then deploy it manually. I want to automate the process so I'm trying to set it up using CodePipelines + Jenkins as described in this document adjusted for Gradle.
The problem is that if I specify 3 Sources in the pipe I end up with my projects extracted on top of each other creating a mess in Jenkins workspace. I need to somehow configure each project to be output to its own directory within Jenkins workspace and I just don't see a way to do it (at least in UI)
Then, of course even if I achieve what I want I need somehow to cd into the master directory to run gradle build and again I'm not sure how to do that
P.S. Great suggestions from #Phil but unfortunately is seems that CodePipeline does not currently support Git submodules or subtrees
I would start common build, when changes happened on any of 3 repos. With say 5 minutes delay, to have single build, even if changes are introduced to more then one repo.
I can't see good way to deal with deployment in other way than using eb deploy... old way... Please install aws tools at your jenkins machine. Create deployment job triggered on successful build. And put bash script doing deployment there. Please put more details about your deployment, that way I can help with deployment script.

jenkins with copy artifact plugin without maven from GitHub

I am trying to deploy a war file into WAS8.5 with GitHub. at first I am specifying "EAR Path" with the war file in "Websphere Deployment" option. Then I made some changes in eclipse workspace and pushed into GitHub. Jenkins is checking for latest build but unable to deploy the same in Server. I have used copy artifact plugin, but still nothing happening. I may be wrong in configurations or something. I am getting the following exception:
Copied 0 artifacts from "simplewebapp" build number 20
ERROR: Failed to copy artifacts from simplewebapp with filter: *.war
Archiving artifacts
Finished: FAILURE
and in \jobs\simplewebapp\builds\lastSuccessfulBuild\archive\SimpleWebApp, am unable to see any archive file. How can i achieve it without Maven?
Kindly show me with some examples.
jenkinone
jenkintwo
As a final answer, I recommend to host your project code in GitHub, to use Jenkins/Maven to build your project and to publish the EAR/WAR file to WebSphere using this deployer plugin.

Azure: How do I disable the deployment an just create a package file?

We have a couple of cloud services and do a Continuous Delivery to a test environment via Team Build.
For the production environment, we have our own deployment powershell script. This script needs a .cspkg file for deployment.
My problem is now that I haven't found a way to let team build just create a .cspkg file but not to publish it to Azure.
I've used the AzureContinousDeployment.11.xaml template and it insists on publishing the package.
I've tried to set the "Deployment Settings Name" to an empty string. The build runs without errors, but that way, no package is created.
Is there a way to stop it somewhere in between?
Maybe something I could change in the .azurePubxml file to achieve that?
Environment: VS2012, Team Foundation Service (visualstudio.com)...
On the Process tab of the edit definition:
If you clear out the Deployment Settings Name and all the values under Publishing - Azure Cloud Service and Publishing - Azure Website (except you can leave True for the Allow Upgrade) the building template won't know where to publish the project.
Also on the Build Defaults tab of the edit definition:
Select the "Copy build output to the following Source Control folder (this folder will be created if it does not exist):"
Add some name and path like: "$/your cloud service/drops"
That will cause all your builds to be moved to the drops folder after a successful build. In those drops folders, there will be a app.publish directory that will have your *.cspkg and *csfg files.
I have my custom build template xaml invoke the MSBuild task (Microsoft.TeamFoundation.Build.Workflow.Activities.MSBuild) on the Azure project (.ccproj file) with the "Publish" target.
(Despite having the same name as the UI command that pushes the package to Azure, the "Publish" target just means "generate the package without pushing it anywhere".)

Teamcity MSBuild Copy build output to new folder

I've managed to get Teamcity running and connecting into bitbucket and the final step I'd like would be to get the MVC 4 project copied into another folder on the server ready for an xcopy deployment onto a web host.
I'm using MSBUILD, as the build agent.
Thanks in advance.
Preferred way is to use publishing targets in MSBuild.
Add new build step with runner type MSBuild
Set Build file path to your web project csproj file
Set Target to Clean;Build;Publish
Set Command line parameters to /p:Configuration=Release;PublishDir=\\your\target\path
Hope this helps.
You could use the CommandLine buildrunner to xcopy.
Personally I would not even copy the result to a different server.
For deployment I would have a deployment project in Teamcity that gets the required artifcat via wget from the Teamcity Rest-Api and uploads it to the hosting provider.
This can also be done in CommandLine buildrunner.
Under general settings
Click "Show advanced options"
Under Artifact Paths you can specify what you would like put under a new folder
**/* => target_directory
Or you can zip up your files and put under a new folder like this
**/* => newfolder/mypackage.zip
See more details here: https://www.jetbrains.com/help/teamcity/2019.2/configuring-general-settings.html#ConfiguringGeneralSettings-ArtifactPaths