DEV Community

Mudathir Lawal
Mudathir Lawal

Posted on

Setting up Continous Integration (CI) in the AWS CloudShell

Setting up Continous Integration (CI) in the AWS CloudShell
Build directly from the AWS cloud shell is something I have enjoyed for a long time. And I feel that sharing my ideas about setting up a typical continous integration using GitHub will benefit other dvelopers. 

The process…

  1. Launch the AWS CloudShell and run the following command and answer the prompts that follow: ssh-keygen -t rsa Print out your public key by running the command: cat /home/cloudshell-user/.ssh/id_rsa.pub

Image description

Notice that the path to the file begins with "/home/…" and ends with "pub". Do not run the command with the ending period printed after "pub".

Image description

  1. Now go to your GitHub profile and select "Settings" the "SSH and GPG keys". Under SSH keys on the right pane click on "New SSH key." Paste in your public key and enter a title in the top field. Then press add SSh key. Your SSH key should now appear as shown below:

Image description
This SSH key allows you to make commits to your GitHub repo without needing to sign in at every commit.

  1. You can now create a repo in your GitHub account where you will continously integrate your code directly form the AWS CloudShell. 

  2. Back in the CloudShell, clone the repository using the ssh command provided on GitHub.

Image description

Image description

Image description
To edit a file run vim filename. Make your desired changes to the files in the repo using Vim, commit the changes and push. But, you will need to follow the prompts to enter your name and email address when running these commands for the first time.

Image description

Image description
If you check your GitHub account you would find the changes already integrated there.

Image description

Top comments (0)