I am deploying to AWS EB from Codeship. Codeship does an npm install to run the tests. It them bundles everything and sends it to AWS, where another npm install happens.
How do I prevent Codeship from bundling my node_modules folder?
The integrated Elastic Beanstalk deployment is based on copying the files over to AWS, so if you want to "ignore" a folder, add a script based deployment before the Elastic Beanstalk deployment and remove the folders you don't want to copy over.
See https://github.com/codeship/scripts/blob/master/deployments/elastic_beanstalk.sh for a script that is very similar (though not quite identical) to the commands run for the integrated deployment.
And see https://documentation.codeship.com/basic/builds-and-configuration/deployment-pipelines/#multi-step-deployment-pipelines for a bit more information on deployment pipelines containing multiple individual steps.
Related
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.
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.
I'm using AWS Codestar. It integrates a number of AWS services so that I can go from git push to deployment.
It uses cloudformation. I have a lambda function that depends on the uuid npm.
How do I include this node dependency in the Codestar build pipeline? Cloudformation SAM use a zip file, and uploads everything to S3:
https://github.com/awslabs/serverless-application-model/blob/master/examples/2016-10-31/inline_swagger/template.yaml#L32
I don't want to build a zip file and put it into the code repo.
My next plan is to attempt running npm install in Codebuild:
http://docs.aws.amazon.com/codebuild/latest/userguide/sample-nodejs-hw.html#sample-nodejs-hw-files
Next plan works. Needed to add the npm in Codebuild. Works great.
I'm deploying my app to ElasticBeanstalk. I'm using an .ebignore file because there are files that I do not want to check into git, but I do want deployed with the app(like application secrets, config vars, etc). The issue I'm facing is that when using an .ebignore, the deploy takes FOREVER. I've used the --verbose flag, and I can see that it is recursing my entire node_modules directory and skipping each file individually. When I deploy by using .gitignore, it becomes very fast.
Has anyone else experienced this? How do I speed up this process?
I'm trying to figure out the best way to ignore some folders and files from my Codeship deployment process. At the moment it compiles all my assets as part of the deployment process but I don't really want it uploading node_modules to the server.
Is there a way to ignore the folder or remove the folder before deployment?
I tried deleting it after I ran grunt but I think it gets cached as it didn't work.
The method I used was to rm -r YOUR_PATH/node_modules in the test pipeline after Grunt has been run.
This however seemed to have some issues when running on FTP deploy. For any of the SSH deploys it seems to work fine.