id
stringlengths 14
16
| text
stringlengths 1
2.43k
| source
stringlengths 99
229
|
---|---|---|
854a55b9d316-2 | For information, see [View variables \(console\)](#actions-variables-view-console)\.
+ **CodeBuild console:** Choose your build project and choose the link for your build run\. Under **Environment variables**, your resolved output variable is the value for the CodeBuild environment variable\. In this example, the environment variable **Name** is `BranchName` and the **Value** is the resolved `BranchName` output variable from the GitHub source action\. In this example, the resolved value is `master`\.
![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variable-codebuild-resolved.png)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md |
07cc750052a2-0 | You can use notification rules to notify users of important changes, such as when a pipeline starts execution\. Notification rules specify both the events and the Amazon SNS topic that is used to send notifications\. For more information, see [What are notifications?](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/welcome.html)
You can use the console or the AWS CLI to create notification rules for AWS CodePipeline\. <a name="notification-rule-create-console"></a> | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/notification-rule-create.md |
6a0a58a1728c-0 | 1. Sign in to the AWS Management Console and open the CodePipeline console at [https://console\.aws\.amazon\.com/codepipeline/](https://console.aws.amazon.com/codepipeline/)\.
1. Choose **Pipelines**, and then choose a pipeline where you want to add notifications\.
1. On the pipeline page, choose **Notify**, and then choose **Create notification rule**\. You can also go to the **Settings** page for the pipeline and choose **Create notification rule**\.
1. In **Notification name**, enter a name for the rule\.
1. In **Detail type**, choose **Basic** if you want only the information provided to Amazon EventBridge included in the notification\. Choose **Full** if you want to include information provided to Amazon EventBridge and information that might be supplied by the CodePipeline or the notification manager\.
For more information, see [Understanding Notification Contents and Security](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/security.html#security-notifications)\.
1. In **Events that trigger notifications**, select the events for which you want to send notifications\. For more information, see [ Events for Notification Rules on Pipelines](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#events-ref-pipeline)\.
1. In **Targets**, do one of the following: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/notification-rule-create.md |
6a0a58a1728c-1 | 1. In **Targets**, do one of the following:
+ If you have already configured a resource to use with notifications, in **Choose target type**, choose either **AWS Chatbot \(Slack\)** or **SNS topic**\. In **Choose target**, choose the name of the client \(for a Slack client configured in AWS Chatbot\) or the Amazon Resource Name \(ARN\) of the Amazon SNS topic \(for Amazon SNS topics already configured with the policy required for notifications\)\.
+ If you have not configured a resource to use with notifications, choose **Create target**, and then choose **SNS topic**\. Provide a name for the topic after **codestar\-notifications\-**, and then choose **Create**\.
**Note**
If you create the Amazon SNS topic as part of creating the notification rule, the policy that allows the notifications feature to publish events to the topic is applied for you\. Using a topic created for notification rules helps ensure that you subscribe only those users that you want to receive notifications about this resource\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/notification-rule-create.md |
6a0a58a1728c-2 | You cannot create an AWS Chatbot client as part of creating a notification rule\. If you choose AWS Chatbot \(Slack\), you will see a button directing you to configure a client in AWS Chatbot\. Choosing that option opens the AWS Chatbot console\. For more information, see [ Configure Integrations Between Notifications and AWS Chatbot](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/notifications-chatbot.html)\.
If you want to use an existing Amazon SNS topic as a target, you must add the required policy for AWS CodeStar Notifications in addition to any other policies that might exist for that topic\. For more information, see [Configure Amazon SNS Topics for Notifications ](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/set-up-sns.html) and [Understanding Notification Contents and Security](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/security.html#security-notifications)\.
1. To finish creating the rule, choose **Submit**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/notification-rule-create.md |
6a0a58a1728c-3 | 1. To finish creating the rule, choose **Submit**\.
1. You must subscribe users to the Amazon SNS topic for the rule before they can receive notifications\. For more information, see [Subscribe Users to Amazon SNS Topics That Are Targets](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/subscribe-users-sns.html)\. You can also set up integration between notifications and AWS Chatbot to send notifications to Amazon Chime chatrooms or Slack channels\. For more information, see [Configure Integration Between Notifications and AWS Chatbot](https://docs.aws.amazon.com/codestar-notifications/latest/userguide/notifications-chatbot.html)\.<a name="notification-rule-create-cli"></a> | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/notification-rule-create.md |
99455c07181f-0 | 1. At a terminal or command prompt, run the create\-notification rule command to generate the JSON skeleton:
```
aws codestar-notifications create-notification-rule --generate-cli-skeleton > rule.json
```
You can name the file anything you want\. In this example, the file is named *rule\.json*\.
1. Open the JSON file in a plain\-text editor and edit it to include the resource, event types, and target you want for the rule\. The following example shows a notification rule named **MyNotificationRule** for a pipeline named *MyDemoPipeline* in an AWS acccount with the ID *123456789012*\. Notifications are sent with the full detail type to an Amazon SNS topic named *codestar\-notifications\-MyNotificationTopic* when pipeline executions start:
```
{
"Name": "MyNotificationRule",
"EventTypeIds": [
"codepipeline-pipeline-pipeline-execution-started"
],
"Resource": "arn:aws:codebuild:us-east-2:123456789012:MyDemoPipeline",
"Targets": [
{
"TargetType": "SNS", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/notification-rule-create.md |
99455c07181f-1 | "Targets": [
{
"TargetType": "SNS",
"TargetAddress": "arn:aws:sns:us-east-2:123456789012:codestar-notifications-MyNotificationTopic"
}
],
"Status": "ENABLED",
"DetailType": "FULL"
}
```
Save the file\.
1. Using the file you just edited, at the terminal or command line, run the create\-notification\-rule command again to create the notification rule:
```
aws codestar-notifications create-notification-rule --cli-input-json file://rule.json
```
1. If successful, the command returns the ARN of the notification rule, similar to the following:
```
{
"Arn": "arn:aws:codestar-notifications:us-east-1:123456789012:notificationrule/dc82df7a-EXAMPLE"
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/notification-rule-create.md |
7af90ec35cc8-0 | CodePipeline uses GitHub OAuth tokens and personal access tokens to access your GitHub repositories and retrieve the latest changes\. There are two ways to configure authentication in GitHub:
+ AWS creates a default AWS managed OAuth token when you use the console to create or update pipelines\.
+ You can create and manage your own customer\-generated personal access tokens\. You need personal access tokens when you use the CLI, SDK, or AWS CloudFormation to create or update your pipeline\.
**Topics**
+ [View your authorized OAuth apps](#GitHub-view-oauth-token)
+ [Configure your pipeline to use a personal access token \(GitHub and CLI\)](GitHub-create-personal-token-CLI.md)
+ [Use GitHub and the CodePipeline CLI to create and rotate your GitHub personal access token on a regular basis](#GitHub-rotate-personal-token-CLI) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/GitHub-authentication.md |
e1a83c824a50-0 | CodePipeline uses OAuth tokens to integrate with GitHub\. GitHub tracks the permissions of the OAuth token for CodePipeline\.
**To view your authorized integrations in GitHub**
1. In GitHub, from the drop\-down option on your profile photo, choose **Settings**\.
1. Choose **Applications**, and then choose **Authorized OAuth Apps**\.
1. Review your authorized apps\.
![\[Review authorized apps in GitHub.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/oauth-apps.png)![\[Review authorized apps in GitHub.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Review authorized apps in GitHub.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/GitHub-authentication.md |
5bf371fbe3ba-0 | The advantage of using tokens instead of passwords in a script is that tokens can be revoked or rotated\. You can also grant specific privileges and permissions to a personal access token\. Tokens should be stored securely and rotated or regenerated routinely\. Token rotation is recommended by [RFC\-6819 \(OAuth 2\.0 Threat Model and Security Considerations\), section 5\.1\.5\.3](https://tools.ietf.org/html/rfc6819#section-5.1.5.3)\.
For more information, see [Creating a personal access token for the command line](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) on the GitHub website\.
After you have regenerated a new personal access token, you can rotate it by using the AWS CLI or API or by using AWS CloudFormation and calling `UpdatePipeline`\.
**Note**
You might have to update other applications if they are using the same personal access token\. As a security best practice, do not share a single token across multiple applications\. Create a new personal access token for each application\.
Use these steps to rotate your GitHub personal access token and then update the pipeline structure with the new token\.
**Note**
After you rotate your personal access token, remember to update any AWS CLI scripts or AWS CloudFormation templates that contain the old token information\.
1. In GitHub, from the drop\-down option on your profile photo, choose **Settings**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/GitHub-authentication.md |
5bf371fbe3ba-1 | 1. In GitHub, from the drop\-down option on your profile photo, choose **Settings**\.
1. Choose **Developer settings**, and then choose **Personal access tokens**\.
1. Next to your GitHub personal access token, choose **Edit**\.
![\[Edit the personal access token.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/personal-token1.png)![\[Edit the personal access token.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Edit the personal access token.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
1. Choose **Regenerate token**\.
![\[Edit the personal access token by regenerating it.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/personal-token2.png)![\[Edit the personal access token by regenerating it.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Edit the personal access token by regenerating it.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
1. Next to the regenerated token, choose the copy icon\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/GitHub-authentication.md |
5bf371fbe3ba-2 | 1. Next to the regenerated token, choose the copy icon\.
![\[Copy the rotated token.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/personal-token3.png)![\[Copy the rotated token.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Copy the rotated token.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
1. At a terminal \(Linux, macOS, or Unix\) or command prompt \(Windows\), run the get\-pipeline command on the pipeline where you want to change the personal access token, and then copy the output of the command to a JSON file\. For example, for a pipeline named MyFirstPipeline, you would type something similar to the following:
```
aws codepipeline get-pipeline --name MyFirstPipeline >pipeline.json
```
The output of the command is sent to the `pipeline.json` file\.
1. Open the file in a plain\-text editor and edit the value in the `OAuthTokenField` of your GitHub action\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/GitHub-authentication.md |
5bf371fbe3ba-3 | 1. Open the file in a plain\-text editor and edit the value in the `OAuthTokenField` of your GitHub action\.
When you use the AWS CLI to create the pipeline, you can pass your GitHub personal access token in this field\. Replace the asterisks \(\*\*\*\*\) with the token you copied from GitHub\. When you run `get-pipeline` to view the action configuration, the four\-asterisk mask is displayed for this value\. For example, for a personal access token with the value `111222333444555666777888EXAMPLE`:
```
"configuration": {
"Owner": "MyGitHubUserName",
"Repo": "test-repo",
"Branch": "master",
"OAuthToken": "111222333444555666777888EXAMPLE"
}
```
**Note**
When you use an AWS CloudFormation template to update the pipeline, you must first store the token as a secret in AWS Secrets Manager\. You include the value for this field as a dynamic reference to the stored secret in Secrets Manager\. For an example, see [GitHub](action-reference-GitHub.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/GitHub-authentication.md |
5bf371fbe3ba-4 | 1. If you are working with the pipeline structure retrieved using the `get-pipeline` command, you must modify the structure in the JSON file by removing the `metadata` lines from the file\. Otherwise, the `update-pipeline` command cannot use it\. Remove the section from the pipeline structure in the JSON file \(the `"metadata": { }` lines and the `"created"`, `"pipelineARN"`, and `"updated"` fields\)\.
For example, remove the following lines from the structure:
```
"metadata": {
"pipelineArn": "arn:aws:codepipeline:region:account-ID:pipeline-name",
"created": "date",
"updated": "date"
}
```
1. Save the file, and then run update\-pipeline with the `--cli-input-json` parameter to specify the JSON file you just edited\. For example, to update a pipeline named MyFirstPipeline, you would type something similar to the following:
**Important**
Be sure to include `file://` before the file name\. It is required in this command\.
```
aws codepipeline update-pipeline --cli-input-json file://pipeline.json
```
1. When you have finished updating your pipelines, delete the JSON files\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/GitHub-authentication.md |
5bf371fbe3ba-5 | ```
1. When you have finished updating your pipelines, delete the JSON files\.
For more information, see [Pipeline error: I receive a pipeline error that says: "Could not access the GitHub repository" or "Unable to connect to the GitHub repository"](troubleshooting.md#troubleshooting-gs2)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/GitHub-authentication.md |
721813a9c994-0 | Call the put\-rule command, specifying:
+ A name that uniquely identifies the rule you are creating\. This name must be unique across all of the pipelines you create with CodePipeline associated with your AWS account\.
+ The event pattern for the source and detail fields used by the rule\. For more information, see [Amazon CloudWatch Events and Event Patterns](http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html)\.<a name="proc-cli-event-codecommit"></a>
**To create a CloudWatch Events rule with CodeCommit as the event source and CodePipeline as the target**
1. Add permissions for Amazon CloudWatch Events to use CodePipeline to invoke the rule\. For more information, see [Using Resource\-Based Policies for Amazon CloudWatch Events](http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/resource-based-policies-cwe.html)\.
1. Use the following sample to create the trust policy that allows CloudWatch Events to assume the service role\. Name the trust policy `trustpolicyforCWE.json`\.
```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "events.amazonaws.com"
}, | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-trigger-source-repo-changes-cli.md |
721813a9c994-1 | "Principal": {
"Service": "events.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
```
1. Use the following command to create the `Role-for-MyRule` role and attach the trust policy\.
```
aws iam create-role --role-name Role-for-MyRule --assume-role-policy-document file://trustpolicyforCWE.json
```
1. Create the permissions policy JSON, as shown in this sample, for the pipeline named `MyFirstPipeline`\. Name the permissions policy `permissionspolicyforCWE.json`\.
```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codepipeline:StartPipelineExecution"
],
"Resource": [
"arn:aws:codepipeline:us-west-2:80398EXAMPLE:MyFirstPipeline"
]
}
]
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-trigger-source-repo-changes-cli.md |
721813a9c994-2 | ]
}
]
}
```
1. Use the following command to attach the `CodePipeline-Permissions-Policy-for-CWE` permissions policy to the `Role-for-MyRule` role\.
**Why am I making this change?** Adding this policy to the role creates permissions for CloudWatch Events\.
```
aws iam put-role-policy --role-name Role-for-MyRule --policy-name CodePipeline-Permissions-Policy-For-CWE --policy-document file://permissionspolicyforCWE.json
```
1. Call the put\-rule command and include the `--name`, `--event-pattern` , and`--role-arn` parameters\.
**Why am I making this change?** This command enables AWS CloudFormation to create the event\.
The following sample command creates a rule called `MyCodeCommitRepoRule`\.
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-trigger-source-repo-changes-cli.md |
721813a9c994-3 | The following sample command creates a rule called `MyCodeCommitRepoRule`\.
```
aws events put-rule --name "MyCodeCommitRepoRule" --event-pattern "{\"source\":[\"aws.codecommit\"],\"detail-type\":[\"CodeCommit Repository State Change\"],\"resources\":[\"repository-ARN\"],\"detail\":{\"referenceType\":[\"branch\"],\"referenceName\":[\"master\"]}}" --role-arn "arn:aws:iam::ACCOUNT_ID:role/Role-for-MyRule"
```
1. To add CodePipeline as a target, call the put\-targets command and include the following parameters:
+ The `--rule` parameter is used with the `rule_name` you created by using put\-rule\.
+ The `--targets` parameter is used with the list `Id` of the target in the list of targets and the `ARN` of the target pipeline\.
The following sample command specifies that for the rule called `MyCodeCommitRepoRule`, the target `Id` is composed of the number one, indicating that in a list of targets for the rule, this is target 1\. The sample command also specifies an example `ARN` for the pipeline\. The pipeline starts when something changes in the repository\.
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-trigger-source-repo-changes-cli.md |
721813a9c994-4 | ```
aws events put-targets --rule MyCodeCommitRepoRule --targets Id=1,Arn=arn:aws:codepipeline:us-west-2:80398EXAMPLE:TestPipeline
```<a name="proc-cli-flag-codecommit"></a>
**To edit your pipeline's PollForSourceChanges parameter**
**Important**
When you create a pipeline with this method, the `PollForSourceChanges` parameter defaults to true if it is not explicitly set to false\. When you add event\-based change detection, you must add the parameter to your output and set it to false to disable polling\. Otherwise, your pipeline starts twice for a single source change\. For details, see [Default settings for the PollForSourceChanges parameter](reference-pipeline-structure.md#PollForSourceChanges-defaults)\.
1. Run the get\-pipeline command to copy the pipeline structure into a JSON file\. For example, for a pipeline named `MyFirstPipeline`, run the following command:
```
aws codepipeline get-pipeline --name MyFirstPipeline >pipeline.json
```
This command returns nothing, but the file you created should appear in the directory where you ran the command\.
1. Open the JSON file in any plain\-text editor and edit the source stage by changing the `PollForSourceChanges` parameter to `false`, as shown in this example\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-trigger-source-repo-changes-cli.md |
721813a9c994-5 | **Why am I making this change?** Changing this parameter to `false` turns off periodic checks so you can use event\-based change detection only\.
```
"configuration": {
"PollForSourceChanges": "false",
"BranchName": "master",
"RepositoryName": "MyTestRepo"
},
```
1. If you are working with the pipeline structure retrieved using the get\-pipeline command, remove the `metadata` lines from the JSON file\. Otherwise, the update\-pipeline command cannot use it\. Remove the `"metadata": { }` lines and the `"created"`, `"pipelineARN"`, and `"updated"` fields\.
For example, remove the following lines from the structure:
```
"metadata": {
"pipelineArn": "arn:aws:codepipeline:region:account-ID:pipeline-name",
"created": "date",
"updated": "date"
}
```
Save the file\.
1. To apply your changes, run the update\-pipeline command, specifying the pipeline JSON file:
**Important**
Be sure to include `file://` before the file name\. It is required in this command\.
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-trigger-source-repo-changes-cli.md |
721813a9c994-6 | Be sure to include `file://` before the file name\. It is required in this command\.
```
aws codepipeline update-pipeline --cli-input-json file://pipeline.json
```
This command returns the entire structure of the edited pipeline\.
**Note**
The update\-pipeline command stops the pipeline\. If a revision is being run through the pipeline when you run the update\-pipeline command, that run is stopped\. You must manually start the pipeline to run that revision through the updated pipeline\. Use the `start-pipeline-execution` command to manually start your pipeline\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-trigger-source-repo-changes-cli.md |
86131d0a25b9-0 | AWS CodePipeline is integrated with a number of products and services\. The following sections describe best practices and use cases for CodePipeline and these related products and services\.
A simple business use case for CodePipeline can help you understand ways you might implement the service and control user access\. The use cases are described in general terms\. They do not prescribe the APIs to use to achieve the results you want\.
**Topics**
+ [Best practices](#best-practices-1)
+ [Use cases for CodePipeline](#use-cases) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
a4332745b702-0 | Use the best practices outlined in these sections when using CodePipeline\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
9591eb370358-0 | You use encryption and authentication for the source repositories that connect to your pipelines\. For CodePipeline best practices for security, see [Security best practices](security-best-practices.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
04eb2066c24e-0 | You can use logging features in AWS to determine the actions users have taken in your account and the resources that were used\. The log files show:
+ The time and date of actions\.
+ The source IP address for an action\.
+ Which actions failed due to inadequate permissions\.
Logging features are available in the following AWS services:
+ AWS CloudTrail can be used to log AWS API calls and related events made by or on behalf of an AWS account\. For more information, see [Logging CodePipeline API calls with AWS CloudTrail](monitoring-cloudtrail-logs.md)\.
+ Amazon CloudWatch Events can be used to monitor your AWS Cloud resources and the applications you run on AWS\. You can create alerts in Amazon CloudWatch Events based on metrics that you define\. For more information, see [Detect and react to changes in pipeline state with Amazon CloudWatch Events](detect-state-changes-cloudwatch-events.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
af6972a6581a-0 | Use the best practices provided in this section for pipelines with a Jenkins action provider\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
a31237b7799d-0 | As a best practice, when you use a Jenkins build provider for your pipeline’s build or test action, install Jenkins on an Amazon EC2 instance and configure a separate EC2 instance profile\. Make sure the instance profile grants Jenkins only the AWS permissions required to perform tasks for your project, such as retrieving files from Amazon S3\.
The instance profile provides applications running on an Amazon EC2 instance with the credentials to access other AWS services\. As a result, you do not need to configure AWS credentials \(AWS access key and secret key\)\.
To learn how to create the role for your Jenkins instance profile, see the steps in [Create an IAM role to use for Jenkins integration](tutorials-four-stage-pipeline.md#tutorials-four-stage-pipeline-prerequisites-jenkins-iam-role)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
f33d4cfb5098-0 | You can create pipelines that integrate with other AWS services\. These can be AWS services, such as Amazon S3, or third\-party products, such as GitHub\. This section provides examples for using CodePipeline to automate your code releases using different product integrations\. For a full list of integrations with CodePipeline organized by action type, see [CodePipeline pipeline structure reference](reference-pipeline-structure.md)\.
**Topics**
+ [Use CodePipeline with Amazon S3, AWS CodeCommit, and AWS CodeDeploy](#use-cases-S3-codedeploy)
+ [Use CodePipeline with third\-party action providers \(GitHub and Jenkins\)](#use-cases-thirdparty)
+ [Use CodePipeline with AWS CodeStar to build a pipeline in a code project](#use-cases-codestar)
+ [Use CodePipeline to compile, build, and test code with CodeBuild](#use-cases-codebuild)
+ [Use CodePipeline with Amazon ECS for continuous delivery of container\-based applications to the cloud](#use-cases-ecs)
+ [Use CodePipeline with Elastic Beanstalk for continuous delivery of web applications to the cloud](#use-cases-elasticbeanstalk)
+ [Use CodePipeline with AWS Lambda for continuous delivery of Lambda\-based and serverless applications](#use-cases-lambda)
+ [Use CodePipeline with AWS CloudFormation templates for continuous delivery to the cloud](#use-cases-cloudformation) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
2422effa444e-0 | When you create a pipeline, CodePipeline integrates with AWS products and services that act as action providers in each stage of your pipeline\. When you choose stages in the wizard, you must choose a source stage and at least a build or deploy stage\. The wizard creates the stages for you with default names that cannot be changed\. These are the stage names created when you set up a full three\-stage pipeline in the wizard:
+ A source action stage with a default name of “Source\.”
+ A build action stage with a default name of “Build\.”
+ A deploy action stage with a default name of “Staging\.”
You can use the tutorials in this guide to create pipelines and specify stages:
+ The steps in [Tutorial: Create a simple pipeline \(S3 bucket\)](tutorials-simple-s3.md) help you use the wizard to create a pipeline with two default stages: “Source” and “Staging”, where your Amazon S3 repository is the source provider\. This tutorial creates a pipeline that uses AWS CodeDeploy to deploy a sample application from an Amazon S3 bucket to Amazon EC2 instances running Amazon Linux\.
+ The steps in [Tutorial: Create a simple pipeline \(CodeCommit repository\)](tutorials-simple-codecommit.md) help you use the wizard to create a pipeline with a “Source” stage that uses your AWS CodeCommit repository as the source provider\. This tutorial creates a pipeline that uses AWS CodeDeploy to deploy a sample application from an AWS CodeCommit repository to an Amazon EC2 instance running Amazon Linux\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
d638220d74ba-0 | You can create pipelines that integrate with third\-party products such as GitHub and Jenkins\. The steps in [Tutorial: Create a four\-stage pipeline](tutorials-four-stage-pipeline.md) show you how to create a pipeline that:
+ Gets source code from a GitHub repository,
+ Uses Jenkins to build and test the source code,
+ Uses AWS CodeDeploy to deploy the built and tested source code to Amazon EC2 instances running Amazon Linux or Microsoft Windows Server\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
99e410538826-0 | AWS CodeStar is a cloud\-based service that provides a unified user interface for managing software development projects on AWS\. AWS CodeStar works with CodePipeline to combine AWS resources into a project development toolchain\. You can use your AWS CodeStar dashboard to automatically create the pipeline, repositories, source code, build spec files, deployment method, and hosting instances or serverless instances required for a complete code project\.
To create your AWS CodeStar project, you choose your coding language and the type of application you want to deploy\. You can create the following project types: a web application, a web service, or an Alexa skill\.
At any time, you can integrate your preferred IDE into your AWS CodeStar dashboard\. You can also add and remove team members and manage permissions for team members on your project\. For a tutorial that shows you how to use AWS CodeStar to create a sample pipeline for a serverless application, see [Tutorial: Creating and Managing a Serverless Project in AWS CodeStar](https://docs.aws.amazon.com/codestar/latest/userguide/sam-tutorial.html)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
fa60e555baa8-0 | CodeBuild is a managed build service in the cloud that lets you build and test your code without a server or system\. Use CodePipeline with CodeBuild to automate running revisions through the pipeline for continuous delivery of software builds whenever there is a change to the source code\. For more information, see [Use AWS CodePipeline with CodeBuild to test code and run builds](https://docs.aws.amazon.com/codebuild/latest/userguide/how-to-create-pipeline.html)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
8535caf0dc27-0 | Amazon ECS is a container management service that lets you deploy container\-based applications to Amazon ECS instances in the cloud\. Use CodePipeline with Amazon ECS to automate running revisions through the pipeline for continuous deployment of container\-based applications whenever there is a change to the source image repository\. For more information, see [Tutorial: Continuous Deployment with CodePipeline](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cd-pipeline.html)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
514762caa03a-0 | Elastic Beanstalk is a compute service that lets you deploy web applications and services to web servers\. Use CodePipeline with Elastic Beanstalk for continuous deployment of web applications to your application environment\. You can also use AWS CodeStar to create a pipeline with an Elastic Beanstalk deploy action\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
53faf966ff0c-0 | You can use AWS Lambda with CodePipeline for invoking an AWS Lambda function, as described in [Deploying Serverless Applications](https://docs.aws.amazon.com/lambda/latest/dg/automating-deployment.html)\. You can also use AWS Lambda and AWS CodeStar to create a pipeline for deploying serverless applications\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
cac03788de60-0 | You can use AWS CloudFormation with CodePipeline for continuous delivery and automation\. For more information, see [Continuous Delivery with CodePipeline](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline.html)\. AWS CloudFormation is also used to create the templates for pipelines created in AWS CodeStar\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/best-practices.md |
43cf6eb60262-0 | Triggers the pipeline when a new commit is made on the configured CodeCommit repository and branch\.
If you use the console to create or edit the pipeline, CodePipeline creates a CodeCommit CloudWatch Events rule that starts your pipeline when a change occurs in the repository\.
You must have already created a CodeCommit repository before you connect the pipeline through a CodeCommit action\.
**Topics**
+ [Action type](#action-reference-CodeCommit-type)
+ [Configuration parameters](#action-reference-CodeCommit-config)
+ [Input artifacts](#action-reference-CodeCommit-input)
+ [Output artifacts](#action-reference-CodeCommit-output)
+ [Output variables](#action-reference-CodeCommit-variables)
+ [Action declaration \(CodeCommit example\)](#action-reference-CodeCommit-example)
+ [See also](#action-reference-CodeCommit-links) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
374f6e6e5b98-0 | + Category: `Source`
+ Owner: `AWS`
+ Provider: `CodeCommit`
+ Version: `1` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
8d12979d3089-0 | **RepositoryName**
Required: Yes
The name of the repository where source changes are to be detected\.
**BranchName**
Required: Yes
The name of the branch where source changes are to be detected\.
**PollForSourceChanges**
Required: No
`PollForSourceChanges` controls whether CodePipeline polls the CodeCommit repository for source changes\. We recommend that you use CloudWatch Events to detect source changes instead\. For more information about configuring CloudWatch Events, see [Update pipelines for push events \(CodeCommit source\) \(CLI\)](update-change-detection.md#update-change-detection-cli-codecommit) or [Update pipelines for push events \(CodeCommit source\) \(AWS CloudFormation template\)](update-change-detection.md#update-change-detection-cfn-codecommit)\.
If you intend to configure a CloudWatch Events rule, you must set `PollForSourceChanges` to `false` to avoid duplicate pipeline executions\.
Valid values for this parameter:
+ `True`: If set, CodePipeline polls your repository for source changes\.
**Note**
If you omit `PollForSourceChanges`, CodePipeline defaults to polling your repository for source changes\. This behavior is the same as if `PollForSourceChanges` is included and set to `true`\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
8d12979d3089-1 | + `False`: If set, CodePipeline does not poll your repository for source changes\. Use this setting if you intend to configure a CloudWatch Events rule to detect source changes\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
4e36221a7ce7-0 | + **Number of Artifacts:** `0`
+ **Description:** Input artifacts do not apply for this action type\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
11028e378ff0-0 | + **Number of Artifacts:** `1`
+ **Description:** The output artifact of this action is a ZIP file that contains the contents of the configured repository and branch at the commit specified as the source revision for the pipeline execution\. The artifacts generated from the repository are the output artifacts for the CodeCommit action\. The source code commit ID is displayed in CodePipeline as the source revision for the triggered pipeline execution\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
81cb9a04fa8b-0 | When configured, this action produces variables that can be referenced by the action configuration of a downstream action in the pipeline\. This action produces variables which can be viewed as output variables, even if the action doesn't have a namespace\. You configure an action with a namespace to make those variables available to the configuration of downstream actions\.
For more information, see [Variables](reference-variables.md)\.
**CommitId**
The CodeCommit commit ID that triggered the pipeline execution\. Commit IDs are the full SHA of the commit\.
**CommitMessage**
The description message, if any, associated with the commit that triggered the pipeline execution\.
**RepositoryName**
The name of the CodeCommit repository where the commit that triggered the pipeline was made\.
**BranchName**
The name of the branch for the CodeCommit repository where the source change was made\.
**AuthorDate**
The date when the commit was authored, in timestamp format\.
For more information about the difference between an author and a committer in Git, see [Viewing the Commit History](http://git-scm.com/book/ch2-3.html) in Pro Git by Scott Chacon and Ben Straub\.
**CommitterDate**
The date when the commit was committed, in timestamp format\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
81cb9a04fa8b-1 | **CommitterDate**
The date when the commit was committed, in timestamp format\.
For more information about the difference between an author and a committer in Git, see [Viewing the Commit History](http://git-scm.com/book/ch2-3.html) in Pro Git by Scott Chacon and Ben Straub\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
64349bb8e929-0 | ------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
8e3f9ad48685-0 | ```
Actions:
- OutputArtifacts:
- Name: Artifact_MyWebsiteStack
InputArtifacts: []
Name: source
Configuration:
RepositoryName: MyWebsite
BranchName: mainline
PollForSourceChanges: 'false'
RunOrder: 1
ActionTypeId:
Version: '1'
Provider: CodeCommit
Category: Source
Owner: AWS
Name: Source
```
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
114dfc1c539a-0 | ```
{
"Actions": [
{
"OutputArtifacts": [
{
"Name": "Artifact_MyWebsiteStack"
}
],
"InputArtifacts": [],
"Name": "source",
"Configuration": {
"RepositoryName": "MyWebsite",
"BranchName": "mainline",
"PollForSourceChanges": "false"
},
"RunOrder": 1,
"ActionTypeId": {
"Version": "1",
"Provider": "CodeCommit",
"Category": "Source",
"Owner": "AWS"
}
}
],
"Name": "Source"
},
```
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
94cd04e74b75-0 | The following related resources can help you as you work with this action\.
+ [Tutorial: Create a simple pipeline \(CodeCommit repository\)](tutorials-simple-codecommit.md) – This tutorial provides a sample app spec file and sample CodeDeploy application and deployment group\. Use this tutorial to create a pipeline with a CodeCommit source that deploys to Amazon EC2 instances\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeCommit.md |
173768cf4ea5-0 | **Topics**
Other services, such as Amazon S3, also support resource\-based permissions policies\. For example, you can attach a policy to an S3 bucket to manage access permissions to that bucket\. Although CodePipeline doesn't support resource\-based policies, it does store artifacts to be used in pipelines in versioned S3 buckets\.
**Example To create a policy for an S3 bucket to use as the artifact store for CodePipeline**
You can use any versioned S3 bucket as the artifact store for CodePipeline\. If you use the **Create Pipeline** wizard to create your first pipeline, this S3 bucket is created for you to ensure that all objects uploaded to the artifact store are encrypted and connections to the bucket are secure\. If you create your own S3 bucket, as a best practice, consider adding the following policy or its elements to the bucket\. In this policy, the ARN for the S3 bucket is `codepipeline-us-east-2-1234567890`\. Replace this ARN with the ARN for your S3 bucket:
```
{
"Version": "2012-10-17",
"Id": "SSEAndSSLPolicy",
"Statement": [
{
"Sid": "DenyUnEncryptedObjectUploads",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/security_iam_resource-based-policy-examples.md |
173768cf4ea5-1 | "Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::codepipeline-us-east-2-1234567890/*",
"Condition": {
"StringNotEquals": {
"s3:x-amz-server-side-encryption": "aws:kms"
}
}
},
{
"Sid": "DenyInsecureConnections",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::codepipeline-us-east-2-1234567890/*",
"Condition": {
"Bool": {
"aws:SecureTransport": false
}
}
}
]
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/security_iam_resource-based-policy-examples.md |
befb37eebe0a-0 | This walkthrough shows you how to use the AWS CloudFormation console to create infrastructure that includes a pipeline connected to a CodeCommit source repository\. In this tutorial, you use the provided sample template file to create your resource stack, which includes your artifact store, pipeline, and change\-detection resources, such as your Amazon CloudWatch Events rule\. After you create your resource stack in AWS CloudFormation, you can view your pipeline in the AWS CodePipeline console\. The pipeline is a two\-stage pipeline with a CodeCommit source stage and a CodeDeploy deployment stage\.
**Prerequisites:**
You must have created the following resources to use with the AWS CloudFormation sample template:
+ You must have created a source repository\. You can use the AWS CodeCommit repository you created in [Tutorial: Create a simple pipeline \(CodeCommit repository\)](tutorials-simple-codecommit.md)\.
+ You must have created a CodeDeploy application and deployment group\. You can use the CodeDeploy resources you created in [Tutorial: Create a simple pipeline \(CodeCommit repository\)](tutorials-simple-codecommit.md)\.
+ Choose one of these links to download the sample AWS CloudFormation template file for creating a pipeline: [YAML](samples/codepipeline-codecommit-events-yaml.zip) \| [JSON](samples/codepipeline-codecommit-events-json.zip)
Unzip the file and place it on your local computer\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudformation-codecommit.md |
befb37eebe0a-1 | Unzip the file and place it on your local computer\.
+ Download the [SampleApp\_Linux\.zip](samples/SampleApp_Linux.zip) sample application file\.
1. Unzip the files from [SampleApp\_Linux\.zip](samples/SampleApp_Linux.zip) and upload the files to your AWS CodeCommit repository\. You must upload the unzipped files to the root directory of your repository\. You can follow the instructions in [Step 2: Add sample code to your CodeCommit repository](tutorials-simple-codecommit.md#codecommit-add-code) to push the files to your repository\.
1. Open the AWS CloudFormation console and choose **Create Stack**\.
1. In **Choose a template**, choose **Upload a template to Amazon S3**\. Choose **Browse** and then select the template file from your local computer\. Choose **Next**\.
1. In **Stack name**, enter a name for your pipeline\. Parameters specified by the sample template are displayed\. Enter the following parameters:
1. In **ApplicationName**, enter the name of your CodeDeploy application\.
1. In **BetaFleet**, enter the name of your CodeDeploy deployment group\.
1. In **BranchName**, enter the repository branch you want to use\.
1. In **RepositoryName**, enter the name of your CodeCommit source repository\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudformation-codecommit.md |
befb37eebe0a-2 | 1. In **RepositoryName**, enter the name of your CodeCommit source repository\.
![\[\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/create-stack-codecommit-pipeline.png)
1. Choose **Next**\. Accept the defaults on the following page, and then choose **Next**\.
1. In **Capabilities**, select **I acknowledge that AWS CloudFormation might create IAM resources**, and then choose **Create**\.
1. After your stack creation is complete, view the event list to check for any errors\.
**Troubleshooting**
The IAM user who is creating the pipeline in AWS CloudFormation might require additional permissions to create resources for the pipeline\. The following permissions are required in the IAM user's policy to allow AWS CloudFormation to create the required Amazon CloudWatch Events resources for the CodeCommit pipeline:
```
{
"Effect": "Allow",
"Action": [
"events:PutRule",
"events:PutEvents",
"events:PutTargets",
"events:DeleteRule",
"events:RemoveTargets",
"events:DescribeRule"
],
"Resource": "*"
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudformation-codecommit.md |
befb37eebe0a-3 | "events:DescribeRule"
],
"Resource": "*"
}
```
1. Sign in to the AWS Management Console and open the CodePipeline console at [https://console\.aws\.amazon\.com/codepipeline/](https://console.aws.amazon.com/codepipeline/)\.
Under **Pipelines**, choose your pipeline and choose **View**\. The diagram shows your pipeline source and deployment stages\.
1. In your source repository, commit and push a change\. Your change\-detection resources pick up the change, and your pipeline starts\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudformation-codecommit.md |
2d089f23749c-0 | By default, AWS CodePipeline is integrated with a number of AWS services and partner products and services\. Use the information in the following sections to help you configure CodePipeline to integrate with the products and services you use\.
**Topics**
+ [Integrations with CodePipeline action types](integrations-action-type.md)
+ [General integrations with CodePipeline](integrations-general.md)
+ [Examples from the community](integrations-community.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/integrations.md |
3dd574a1f353-0 | You can use the AWS CLI to list webhooks in your account\.
1. To list your webhooks, call the list\-webhooks command and include the `--endpoint-url` and `--region` parameters\.
The following sample command lists webhooks for the "eu\-central\-1" endpoint URL\.
```
aws codepipeline list-webhooks --endpoint-url "https://codepipeline.eu-central-1.amazonaws.com" --region "eu-central-1"
```
1. Webhooks are listed, including the name and ARN for each webhook\.
```
{
"webhooks": [
{
"url": "https://webhooks.domain.com/trigger111111111EXAMPLE11111111111111111": {
"authenticationConfiguration": {
"SecretToken": "Secret"
},
"name": "my-webhook",
"authentication": "GITHUB_HMAC",
"targetPipeline": "my-Pipeline",
"targetAction": "Source",
"filters": [
{
"jsonPath": "$.ref", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-webhooks-view.md |
3dd574a1f353-1 | "filters": [
{
"jsonPath": "$.ref",
"matchEquals": "refs/heads/{Branch}"
}
]
},
"arn": "arn:aws:codepipeline:eu-central-1:ACCOUNT_ID:webhook:my-webhook"
}
]
}
```
1. In GitHub, choose your repository\.
1. Choose **Settings**, and then choose **Webhooks**\.
View the webhook information for your repository\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-webhooks-view.md |
cc8788c1815f-0 | This section is a reference only\. For information about creating a pipeline with source or deploy actions for containers, see [Create a pipeline in CodePipeline](pipelines-create.md)\.
AWS CodePipeline job workers for container actions, such as an Amazon ECR source action or Amazon ECS deploy actions, use definitions files to map the image URI and container name to the task definition\. Each definitions file is a JSON\-formatted file used by the action provider as follows:
+ Amazon ECS standard deployments require an `imagedefinitions.json` file as an input to the deploy action\.
+ Amazon ECS blue/green deployments require an `imageDetail.json` file as an input to the deploy action\.
+ Amazon ECR source actions generate an `imageDetail.json` file that is provided as an output from the source action\.
**Topics**
+ [imagedefinitions\.json file for Amazon ECS standard deployment actions](#pipelines-create-image-definitions)
+ [imageDetail\.json file for Amazon ECS blue/green deployment actions](#file-reference-ecs-bluegreen) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
039159be6bde-0 | An image definitions document is a JSON file that describes your Amazon ECS container name and the image and tag\. If you are deploying container\-based applications, you must generate an image definitions file to provide the CodePipeline job worker with the Amazon ECS container and image identification to retrieve from the repository, such as Docker Hub\.
**Note**
The default file name for the file is `imagedefinitions.json`\. If you choose to use a different file name, you must provide it when you create the pipeline deployment stage\.
Create the `imagedefinitions.json` file with the following considerations:
+ The file must use UTF\-8 encoding\.
+ The maximum file size limit for the image definitions file is 100 KB\.
+ You must create the file as a source or build artifact so that it is an input artifact for the deploy action\. In other words, make sure that the file is either uploaded to your source location, such as your CodeCommit repository, or generated as a built output artifact\.
The `imagedefinitions.json` file provides the container name and image URI\. It must be constructed with the following set of key\-value pairs\.
| Key | Value |
| --- | --- |
| name | container\_name |
| imageUri | imageUri |
Here is the JSON structure, where the container name is `sample-app`, the image URI is `ecs-repo`, and the tag is `latest`:
```
[
{ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
039159be6bde-1 | ```
[
{
"name": "sample-app",
"imageUri": "11111EXAMPLE.dkr.ecr.us-west-2.amazonaws.com/ecs-repo:latest"
}
]
```
You can also construct the file to list multiple container\-image pairs\.
JSON structure:
```
[
{
"name": "simple-app",
"imageUri": "httpd:2.4"
},
{
"name": "simple-app-1",
"imageUri": "mysql"
},
{
"name": "simple-app-2",
"imageUri": "java1.8"
}
]
```
Before you create your pipeline, use the following steps to set up the `imagedefinitions.json` file\.
1. As part of planning the container\-based application deployment for your pipeline, plan the source stage and the build stage, if applicable\.
1. Choose one of the following: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
039159be6bde-2 | 1. Choose one of the following:
1. If your pipeline has skipped the build stage, you must manually create the JSON file and upload it to your source repository so the source action can provide the artifact\. Create the file using a text editor, and name the file or use the default `imagedefinitions.json` file name\. Push the image definitions file to your source repository\.
**Note**
If your source repository is an Amazon S3 bucket, remember to zip the JSON file\.
1. If your pipeline has a build stage, add a command to your build spec file that outputs the image definitions file in your source repository during the build phase\. The following example uses the printf command to create an `imagedefinitions.json` file\. List this command in the `post_build` section of the `buildspec.yml` file:
```
printf '[{"name":"container_name","imageUri":"image_URI"}]' >
imagedefinitions.json
```
You must include the image definitions file as an output artifact in the `buildspec.yml` file\.
1. When you create your pipeline in the console, on the **Deploy** page of the **Create Pipeline** wizard, in **Image Filename**, enter the image definitions file name\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
039159be6bde-3 | For a step\-by\-step tutorial for creating a pipeline that uses Amazon ECS as the deployment provider, see [Tutorial: Continuous Deployment with CodePipeline](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cd-pipeline.html)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
5ac8ae3eb4ca-0 | An `imageDetail.json` document is a JSON file that describes your Amazon ECS image URI\. If you are deploying container\-based applications for a blue/green deployment, you must generate the `imageDetail.json` file to provide the Amazon ECS and CodeDeploy job worker with the image identification to retrieve from the repository, such as Docker Hub\.
**Note**
The name of the file must be `imageDetail.json`\.
You must create the `imageDetail.json` file as a source or build artifact so that it is an input artifact for the deploy action\. You can use one of these methods to provide the `imageDetail.json` file in the pipeline:
+ Include the `imageDetail.json` file in your source location so that it is provided in the pipeline as input to your Amazon ECS blue/green deployment action\.
**Note**
If your source repository is an Amazon S3 bucket, remember to zip the JSON file\.
+ Amazon ECR source actions automatically generate an `imageDetail.json` file as an input artifact to the next action\.
**Note**
Because the Amazon ECR source action creates this file, pipelines with an Amazon ECR source action do not need to manually provide an `imageDetail.json` file\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
5ac8ae3eb4ca-1 | Because the Amazon ECR source action creates this file, pipelines with an Amazon ECR source action do not need to manually provide an `imageDetail.json` file\.
For a tutorial about creating a pipeline that includes an Amazon ECR source stage, see [Tutorial: Create a pipeline with an Amazon ECR source and ECS\-to\-CodeDeploy deployment](tutorials-ecs-ecr-codedeploy.md)\.
![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/imageDetail_file_diagram.png)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
The `imageDetail.json` file provides the image URI\. It must be constructed with the following key\-value pair\.
| Key | Value |
| --- | --- |
| ImageURI | image\_URI |
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
af209f111081-0 | Here is the JSON structure, where the image URI is `ACCOUNTID.dkr.ecr.us-west-2.amazonaws.com/dk-image-repo@sha256:example3`:
```
{
"ImageURI": "ACCOUNTID.dkr.ecr.us-west-2.amazonaws.com/dk-image-repo@sha256:example3"
}
```
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
40924e9f14f0-0 | An `imageDetail.json` file is generated automatically by the Amazon ECR source action each time a change is pushed to the image repository\. The `imageDetail.json` generated by Amazon ECR source actions is provided as an output artifact from the source action to the next action in the pipeline\.
Here is the JSON structure, where the repository name is `dk-image-repo`, the image URI is `ecs-repo`, and the image tag is `latest`:
```
{
"ImageSizeInBytes": "44728918",
"ImageDigest": "sha256:EXAMPLE11223344556677889900bfea42ea2d3b8a1ee8329ba7e68694950afd3",
"Version": "1.0",
"ImagePushedAt": "Mon Jan 21 20:04:00 UTC 2019",
"RegistryId": "EXAMPLE12233",
"RepositoryName": "dk-image-repo",
"ImageURI": "ACCOUNTID.dkr.ecr.us-west-2.amazonaws.com/dk-image-repo@sha256:example3",
"ImageTags": [
"latest"
]
}
```
The `imageDetail.json` file maps the image URI and container name to the Amazon ECS task definition as follows: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
40924e9f14f0-1 | ```
The `imageDetail.json` file maps the image URI and container name to the Amazon ECS task definition as follows:
+ `ImageSizeInBytes`: The size, in bytes, of the image in the repository\.
+ `ImageDigest`: The `sha256` digest of the image manifest\.
+ `Version`: The image version\.
+ `ImagePushedAt`: The date and time when the latest image was pushed to the repository\.
+ `RegistryId`: The AWS account ID associated with the registry that contains the repository\.
+ `RepositoryName`: The name of the Amazon ECR repository where the image was pushed\.
+ `ImageURI`: The URI for the image\.
+ `ImageTags`: The tag used for the image\.
------
Before you create your pipeline, use the following steps to set up the `imageDetail.json` file\.
1. As part of planning the container\-based application blue/green deployment for your pipeline, plan the source stage and the build stage, if applicable\.
1. Choose one of the following:
1. If your pipeline has skipped the build stage, you must manually create the JSON file and upload it to your source repository, such as CodeCommit, so the source action can provide the artifact\. Create the file using a text editor, and name the file or use the default `imageDetail.json` file name\. Push the `imageDetail.json` file to your source repository\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
40924e9f14f0-2 | 1. If your pipeline has a build stage, perform the following:
1. Add a command to your build spec file that outputs the image definitions file in your source repository during the build phase\. The following example uses the printf command to create an `imageDetail.json` file\. List this command in the `post_build` section of the buildspec\.yml file:
```
printf '{"ImageURI":"image_URI"}' > imageDetail.json
```
You must include the `imageDetail.json` file as an output artifact in the `buildspec.yml` file\.
1. Add the `imageDetail.json` as an artifact file in the `buildspec.yml` file\.
```
artifacts:
files:
- imageDetail.json
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/file-reference.md |
3a162719b5c5-0 | After you use the AWS CLI to manually create a webhook, you must register the webhook in GitHub\. A designated AWS endpoint is used for the webhook and is supplied by the put\-webhook command\.
**Important**
If you use the console to create or edit your pipeline, your webhook is created for you\.
To use the AWS CLI to create a webhook, call the put\-webhook command and supply the following:
+ A name that uniquely identifies the webhook\. This name must be unique within the region of the account for the pipeline\.
+ A secret in the JSON file to be used for GitHub authorization\.<a name="proc-cli-gh-webhook"></a>
**To create and register your webhook**
**Note**
When you use the CLI or AWS CloudFormation to create a pipeline and add a webhook, you must disable periodic checks\. To disable periodic checks, you must explicitly add the `PollForSourceChanges` parameter and set it to false, as detailed in the final procedure below\. Otherwise, the default for a CLI or AWS CloudFormation pipeline is that `PollForSourceChanges` defaults to true and does not display in the pipeline structure output\. For more information about PollForSourceChanges defaults, see [Default settings for the PollForSourceChanges parameter](reference-pipeline-structure.md#PollForSourceChanges-defaults)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-webhooks-create.md |
3a162719b5c5-1 | 1. In a text editor, create and save a JSON file for the webhook you want to create\. Use this sample file for a webhook named `my-webhook`:
```
{"webhook":
{"name": "my-webhook",
"targetPipeline": "pipeline_name",
"targetAction": "source_action_name",
"filters": [
{
"jsonPath": "$.ref",
"matchEquals": "refs/heads/{Branch}"
}
],
"authentication": "GITHUB_HMAC",
"authenticationConfiguration": {"SecretToken":"secret"}
}
}
```
1. Call the put\-webhook command and include the `--cli-input` and `--region` parameters\.
The following sample command creates a webhook with the `webhook_json` JSON file\.
```
aws codepipeline put-webhook --cli-input-json file://webhook_json.json --region "eu-central-1"
```
1. In the output shown in this example, the URL and ARN are returned for a webhook named `my-webhook`\.
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-webhooks-create.md |
3a162719b5c5-2 | ```
{
"webhook": {
"url": "https://webhooks.domain.com/trigger111111111EXAMPLE11111111111111111",
"definition": {
"authenticationConfiguration": {
"SecretToken": "secret"
},
"name": "my-webhook",
"authentication": "GITHUB_HMAC",
"targetPipeline": "pipeline_name",
"targetAction": "Source",
"filters": [
{
"jsonPath": "$.ref",
"matchEquals": "refs/heads/{Branch}"
}
]
},
"arn": "arn:aws:codepipeline:eu-central-1:ACCOUNT_ID:webhook:my-webhook"
},
"tags": [{
"key": "Project",
"value": "ProjectA"
}]
}
```
This example adds tagging to the webhook by including the `Project` tag key and `ProjectA` value on the webhook\. For more information about tagging resources in CodePipeline, see [Tagging resources](tag-resources.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-webhooks-create.md |
3a162719b5c5-3 | 1. Call the register\-webhook\-with\-third\-party command and include the `--webhook-name` parameter\.
The following sample command registers a webhook named `my-webhook`\.
```
aws codepipeline register-webhook-with-third-party --webhook-name my-webhook
```
If you are updating a pipeline to use webhooks, you must also use the following procedure to turn off periodic checks\.<a name="proc-cli-flag-github"></a>
**To edit your pipeline's PollForSourceChanges parameter**
**Important**
When you create a pipeline with this method, the `PollForSourceChanges` parameter defaults to true if it is not explicitly set to false\. When you add event\-based change detection, you must add the parameter to your output and set it to false to disable polling\. Otherwise, your pipeline starts twice for a single source change\. For details, see [Default settings for the PollForSourceChanges parameter](reference-pipeline-structure.md#PollForSourceChanges-defaults)\.
1. Run the get\-pipeline command to copy the pipeline structure into a JSON file\. For example, for a pipeline named `MyFirstPipeline`, you would type the following command:
```
aws codepipeline get-pipeline --name MyFirstPipeline >pipeline.json
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-webhooks-create.md |
3a162719b5c5-4 | ```
aws codepipeline get-pipeline --name MyFirstPipeline >pipeline.json
```
This command returns nothing, but the file you created should appear in the directory where you ran the command\.
1. Open the JSON file in any plain\-text editor and edit the source stage by changing or adding the `PollForSourceChanges` parameter\. In this example, for a repository named `UserGitHubRepo`, the parameter is set to `false` \.
**Why am I making this change? ** Changing this parameter turns off periodic checks so you can use event\-based change detection only\.
```
"configuration": {
"Owner": "darlaker",
"Repo": "UserGitHubRepo",
"PollForSourceChanges": "false",
"Branch": "master",
"OAuthToken": "****"
},
```
1. If you are working with the pipeline structure retrieved using the get\-pipeline command, you must edit the structure in the JSON file by removing the `metadata` lines from the file\. Otherwise, the update\-pipeline command cannot use it\. Remove the `"metadata"` section from the pipeline structure in the JSON file, including the : `{ }` and the `"created"`, `"pipelineARN"`, and `"updated"` fields\.
For example, remove the following lines from the structure: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-webhooks-create.md |
3a162719b5c5-5 | For example, remove the following lines from the structure:
```
"metadata": {
"pipelineArn": "arn:aws:codepipeline:region:account-ID:pipeline-name",
"created": "date",
"updated": "date"
}
```
Save the file\.
1. To apply your changes, run the update\-pipeline command, specifying the pipeline JSON file, similar to the following:
**Important**
Be sure to include `file://` before the file name\. It is required in this command\.
```
aws codepipeline update-pipeline --cli-input-json file://pipeline.json
```
This command returns the entire structure of the edited pipeline\.
**Note**
The update\-pipeline command stops the pipeline\. If a revision is being run through the pipeline when you run the update\-pipeline command, that run is stopped\. You must manually start the pipeline to run that revision through the updated pipeline\. Use the start\-pipeline\-execution command to manually start your pipeline\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-webhooks-create.md |
1dc03cdcd452-0 | Use the following table as a reference when you are setting up access control and writing permissions policies that you can attach to an IAM identity \(identity\-based policies\)\. The table lists each CodePipeline API operation and the corresponding actions for which you can grant permissions to perform the action\. For operations that support *resource\-level permissions*, the table lists the AWS resource for which you can grant the permissions\. You specify the actions in the policy's `Action` field\.
*Resource\-level permissions* are those that allow you to specify which resources users are allowed to perform actions on\. AWS CodePipeline provides partial support for resource\-level permissions\. This means that for some AWS CodePipeline API calls, you can control when users are allowed to use those actions based on conditions that must be met, or which resources users are allowed to use\. For example, you can grant users permission to list pipeline execution information, but only for a specific pipeline or pipelines\.
**Note**
The **Resources** column lists the resource required for API calls that support resource\-level permissions\. For API calls that do not support resource\-level permissions, you can grant users permission to use it, but you have to specify a wildcard \(\*\) for the resource element of your policy statement\.
**CodePipeline API Operations and required permissions for actions**
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/permissions-reference.html) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/permissions-reference.md |
b81c142889fc-0 | In AWS CodePipeline, an action is a task performed on an artifact in a stage\. A failure is an action in a stage that is not completed successfully\. You can use the CLI to manually retry the failed action before the stage completes \(while other actions are still in progress\)\. If a stage completes with one or more failed actions, the stage fails, and the pipeline execution does not transition to the next stage in the pipeline\.
You can retry the latest failed actions in a stage without having to run a pipeline again from the beginning\. You do this by retrying the stage that contains the actions\. You can retry a stage immediately after any of actions fail\. All actions that are still in progress continue their work, and failed actions are triggered once again\.
If you are using the console to view a pipeline, a **Retry** button appears on the stage where the failed actions can be retried\.
![\[A stage that contains one or more failed actions displays a Retry button\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/actions-retry-button.png)![\[A stage that contains one or more failed actions displays a Retry button\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[A stage that contains one or more failed actions displays a Retry button\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-retry.md |
b81c142889fc-1 | If you are using the AWS CLI, you can use the get\-pipeline\-state command to determine whether any actions have failed\.
**Note**
In the following cases, you may not be able to retry actions:
The overall pipeline structure changed after an action failed\.
Another retry attempt in the stage is already in progress\.
**Topics**
+ [Retry failed actions \(console\)](#actions-retry-console)
+ [Retry failed actions \(CLI\)](#actions-retry-cli) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-retry.md |
54ac0842c722-0 | ****
1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\.
The names of all pipelines associated with your AWS account are displayed\.
1. In **Name**, choose the name of the pipeline\.
1. Locate the stage with the failed action, and then choose **Retry**\.
**Note**
To identify which actions in the stage can be retried, hover over the **Retry** button\.
If all retried actions in the stage are completed successfully, the pipeline continues to run\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-retry.md |
db32572fc886-0 | **Option 1: Retry failed actions using parameters for the CLI command**
To use the AWS CLI to retry failed actions, you run the retry\-stage\-execution command with the following parameters:
```
--pipeline-name <value>
--stage-name <value>
--pipeline-execution-id <value>
--retry-mode <value>
```
**Note**
The only value you can use for `retry-mode` is `FAILED_ACTIONS`\.
+ At a terminal \(Linux, macOS, or Unix\) or command prompt \(Windows\), run the [https://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-state.html](https://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-state.html) command, as shown in the following example for a pipeline named `MyPipeline`\.
```
aws codepipeline retry-stage-execution --pipeline-name MyPipeline --stage-name Deploy --pipeline-execution-id b59babff-5f34-EXAMPLE --retry-mode FAILED_ACTIONS
```
The output returns the execution ID:
```
{
"pipelineExecutionId": "b59babff-5f34-EXAMPLE"
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-retry.md |
db32572fc886-1 | {
"pipelineExecutionId": "b59babff-5f34-EXAMPLE"
}
```
**Option 2: Retry failed actions using a JSON input file for the CLI command**
You can also run the command with a JSON input file\. You first create a JSON file that identifies the pipeline, the stage that contains the failed actions, and the latest pipeline execution in that stage\. You then run the retry\-stage\-execution command with the `--cli-input-json` parameter\. To retrieve the details you need for the JSON file, it's easiest to use the get\-pipeline\-state command\.
1. At a terminal \(Linux, macOS, or Unix\) or command prompt \(Windows\), run the [https://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-state.html](https://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-state.html) command on a pipeline\. For example, for a pipeline named MyFirstPipeline, you would type something similar to the following:
```
aws codepipeline get-pipeline-state --name MyFirstPipeline
```
The response to the command includes pipeline state information for each stage\. In the following example, the response indicates that one or more actions failed in the Staging stage:
```
{
"updated": 1427245911.525, | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-retry.md |
db32572fc886-2 | ```
{
"updated": 1427245911.525,
"created": 1427245911.525,
"pipelineVersion": 1,
"pipelineName": "MyFirstPipeline",
"stageStates": [
{
"actionStates": [...],
"stageName": "Source",
"latestExecution": {
"pipelineExecutionId": "9811f7cb-7cf7-SUCCESS",
"status": "Succeeded"
}
},
{
"actionStates": [...],
"stageName": "Staging",
"latestExecution": {
"pipelineExecutionId": "3137f7cb-7cf7-EXAMPLE",
"status": "Failed"
}
}
]
}
```
1. In a plain\-text editor, create a file where you will record the following, in JSON format:
+ The name of the pipeline that contains the failed actions
+ The name of the stage that contains the failed actions
+ The ID of the latest pipeline execution in the stage
+ The retry mode\. \(Currently, the only supported value is FAILED\_ACTIONS\) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-retry.md |
db32572fc886-3 | + The ID of the latest pipeline execution in the stage
+ The retry mode\. \(Currently, the only supported value is FAILED\_ACTIONS\)
For the preceding MyFirstPipeline example, your file would look something like this:
```
{
"pipelineName": "MyFirstPipeline",
"stageName": "Staging",
"pipelineExecutionId": "3137f7cb-7cf7-EXAMPLE",
"retryMode": "FAILED_ACTIONS"
}
```
1. Save the file with a name like **retry\-failed\-actions\.json**\.
1. Call the file you created when you run the [https://docs.aws.amazon.com/cli/latest/reference/codepipeline/retry-stage-execution.html](https://docs.aws.amazon.com/cli/latest/reference/codepipeline/retry-stage-execution.html) command\. For example:
**Important**
Be sure to include `file://` before the file name\. It is required in this command\.
```
aws codepipeline retry-stage-execution --cli-input-json file://retry-failed-actions.json
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-retry.md |
db32572fc886-4 | ```
1. To view the results of the retry attempt, either open the CodePipeline console and choose the pipeline that contains the actions that failed, or use the get\-pipeline\-state command again\. For more information, see [View pipeline details and history in CodePipeline](pipelines-view.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-retry.md |
4447b882e8f7-0 | To use the AWS CLI to delete a webhook:
1. You must deregister the webhook before you delete it\. Call the deregister\-webhook\-with\-third\-party command and include the `--webhook-name` parameter\.
The following sample command deregisters the webhook named `"my-webhook"`\.
```
aws codepipeline deregister-webhook-with-third-party --webhook-name my-webhook
```
1. Call the delete\-webhook command and include the `--name` parameter\.
The following sample command deletes the webhook named `"my-webhook"`\.
```
aws codepipeline delete-webhook --name my-webhook
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-webhooks-delete.md |
49e0a88c1e17-0 | You can run the following commands to view details about your pipelines and pipeline executions:
+ list\-pipelines command to view a summary of all of the pipelines associated with your AWS account\.
+ get\-pipeline command to review details of a single pipeline\.
+ list\-pipeline\-executions to view summaries of the most recent executions for a pipeline\.
+ get\-pipeline\-execution to view information about an execution of a pipeline, including details about artifacts, the pipeline execution ID, and the name, version, and status of the pipeline\.
+ get\-pipeline\-state command to view pipeline, stage, and action status\.
+ list\-action\-executions to view action execution details for a pipeline\.
**Topics**
+ [View pipeline \(CLI\)](#pipelines-list-cli)
+ [View execution history \(CLI\)](#pipelines-executions-cli)
+ [View execution status \(CLI\)](#pipelines-executions-status-cli)
+ [View source revisions \(CLI\)](#pipelines-source-revisions-cli)
+ [View action executions \(CLI\)](#pipelines-action-executions-cli) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
8d78f95f026a-0 | You can view pipeline details\.
1. Open a terminal \(Linux, macOS, or Unix\) or command prompt \(Windows\) and use the AWS CLI to run the [list\-pipelines](http://docs.aws.amazon.com/cli/latest/reference/codepipeline/list-pipelines.html) command:
```
aws codepipeline list-pipelines
```
This command returns a list of all of the pipelines associated with your AWS account\.
1. To view details about a pipeline, run the [get\-pipeline](http://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline.html) command, specifying the unique name of the pipeline\. For example, to view details about a pipeline named *MyFirstPipeline*, enter the following:
```
aws codepipeline get-pipeline --name MyFirstPipeline
```
This command returns the structure of the pipeline\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
b474fcdfa21d-0 | You can view pipeline execution history\.
+ To view details about past executions of a pipeline, run the [list\-pipeline\-executions](http://docs.aws.amazon.com/cli/latest/reference/codepipeline/list-pipeline-executions.html) command, specifying the unique name of the pipeline\. For example, to view details about the current state of a pipeline named *MyFirstPipeline*, enter the following:
```
aws codepipeline list-pipeline-executions --pipeline-name MyFirstPipeline
```
This command returns summary information about all pipeline executions for which history has been recorded\. The summary includes start and end times, duration, and status\.
The following example shows the returned data for a pipeline named *MyFirstPipeline* that has had three executions:
```
{
"pipelineExecutionSummaries": [
{
"lastUpdateTime": 1496380678.648,
"pipelineExecutionId": "7cf7f7cb-3137-539g-j458-d7eu3EXAMPLE",
"startTime": 1496380258.243,
"status": "Succeeded"
},
{
"lastUpdateTime": 1496591045.634, | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
b474fcdfa21d-1 | "status": "Succeeded"
},
{
"lastUpdateTime": 1496591045.634,
"pipelineExecutionId": "3137f7cb-8d494hj4-039j-d84l-d7eu3EXAMPLE",
"startTime": 1496590401.222,
"status": "Succeeded"
},
{
"lastUpdateTime": 1496946071.6456,
"pipelineExecutionId": "4992f7jf-7cf7-913k-k334-d7eu3EXAMPLE",
"startTime": 1496945471.5645,
"status": "Succeeded"
}
]
}
```
To view more details about a pipeline execution, run the [get\-pipeline\-execution](http://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-execution.html), specifying the unique ID of the pipeline execution\. For example, to view more details about the first execution in the previous example, enter the following:
```
aws codepipeline get-pipeline-execution --pipeline-name MyFirstPipeline --pipeline-execution-id 7cf7f7cb-3137-539g-j458-d7eu3EXAMPLE | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
b474fcdfa21d-2 | ```
This command returns summary information about an execution of a pipeline, including details about artifacts, the pipeline execution ID, and the name, version, and status of the pipeline\.
The following example shows the returned data for a pipeline named *MyFirstPipeline*:
```
{
"pipelineExecution": {
"pipelineExecutionId": "3137f7cb-7cf7-039j-s83l-d7eu3EXAMPLE",
"pipelineVersion": 2,
"pipelineName": "MyFirstPipeline",
"status": "Succeeded",
"artifactRevisions": [
{
"created": 1496380678.648,
"revisionChangeIdentifier": "1496380258.243",
"revisionId": "7636d59f3c461cEXAMPLE8417dbc6371",
"name": "MyApp",
"revisionSummary": "Updating the application for feature 12-4820"
}
]
}
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
4792f224bd65-0 | You can view pipeline, stage, and action status\.
+ To view details about the current state of a pipeline, run the [get\-pipeline\-state](http://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-state.html) command, specifying the unique name of the pipeline\. For example, to view details about the current state of a pipeline named *MyFirstPipeline*, enter the following:
```
aws codepipeline get-pipeline-state --name MyFirstPipeline
```
This command returns the current status of all stages of the pipeline and the status of the actions in those stages\.
The following example shows the returned data for a three\-stage pipeline named *MyFirstPipeline*, where the first two stages and actions show success, the third shows failure, and the transition between the second and third stages is disabled:
```
{
"updated": 1427245911.525,
"created": 1427245911.525,
"pipelineVersion": 1,
"pipelineName": "MyFirstPipeline",
"stageStates": [
{
"actionStates": [
{
"actionName": "Source",
"entityUrl": "https://console.aws.amazon.com/s3/home?#",
"latestExecution": { | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
4792f224bd65-1 | "latestExecution": {
"status": "Succeeded",
"lastStatusChange": 1427298837.768
}
}
],
"stageName": "Source"
},
{
"actionStates": [
{
"actionName": "Deploy-CodeDeploy-Application",
"entityUrl": "https://console.aws.amazon.com/codedeploy/home?#",
"latestExecution": {
"status": "Succeeded",
"lastStatusChange": 1427298939.456,
"externalExecutionUrl": "https://console.aws.amazon.com/?#",
"externalExecutionId": ""c53dbd42-This-Is-An-Example"",
"summary": "Deployment Succeeded"
}
}
],
"inboundTransitionState": {
"enabled": true
},
"stageName": "Staging"
},
{
"actionStates": [
{
"actionName": "Deploy-Second-Deployment", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
4792f224bd65-2 | {
"actionStates": [
{
"actionName": "Deploy-Second-Deployment",
"entityUrl": "https://console.aws.amazon.com/codedeploy/home?#",
"latestExecution": {
"status": "Failed",
"errorDetails": {
"message": "Deployment Group is already deploying deployment ...",
"code": "JobFailed"
},
"lastStatusChange": 1427246155.648
}
}
],
"inboundTransitionState": {
"disabledReason": "Disabled while I investigate the failure",
"enabled": false,
"lastChangedAt": 1427246517.847,
"lastChangedBy": "arn:aws:iam::80398EXAMPLE:user/CodePipelineUser"
},
"stageName": "Production"
}
]
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
5f7b74a540c1-0 | You can view details about source artifacts \(output artifacts that originated in the first stage of a pipeline\) that are used in an execution of a pipeline\. The details include identifiers, such as commit IDs, check\-in comments, time since the artifact was created or updated and, when you use the CLI, version numbers of build actions\. For some revision types, you can view and open the URL of the commit for the artifact version\. Source revisions are made up of the following:
+ **Summary**: Summary information about the most recent revision of the artifact\. For GitHub and AWS CodeCommit repositories, the commit message\. For Amazon S3 buckets or actions, the user\-provided content of a codepipeline\-artifact\-revision\-summary key specified in the object metadata\.
+ **revisionUrl**: The commit ID for the artifact revision\. For artifacts stored in GitHub or AWS CodeCommit repositories, the commit ID is linked to a commit details page\.
You can run the get\-pipeline\-execution command to view information about the most recent source revisions that were included in a pipeline execution\. After you first run the get\-pipeline\-state command to get details about all stages in a pipeline, you identify the execution ID that applies to a stage for which you want source revision details\. Then you use the execution ID in the get\-pipeline\-execution command\. \(Because stages in a pipeline might have been last successfully completed during different pipeline runs, they can have different execution IDs\.\) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
5f7b74a540c1-1 | In other words, if you want to view details about artifacts currently in the Staging stage, run the get\-pipeline\-state command, identify the current execution ID of the Staging stage, and then run the get\-pipeline\-execution command using that execution ID\.
**To view source revisions in a pipeline**
1. Open a terminal \(Linux, macOS, or Unix\) or command prompt \(Windows\) and use the AWS CLI to run the [get\-pipeline\-state](http://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-state.html) command\. For a pipeline named *MyFirstPipeline*, you would enter:
```
aws codepipeline get-pipeline-state --name MyFirstPipeline
```
This command returns the most recent state of a pipeline, including the latest pipeline execution ID for each stage\.
1. To view details about a pipeline execution, run the get\-pipeline\-execution command, specifying the unique name of the pipeline and the pipeline execution ID of the execution for which you want to view artifact details\. For example, to view details about the execution of a pipeline named *MyFirstPipeline*, with the execution ID 3137f7cb\-7cf7\-039j\-s83l\-d7eu3EXAMPLE, you would enter the following:
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
5f7b74a540c1-2 | ```
aws codepipeline get-pipeline-execution --pipeline-name MyFirstPipeline --pipeline-execution-id 3137f7cb-7cf7-039j-s83l-d7eu3EXAMPLE
```
This command returns information about each source revision that is part of the pipeline execution and identifying information about the pipeline\. Only information about pipeline stages that were included in that execution are included\. There might be other stages in the pipeline that were not part of that pipeline execution\.
The following example shows the returned data for a portion of pipeline named *MyFirstPipeline*, where an artifact named "MyApp" is stored in a GitHub repository:
1.
```
{
"pipelineExecution": {
"artifactRevisions": [
{
"created": 1427298837.7689769,
"name": "MyApp",
"revisionChangeIdentifier": "1427298921.3976923",
"revisionId": "7636d59f3c461cEXAMPLE8417dbc6371",
"revisionSummary": "Updating the application for feature 12-4820",
"revisionUrl": "https://api.github.com/repos/anycompany/MyApp/git/commits/7636d59f3c461cEXAMPLE8417dbc6371" | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
5f7b74a540c1-3 | }
//More revisions might be listed here
],
"pipelineExecutionId": "3137f7cb-7cf7-039j-s83l-d7eu3EXAMPLE",
"pipelineName": "MyFirstPipeline",
"pipelineVersion": 2,
"status": "Succeeded"
}
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
f4c6cab664cd-0 | You can view action execution details for a pipeline, such as action execution ID, input artifacts, output artifacts, execution result, and status\. You provide the Execution ID filter to return a listing of actions in a pipeline execution:
**Note**
Detailed execution history is available for executions run on or after February 21, 2019\.
+ To view action executions for a pipeline, do one of the following:
+ To view details for all action executions in a pipeline, run the list\-action\-executions command, specifying the unique name of the pipeline\. For example, to view action executions in a pipeline named *MyFirstPipeline*, enter the following:
```
aws codepipeline list-action-executions --pipeline-name MyFirstPipeline
```
The following shows a portion of sample output for this command:
```
{
"actionExecutionDetails": [
{
"actionExecutionId": "ID",
"lastUpdateTime": 1552958312.034,
"startTime": 1552958246.542,
"pipelineExecutionId": "Execution_ID",
"actionName": "Build",
"status": "Failed",
"output": {
"executionResult": {
"externalExecutionUrl": "Project_ID", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
f4c6cab664cd-1 | "output": {
"executionResult": {
"externalExecutionUrl": "Project_ID",
"externalExecutionSummary": "Build terminated with state: FAILED",
"externalExecutionId": "ID"
},
"outputArtifacts": []
},
"stageName": "Beta",
"pipelineVersion": 8,
"input": {
"configuration": {
"ProjectName": "java-project"
},
"region": "us-east-1",
"inputArtifacts": [
{
"s3location": {
"bucket": "codepipeline-us-east-1-ID",
"key": "MyFirstPipeline/MyApp/Object.zip"
},
"name": "MyApp"
}
],
"actionTypeId": {
"version": "1",
"category": "Build",
"owner": "AWS",
"provider": "CodeBuild"
}
}
},
. . .
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-view-cli.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.