-
Notifications
You must be signed in to change notification settings - Fork 57
1.4
Review and ensure that you have setup your development environment before going through the steps below. Use the S3 bucket you created when setting up your development environment.
- If you haven't done so already, create a CodeCommit repo
- Clone the CodeCommit repo.
cd ~/environment/ccoa
git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/codecommit-demo
- Change the directory to your local CodeCommit repo:
cd ~/environment/ccoa/codecommit-demo
touch README.md
- Open the README.md file and paste the template configuration below and save.
# 1.4 README
- Add and commit files to your CodeCommit repo
git add .
git commit -am "initial commit of lesson1 files"
git push
- Go to the CodePipeline console
- Click Create pipeline
- Enter a Pipeline name
- Keep the Allow AWS CodePipeline to create a service role so it can be used with this new pipeline checkbox selected
- Click Next
- Choose CodeCommit as the Source provider
- Choose codecommit-demo as the Repository name (based on Create AWS CodeCommit repository )
- Choose master as the Branch name
- Under Change detection options, leave Amazon CloudWatch Events (recommended) selected
- Click Next
- Click Skip build stage
- Choose Amazon S3
- Enter a BucketName based on the S3 bucket you created previously in this lesson (e.g.
ccoa-ACCOUNTID) - Choose an ObjectKey (e.g.
my-deployment.zip)

- Select the pipeline you just created
- Click the Edit button to edit the pipeline
- Click the Edit stage button to view how to edit a stage
- Click the Add stage button
- Click the Add action button
- Edit an existing action by clicking on the Pencil icon on the action
- Click the Disable transition button
- Click the Enable transition button
- Click on a Revision link
- Click the View current revisions button
- Click the View history button
- Click the Release change button
- Release Change
To disable a transition, follow the instructions below.
aws codepipeline disable-stage-transition --pipeline-name MyFirstPipeline --stage-name Staging --transition-type Inbound --reason "My Reason"
To enable a transition, follow the instructions below.
aws codepipeline enable-stage-transition --pipeline-name MyFirstPipeline --stage-name Staging --transition-type Inbound
After manually creating a pipeline, you can export its contents in JSON format using the CLI. This is helpful when you want to run it from the CLI later or through AWS CloudFormation.
To pipe the contents of a specific pipeline to a JSON file, run the command below replacing YOUR_PIPELINE_NAME with your pipeline nameas found in your AWS CodePipeline Console.
aws codepipeline get-pipeline --name YOUR_PIPELINE_NAME > my-pipeline.json
For more information, see get-pipeline.
To delete a pipeline, follow the instructions below.
From the AWS CodePipeline console, select the pipeline you previously created:
- Select Edit
- Select Delete
- Type in the name of the pipeline to confirm deletion and select Delete
Go to Cleanup to remove any resources you created in this sublesson.