This will help to automated uploading Angular project build code to AWS S3 and CloudFront cached invalidation part. This will ensure to take backup of existing code for rollback operation if required.
python3
- You can usepython2.x
also you need to modifyprint
function callspip
- installation of other dependantpython
libraryboto3
-pip3 install boto3
orpip install boto3
- pygit2 - Fetch repository update and merge inside project.
mimetypes
aws-cli
- to configureaws creditional
basesd on environment specific
- You can download or clone repository for installation purpose.
- Make sure install prerequisites
- Can run unitest file by changing values or can create separate python file and follow "How to use" section.
pythonrequest = {
'bucketName': REQUEST_PARAMS.get(env).get('bucketName'),
'buildPath': build_path,
'repositoryPath': code_path,
'envName': env, # 'DEV, STAGE,PROD'
'distributionId': REQUEST_PARAMS.get(env).get('distributionId'),
'portal': 'PROJECTNAME',
'buildCommand': REQUEST_PARAMS.get(env).get('buildCommand')
}
obj = DeploymentService(request)
obj.start_process()
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.