How to Create & Configure CodePipeline on Amazon Web Service.

AWS Code Pipeline is a fully managed continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates. You can easily integrate AWS Code Pipeline with third-party services such as GitHub or with your own custom plugin.

AWS CodePipeline is a workflow management tool that allows users to construct and manage a process whereby their code can be built, tested and deployed into either a test and/or production environment.Workflows can be constructed either through the AWS command line, or through an intuitive user interface.

 

  • Login to aws portal.
  • Click on Services.

 

Fig 1

 

  • Under Developer Tools select CodePipeline.

 

Fig 2

 

  • Click on Create pipeline.

 

Fig. 4

 

  • Provide Pipeline name.
  • Create or select existing service role.
  • Click on Next.

 

Fig. 5

 

  • Select Source Provider.

 

Fig. 6

 

  • If select AWS CodeCommit.
  • Then provide Repository name & Branch name.
  • Click on Next.

 

Fig. 7

 

 

Fig. 8

 

  • Select Deploy provider like cloudformation stack set,AWS Codedeploy or etc or skip deploy stage.
  • Click on Next.

 

Fig 9

 

  • Review all configurations.

 

Fig 10

 

  • Click on Create pipeline.

 

Fig 11

 

  • CodePipeline has been created successfully.

 

Fig 12

 

  • After sometime Deployment has been done.

 

Fig 13

 

Create CodePipeline using Shell

To create a pipeline

aws codepipeline create-pipeline –cli-input-json /path/of/json/folder

JSON file sample contents:

{
“pipeline”: {
“roleArn”: “arn:aws:iam::12345:role/AWS-CodePipeline-Service”,
“stages”: [
{
“name”: “Source”,
“actions”: [
{
“inputArtifacts”: [],
“name”: “Source”,
“actionTypeId”: {
“category”: “Source”,
“owner”: “AWS”,
“version”: “1”,
“provider”: “source-provider-name”
},
“outputArtifacts”: [
{
“name”: “example”
}
],
“configuration”: {
“S3Bucket”: “bucket-name”,
“S3ObjectKey”: “aws-codepipeline-object-key”
},
“runOrder”: 1
}
]
},
{
“name”: “Beta”,
“actions”: [
{
“inputArtifacts”: [
{
“name”: “example”
}
],
“name”: “CodePipelineDemoFleet”,
“actionTypeId”: {
“category”: “Deploy”,
“owner”: “AWS”,
“version”: “1”,
“provider”: “CodeDeploy”
},
“outputArtifacts”: [],
“configuration”: {
“ApplicationName”: “CodePipelin-Application-name”,
“DeploymentGroupName”: “CodePipeline-group-name”
},
“runOrder”: 1
}
]
}
],
“artifactStore”: {
“type”: “S3”,
“location”: “codepipeline-us-east-1-example1”
},
“name”: “MySecondPipeline”,
“version”: 1
}
}

Leave a Reply

Your email address will not be published.