DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Enterprise AI Trend Report: Gain insights on ethical AI, MLOps, generative AI, large language models, and much more.

2024 Cloud survey: Share your insights on microservices, containers, K8s, CI/CD, and DevOps (+ enter a $750 raffle!) for our Trend Reports.

PostgreSQL: Learn about the open-source RDBMS' advanced capabilities, core components, common commands and functions, and general DBA tasks.

AI Automation Essentials. Check out the latest Refcard on all things AI automation, including model training, data security, and more.

Related

  • Set Up a CI/CD Pipeline for An Angular 7 Application From Azure DevOps to AWS S3
  • Mule 4 Continuous Integration Using Azure DevOps
  • Deploying MuleSoft Using Azure DevOps
  • Secure and Scalable CI/CD Pipeline With AWS

Trending

  • Scaling Java Microservices to Extreme Performance Using NCache
  • Long Tests: Saving All App’s Debug Logs and Writing Your Own Logs
  • AI and Rules for Agile Microservices in Minutes
  • Harmonizing AI: Crafting Personalized Song Suggestions
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Set Up a CI/CD Pipeline for An Angular 7 Application From Azure DevOps to AWS S3 - Part 2

Set Up a CI/CD Pipeline for An Angular 7 Application From Azure DevOps to AWS S3 - Part 2

The second part of this tutorial finishes the series by walking you through the rest of the process of setting up a CI/CD pipeline for an Angular app.

By 
Ishan Juneja user avatar
Ishan Juneja
·
Jan. 31, 20 · Tutorial
Like (4)
Save
Tweet
Share
59.5K Views

Join the DZone community and get the full member experience.

Join For Free

In the previous tutorial, we looked at how we can set up the CI part for an angular application on Azure DevOps and configured the AWS S3 bucket to host our built code. Now we are going to look into how we can deploy the code built from the pipeline to an AWS S3 bucket.

This part of the article is broadly divided in further 2 parts.

  • Getting the necessary credentials to deploy the code from CLI which we previously installed during the CI part.
  • Configuring the CD pipeline for the deployment of code.

Let's get started.

You may also enjoy: Set Up a CI/CD Pipeline for An Angular 7 Application From Azure DevOps to AWS S3

Getting the CLI Credentials from AWS

  1. Login to your AWS account.    
  2. From the services menu go to IAM
  3. Under IAM Resources, select users and click on Add User button
  4. Give a name you want to the user and in Access type, check the box which says "programmatic access"
  5. Click on the Next: Permissions button
  6. On the Permissions screen click on create group and search for AmazonS3FullAccess also don't forget to give a name to the group.
  7. Now proceed with the screens and if you want to add more information, you can add that in the further screens (not necessary in this example).
  8. At the end of the wizard, you will see that a user has been created and there would be an option to download a .CSV of the credentials. Download the .CSV file containing the CLI Credentials for the user which we just created

Configuring the CD Pipeline for The Deployment of Code

  1. Navigate to releases under pipelines for your project in Azure DevOps.Navigate to pipelines
    Navigate to pipelines
  2. Click on New and select New release pipeline
    New release pipeline
    New release pipeline
  3. Click on Empty Job when it shows a list of already existing templates
    Empty Job
    Empty Job
  4. Give a name to the pipeline and a name to the stage according to the environment for which the stage will be executedStage name
    Stage name
  5. Click on Add an artifact option in the left
    Adding an artifact
    Adding an artifact
  6. In the Source dropdown, select the name of the CI pipeline which we configured in the previous article. Click on Add.
    Source dropdown
    Source dropdown
  7. Under the stage which we created in step 4, click on "1 job, 0 task" to configure the stage.1 Job, 0 task
    1 Job, 0 task
  8. Click on Add a task to the Agent job (+) icon.
    Add agent job
    Add agent job
  9. Search for Amazon S3 upload and you will see a task in the list with the same name. Add this task for the agent.         
    Amazon S3 upload
    Amazon S3 upload
  10. When configuring this task, you will be asked for the CLI credentials. Click on the New button.          
    New upload
    New upload
  11. Enter the Access Key ID and Secret Access Key from the CSV file which we downloaded from AWS after creating the S3 User. You would also be required to give this service a name in the details section at the bottom of this form. Once all the information is in place, you can save the credentials.
  12. Click on the refresh icon on the left of the +New button from the above image and you can see the credential listed in the drop-down for AWS Credentials.
  13. From the region drop-down, select the region in which you configured the S3 bucket in AWS.
  14. Enter the name of the bucket which you created for the Bucket name.
  15. In the source folder, click on the three dots and select the folder in which your code was built by the build agent which we configured in the previous article.         
    Select a file
    Select a file
  16. Under filename patterns put - "**/**" without the double quotes.
  17. In ACL, choose public read.
  18. Click on save at top and once the CD pipeline is saved, click on create release to release the code on AWS S3 bucket.

Let this task be completed and use the URL provided in S3 bucket's properties-> static website hosting to view the website we just deployed to AWS S3 from Azure DevOps.

If you face any issue while configuring this part, do let me know in the comment section below.

I hope this post was helpful and that you learned something new today. Thank you for reading and happy coding.

Further Reading

Learn How to Set Up a CI/CD Pipeline From Scratch

Deploying a Node.js/Angular 5 Application to Kubernetes with Docker

AWS Continuous Integration/Deployment Pipeline (software) application azure DevOps career AngularJS

Opinions expressed by DZone contributors are their own.

Related

  • Set Up a CI/CD Pipeline for An Angular 7 Application From Azure DevOps to AWS S3
  • Mule 4 Continuous Integration Using Azure DevOps
  • Deploying MuleSoft Using Azure DevOps
  • Secure and Scalable CI/CD Pipeline With AWS

Partner Resources


Comments

ABOUT US

  • About DZone
  • Send feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: