-
Notifications
You must be signed in to change notification settings - Fork 57
1.3
Review and ensure that you have setup your development environment before going through the steps below.
- From AWS Cloud9, create a directory and file:
mkdir ~/environment/ccoa/codecommit-files
cd ~/environment/ccoa/codecommit-files
touch ccoa-1-pipeline-cfn.yml
- Copy the source contents from the ccoa-1-pipeline.yml file and save it to your local file in your Cloud9 environment called ccoa-1-pipeline.yml.
In this section, you will zip and upload all of the source files to the S3 bucket you created when setting up your development environment. This way the ccoa-1-pipeline.yml template initializes the CodeCommit repository that is automatically provisioned by the stack.
From your AWS Cloud9 environment, type the following:
cd ~/environment/ccoa/codecommit-files
zip ccoa-1-examples.zip *.*
aws s3 sync ~/environment/ccoa/codecommit-files s3://ccoa-$(aws sts get-caller-identity --output text --query 'Account')
From your AWS Cloud9 environment, type the following (replacing you@example.com
with the appropriate value):
aws cloudformation create-stack --stack-name ccoa-1-pipeline-cfn --template-body file:///home/ec2-user/environment/ccoa/codecommit-files/ccoa-1-pipeline-cfn.yml --parameters ParameterKey=EmailAddress,ParameterValue=you@example.com ParameterKey=CodeCommitS3Bucket,ParameterValue=ccoa-$(aws sts get-caller-identity --output text --query 'Account') ParameterKey=CodeCommitS3Key,ParameterValue=ccoa-1-examples.zip --capabilities CAPABILITY_NAMED_IAM --disable-rollback
- Once the CloudFormation stack is successful, select the checkbox next to the stack and click the Outputs tab.
- From the Outputs tab, click on the PipelineUrl output.
Get the generated pipeline name by going to CodePipeline Console.
From AWS Cloud9 terminal, type the following (replacing YOURPIPELINENAME
with the generated name):
aws codepipeline get-pipeline --name YOURPIPELINENAME
- Download the pipeline-example.yml CloudFormation template.
Go to Cleanup to remove any resources you created in this sublesson.