Working with AWS CodePipeline in the AWS Cloud9 IDE - AWS Cloud9

AWS Cloud9 is no longer available to new customers. Existing customers of AWS Cloud9 can continue to use the service as normal. Learn more

Working with AWS CodePipeline in the AWS Cloud9 IDE

You can use the AWS Cloud9 Integrated Development Environment (IDE) to work with source code in repositories that are compatible with AWS CodePipeline.

CodePipeline is a continuous delivery service you can use to model, visualize, and automate the steps required to release your software and ongoing changes you make to it. You can use CodePipeline to quickly model and configure the different stages of a software release process. For more information, see the AWS CodePipeline User Guide.

Note

Completing these procedures might result in charges to your AWS account. These include possible charges for services such as Amazon EC2, CodePipeline, Amazon S3, and AWS services supported by CodePipeline. For more information, see Amazon EC2 Pricing, AWS CodePipeline Pricing, Amazon S3 Pricing, and Cloud Services Pricing.

Step 1: Create or identify your source code repository

In this step, you create or identify a source code repository that is compatible with CodePipeline.

Later in this topic, you upload your software's source code to that repository. CodePipeline will build, test, and deploy the uploaded source code in that repository by using related pipelines that you also create.

Your source code repository must be one of the following repository types that CodePipeline supports:

Step 2: Create an AWS Cloud9 Development Environment, connect it to the code repository, and upload your code

In this step, you create an AWS Cloud9 development environment in the AWS Cloud9 console. You then connect the environment to the repository that CodePipeline will use. Finally, you use the AWS Cloud9 IDE for the environment to upload your source code to the repository.

To create the environment, follow the instructions in Creating an Environment, and then return to this topic. (If you already have an environment, you can use it. You don't need to create a new one.)

To connect the environment to the repository, and then upload your source code to the repository if it isn't already there, use one of the following sets of instructions. The set you choose depends on the type of repository that stores the source code.

Repository type Instructions

CodeCommit

Follow these instructions in the AWS CodeCommit Sample:

Amazon S3

  • Install and configure the AWS CLI or AWS CloudShell in the environment, as described in the AWS CLI and AWS CloudShell Sample.

  • To upload your source code to the bucket, use the AWS CLI or the AWS CloudShell in the environment to run the aws s3 cp command. (For the AWS CloudShell, you can remove aws from the command.)

GitHub

You can clone a repository hosted on GitHub and interact with by using the Git panel interface.

After you connect the environment to the repository, whenever you push source code changes from the AWS Cloud9 IDE to the repository, CodePipeline automatically sends those changes through related pipelines to be built, tested, and deployed. You create a related pipeline later in this topic.

Step 3: Prepare to work with AWS CodePipeline

In this step, you attach a specific AWS managed policy to the IAM group you created or identified in Team Setup. This enables the group's users to begin creating and working with pipelines in CodePipeline.

If you have used CodePipeline before, skip ahead to Step 4: Create a Pipeline in AWS CodePipeline.

For this step, follow these instructions in Step 3: Use an IAM Managed Policy to Assign AWS CodePipeline; Permissions to the IAM User in the AWS CodePipeline User Guide, and then return to this topic.

Step 4: Create a pipeline in AWS CodePipeline

In this step, you create a pipeline in CodePipeline that uses the repository you created or identified earlier in this topic.

For this step, follow the instructions in Create a Pipeline in AWS CodePipeline in the AWS CodePipeline User Guide.

After you create the pipeline, CodePipeline sends the current version of the source code in the repository through the pipeline to be built, tested, and deployed. Then, whenever you push source code changes from the AWS Cloud9 IDE to the repository, CodePipeline automatically sends those changes through the pipeline to be built, tested, and deployed.

To view the pipeline, follow the instructions in View Pipeline Details and History in AWS CodePipeline in the AWS CodePipeline User Guide.