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.
- 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
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".
- 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:
This SSH key allows you to make commits to your GitHub repo without needing to sign in at every commit.
You can now create a repo in your GitHub account where you will continously integrate your code directly form the AWS CloudShell.
Back in the CloudShell, clone the repository using the ssh command provided on GitHub.
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.
If you check your GitHub account you would find the changes already integrated there.
Top comments (0)