This tutorial deploys a Simple Angular web application from Bitbucket /Bitbucket on Azure Storage by setting up continuous integration and continuous deployment using Jenkins.
In my case, I am using Bitbucket.
In this tutorial, you’ll complete five tasks:
To complete this tutorial, you need these items:
On the Available tab, select these plug-ins:
To install your selected plug-ins, select Download now and install after restart.
After you’re done, on the Jenkins menu, select Manage Jenkins so that you return to the Jenkins management page for future steps.
In Jenkins, create the pipeline job for building and deploying your app.
Note: For credentials, you can add your username and password of the Bitbucket account or you can use SSH authentication in case if you don’t want to share credentials.
#!/bin/bash echo "${GIT_BRANCH}" BRANCH_NAME=${GIT_BRANCH} echo "$BRANCH_NAME" echo "installing..." npm install || exit 1 if [ "$BRANCH_NAME" == "origin/development" ] then echo "building development..." ng build || exit 1 ls sudo azcopy copy 'dist/**' '<SAS URL DEV>/$web?<REST QUERY PARAMS>' --recursive fi if [ "$BRANCH_NAME" == "origin/staging" ] then echo "building staging..." ng build --configuration=staging || exit 1 ls sudo azcopy copy 'dist/**' '<SAS URL STAGING>/$web?<REST QUERY PARAMS>' --recursive fi
Note:
Here, so we have configured everything whatever we needed. You want to configure Post-build actions you can do that like notifications and all.
Now we are good to go, Just commit on your branch and your Angular project will get deployment on Azure storage.
If you encounter any issues with the above process you can write it down in the comment section, I would love to help you guys.
What’s on your mind? Tell us a little bit about yourself and your question, and we will be in touch with you within 12 hours
Free eBook on Telemedicine Platform Development: All About Telemedicine
Download Free eBook Now!