From 6d9304fc3e8e7ad64052057f11afb96397923222 Mon Sep 17 00:00:00 2001 From: Shoaib Shaikh Date: Thu, 4 May 2023 22:56:28 +0530 Subject: [PATCH 01/10] Added github actions yaml --- .github/workflows/kickstart-dev.yaml | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/kickstart-dev.yaml diff --git a/.github/workflows/kickstart-dev.yaml b/.github/workflows/kickstart-dev.yaml new file mode 100644 index 0000000..458ffdd --- /dev/null +++ b/.github/workflows/kickstart-dev.yaml @@ -0,0 +1,35 @@ +name: Angular Kickstart + +on: + push: + branches: + - development + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ap-south-1 + + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 14 + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Deploy + if: success() + run: aws s3 sync ./dist/kickstart-angular s3://angular-kickstart-s3 \ No newline at end of file From 36c22a06c772c0954bdfc97045b77f99ac82e326 Mon Sep 17 00:00:00 2001 From: Shoaib Shaikh Date: Thu, 4 May 2023 23:16:47 +0530 Subject: [PATCH 02/10] Added comments --- .github/workflows/kickstart-dev.yaml | 29 +++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/kickstart-dev.yaml b/.github/workflows/kickstart-dev.yaml index 458ffdd..ba67d22 100644 --- a/.github/workflows/kickstart-dev.yaml +++ b/.github/workflows/kickstart-dev.yaml @@ -1,35 +1,54 @@ +# Name of the pipeline name: Angular Kickstart +# Trigger for the pipeline +# This pipeline will be triggered whenever a commit is pushed to "development" branch on: push: branches: - development +# Jobs to run jobs: deploy: + # "ubuntu-latest" is GitHub Actions' provided runner. + # Its' equipped with mostly all the tools needed to build applications. + # But since it is hosted and owned by Microsoft (GitHub). + # Clients and businesses prefer to use their own hosted runners for data security. + # Momentum had their runners hosted as pods on the EKS cluster. runs-on: ubuntu-latest steps: + # This step configures the AWS credentials stored in Repository Secrets of GitHub. - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 + env: + REGION: ap-south-1 # Using custom environments with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ap-south-1 + aws-region: ${{ env.REGION }} - - name: Checkout + # This step takes a clone of the repository on the runner. + - name: Checkout code from GitHub uses: actions/checkout@v2 - - name: Setup Node.js + # This action step installs the desired version of node js on the runner, if not present. + - name: Setup Node.js 14.x uses: actions/setup-node@v2 with: node-version: 14 + # Installs the dependencies for the Angular Application - name: Install dependencies run: npm install - - name: Build + # Packages the build artifact + - name: Build application artifact run: npm run build - - name: Deploy + # Deploys the artifact to s3 bucket for hosting the application + # success() method ensures that this step only runs when all previous ones + # are successfully executed. + - name: Deploy the artifact to S3 if: success() run: aws s3 sync ./dist/kickstart-angular s3://angular-kickstart-s3 \ No newline at end of file From f5deb5f34d087bcd993fec378837911d34c0c6ed Mon Sep 17 00:00:00 2001 From: Shoaib Shaikh Date: Thu, 4 May 2023 23:17:53 +0530 Subject: [PATCH 03/10] Changed title --- src/app/app.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 33752f3..1ef6379 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -309,7 +309,7 @@ alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==" /> - Welcome + Welcome Momentum Team!
Welcome Momentum Team! + Welcome Momentum Team! This is a demo