- Priya
- November 25, 2021
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.
- Under Developer Tools select CodePipeline.
- Click on Create pipeline.
- Provide Pipeline name.
- Create or select existing service role.
- Click on Next.
- Select Source Provider.
- If select AWS CodeCommit.
- Then provide Repository name & Branch name.
- Click on Next.
- Select Build provider.
- If select AWS codebuild.
- Then select region.
- Create or select existing project name.Click on link https://www.hackerxone.com/blog/how-create-configure-codebuild-amazon-web-serviceaws for how to create codebuild project.
- Select Build type.
- Click on Next.
- Select Deploy provider like cloudformation stack set,AWS Codedeploy or etc or skip deploy stage.
- Click on Next.
- Review all configurations.
- Click on Create pipeline.
- CodePipeline has been created successfully.
- After sometime Deployment has been done.
Create CodePipeline using Shell
- Setup aws-cli on your system so click on link https://www.hackerxone.com/blog/how-install-configure-aws-cli-ubuntu-1804
- Run the following command:
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
}
}