Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

ministryofjustice/cloud-platform-reference-app-github-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Continuous Deployment of an application using Github Actions

Continuous Deployment of an application using Github Actions

Table of contents

Prerequisites

Building, tagging and pushing to ECR

  1. Build your Docker image using the following command.

docker build -t cloud-platform/github-action-reference-app .

  1. After the build completes, tag your image so you can push the image to this repository:

docker tag cloud-platform/github-action-reference-app:latest 754256621582.dkr.ecr.eu-west-2.amazonaws.com/cloud-platform/github-action-reference-app:latest

  1. Run the following command to push this image to your newly created AWS repository:

docker push 754256621582.dkr.ecr.eu-west-2.amazonaws.com/cloud-platform/github-action-reference-app:latest

Authenticate and deploy applications

Authenticate using service account

The serviceaccount has permissions to deploy to your namespace, so we will use its ca.crt and token in the pipeline. Guidence on Using your serviceaccount to authenticate to the cluster here

Deploy applications

There are several ways to deploy applications onto the MoJ Cloud Platform, the below will show the - helm.

helm install github-action-reference-app . \
--values values.yaml \
--namespace <namespace-name>