I have Angular 5 application developed. I have added following yml file:
pipelines:
default:
- step:
caches:
- node
script: # Modify the commands below to build your repository.
- npm install
- npm install -g @angular/cli
- ng build --prod
- ls -ltr
- pwd
I can see dist folder generated in container using ng build and ls -ltr; However I am unsure about how shall I copy this dist folder to my servers tomcat directory.
Do I have to include gradle file for this ? or yet another step for gradle ? How to copy to my server ? commands for that ? and where should I include those in my yml file ?
My repo is here.
Thanks in advance
Hi Rahul,
There are multiple ways you can publish your files to your server / deployment environment (FTP, SFTP, SSH, etc.). I recommend you choose one of them, make sure your server ports are accessible by Pipelines and set your server credentials in Pipelines as secured variables. Then, you will need to specify the script in the Bitbucket Pipelines YAML file to upload the contents of your dist folder to the tomcat folder in your server.
I recommend you use the recently feature released "Deployments" to track your deployments across your environments: https://confluence.atlassian.com/bitbucket/bitbucket-deployments-940695276.html
Regards,
Raul
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.