Continuous Deployment to Amazon S3 using Bitbucket pipeline

Please visit my website and subscribe to my youtube channel for more articles

https://devops4solutions.com/

In this blog, we will setup the Continuous Deployment to Amazon S3 using Bitbucket pipeline

CI/CD Flow:

Prerequisite:

How to setup a Continuous Deployment to Amazon S3 using Bitbucket pipeline

AWS_SECRET_ACCESS_KEY
AWS_ACCESS_KEY_ID
AWS_REGION

All the above variables are required to connect to s3 bucket from bitbucket pipeline.

3. We are setting up a Continuous Deployment to Amazon S3 using Bitbucket pipeline for nodejs application

# This is a sample build configuration for JavaScript.# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.# Only use spaces to indent your .yml configuration.# -----# You can specify a custom docker image from Docker Hub as your build environment.image:  nikhilnidhi/inventory_basepipelines:branches:master:- step:caches:- node-admin- node-webname: Build and Generate Artifactsscript:- git config --global user.email "test"- git config --global user.name "build machine"- node -v- ruby -v- VERSION=$(npm version patch  -m "auto verison tick [skip CI]")- VERSION=$(echo $VERSION | cut -c 2-)- echo $VERSION- npm install- bower install --allow-root- git add package.json- grunt build- aws s3 sync dist s3://m-test-files/admin/$VERSION- aws s3 cp app/scripts/version.js s3://m-test-files/admin/$VERSION/scripts/version.js- git commit -m "[skip CI]"- git push- step:caches:- node-admin- node-webname: Deploy to stagingdeployment: stagingtrigger: manualscript:- cd deploy- ./deploy_staging.shdefinitions:     
caches:
node-admin: admin/node_modules
node-web: web/node_modules
Image for post
Image for post

Congratulations, we have successfully setup the Continuous Deployment to Amazon S3 using Bitbucket pipeline.

Devops Automation Enginneer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store