You must satisfy the following prerequisites before you complete any of the steps described:
Prerequisites:
Output bucket configured in S3.
AWS command-line interface (CLI) installed and configured.
Refer to: http://docs.aws.amazon.com/cli/latest/userguide/installing.html
The AWS CodeBuild project that was created and verified in Calling Synopsys Detect from AWS CodeBuild is referenced in the following steps:
Create a Pipeline in AWS CodePipeline by following the procedures in http://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-create.html#pipelines-create-cli.
When you edit your pipeline.json file, ensure your build stage is configured to use CodeBuild and that the Project Name is configured with the name of the project that was previously created and verified by using AWS CodeBuild.
The following example is a pipeline.json file with source and build stages that uses GitHub as the source:
Note: Ensure that your AWS account info, region and output bucket, match your CodeBuild project information.
{ "pipeline": { "roleArn": "arn:aws:iam::<account id>:role/<CodePipeline service role name>", "stages": [ { "name": "Source", "actions": [ { "inputArtifacts": [], "name": "Source", "actionTypeId": { "category": "Source", "owner": "ThirdParty", "version": "1", "provider": "GitHub" }, "outputArtifacts": [ { "name": "MyApp" } ], "configuration": { "Owner": "<GitHub username>", "Repo": "<repo name>", "PollForSourceChanges": "true", "Branch": "master", "OAuthToken": "****" }, "runOrder": 1 } ] }, { "name": "Build", "actions": [ { "inputArtifacts": [ { "name": "MyApp" } ], "name": "CodeBuild", "actionTypeId": { "category": "Build", "owner": "AWS", "version": "1", "provider": "CodeBuild" }, "outputArtifacts": [ { "name": "target" } ], "configuration": { "ProjectName": "<project name>" }, "runOrder": 1 } ] } ], "artifactStore": { "type": "S3", "location": "<output bucket name>" }, "name": "<pipeline name>", "version": 1 } } |
If there are changes in the source code, the AWS CodePipeline runs those changes through the pipeline and starts a new pipeline job. |
.