id
stringlengths 14
16
| text
stringlengths 1
2.43k
| source
stringlengths 99
229
|
---|---|---|
4b0fd2e76cac-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-GitHub.md |
d81e21c9909c-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 GitHub 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-GitHub.md |
09ef55af6ce6-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 about variables in CodePipeline, see [Variables](reference-variables.md)\.
**CommitId**
The GitHub 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\.
**CommitUrl**
The URL address for the commit that triggered the pipeline\.
**RepositoryName**
The name of the GitHub repository where the commit that triggered the pipeline was made\.
**BranchName**
The name of the branch for the GitHub 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-GitHub.md |
09ef55af6ce6-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-GitHub.md |
8d8f9fea30e2-0 | ------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-GitHub.md |
d1e30845e067-0 | ```
Name: Source
Actions:
- InputArtifacts: []
ActionTypeId:
Version: '1'
Owner: ThirdParty
Category: Source
Provider: GitHub
OutputArtifacts:
- Name: SourceArtifact
RunOrder: 1
Configuration:
Owner: MyGitHubAccountName
Repo: MyGitHubRepositoryName
PollForSourceChanges: 'false'
Branch: master
OAuthToken: '{{resolve:secretsmanager:MyGitHubSecret:SecretString:token}}'
Name: ApplicationSource
```
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-GitHub.md |
25af9c374dff-0 | ```
{
"Name": "Source",
"Actions": [
{
"InputArtifacts": [],
"ActionTypeId": {
"Version": "1",
"Owner": "ThirdParty",
"Category": "Source",
"Provider": "GitHub"
},
"OutputArtifacts": [
{
"Name": "SourceArtifact"
}
],
"RunOrder": 1,
"Configuration": {
"Owner": "MyGitHubAccountName",
"Repo": "MyGitHubRepositoryName",
"PollForSourceChanges": "false",
"Branch": "master",
"OAuthToken": "{{resolve:secretsmanager:MyGitHubSecret:SecretString:token}}"
},
"Name": "ApplicationSource"
}
]
},
```
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-GitHub.md |
de3651c11b45-0 | The first time you use the console to add a GitHub repository to a pipeline, you are asked to authorize CodePipeline access to your repositories\. The token requires the following GitHub scopes:
+ The `repo` scope, which is used for full control to read and pull artifacts from public and private repositories into a pipeline\.
+ The `admin:repo_hook` scope, which is used for full control of repository hooks\.
When you use the CLI or an AWS CloudFormation template, you must provide the value for a personal access token that you have already created in GitHub\.
To view the CodePipeline OAuth applications for your pipeline, see [View your authorized OAuth apps](GitHub-authentication.md#GitHub-view-oauth-token)\.
To create and manage GitHub personal access tokens, see [Configure your pipeline to use a personal access token \(GitHub and CLI\)](GitHub-create-personal-token-CLI.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-GitHub.md |
85cff6f7f670-0 | The following related resources can help you as you work with this action\.
+ Resource reference for the [AWS CloudFormation User Guide AWS::CodePipeline::Webhook](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-webhook.html) β This includes field definitions, examples, and snippets for the resource in AWS CloudFormation\.
+ Resource reference for the [AWS CloudFormation User Guide AWS::CodeStar::GitHubRepository](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestar-githubrepository.html) β This includes field definitions, examples, and snippets for the resource in AWS CloudFormation\.
+ [Tutorial: Create a pipeline that builds and tests your Android app when a commit is pushed to your GitHub repository](tutorials-codebuild-devicefarm.md) β This tutorial provides a sample build spec file and sample application to create a pipeline with a GitHub source\. It builds and tests an Android app with CodeBuild and AWS Device Farm\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-GitHub.md |
3011b4a5bea0-0 | Now that you've created your first pipeline in [Tutorial: Create a simple pipeline \(S3 bucket\)](tutorials-simple-s3.md) or [Tutorial: Create a simple pipeline \(CodeCommit repository\)](tutorials-simple-codecommit.md), you can start creating more complex pipelines\. This tutorial will walk you through the creation of a four\-stage pipeline that uses a GitHub repository for your source, a Jenkins build server to build the project, and a CodeDeploy application to deploy the built code to a staging server\. After the pipeline is created, you will edit it to add a stage with a test action to test the code, also using Jenkins\.
Before you can create this pipeline, you must configure the required resources\. For example, if you want to use a GitHub repository for your source code, you must create the repository before you can add it to a pipeline\. As part of setting up, this tutorial walks you through setting up Jenkins on an EC2 instance for demonstration purposes\.
**Important**
Many of the actions you add to your pipeline in this procedure involve AWS resources that you need to create before you create the pipeline\. AWS resources for your source actions must always be created in the same AWS Region where you create your pipeline\. For example, if you create your pipeline in the US East \(Ohio\) Region, your CodeCommit repository must be in the US East \(Ohio\) Region\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
3011b4a5bea0-1 | You can add cross\-region actions when you create your pipeline\. AWS resources for cross\-region actions must be in the same AWS Region where you plan to execute the action\. For more information, see [Add a cross\-Region action in CodePipeline](actions-create-cross-region.md)\.
Before you begin this tutorial, you should have already completed the general prerequisites in [Getting started with CodePipeline](getting-started-codepipeline.md)\.
**Topics**
+ [Step 1: Complete prerequisites](#tutorials-four-stage-pipeline-prerequisites)
+ [Step 2: Create a pipeline in CodePipeline](#tutorials-four-stage-pipeline-pipeline-create)
+ [Step 3: Add another stage to your pipeline](#tutorials-four-stage-pipeline-add-stage)
+ [Step 4: Clean up resources](#tutorials-four-stage-pipeline-clean-up) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
b138e9f8724f-0 | To integrate with Jenkins, AWS CodePipeline requires you to install the CodePipeline Plugin for Jenkins on any instance of Jenkins you want to use with CodePipeline\. You should also configure a dedicated IAM user to use for permissions between your Jenkins project and CodePipeline\. The easiest way to integrate Jenkins and CodePipeline is to install Jenkins on an EC2 instance that uses an IAM instance role that you create for Jenkins integration\. In order for links in the pipeline for Jenkins actions to successfully connect, you must configure proxy and firewall settings on the server or EC2 instance to allow inbound connections to the port used by your Jenkins project\. Make sure you have configured Jenkins to authenticate users and enforce access control before you allow connections on those ports \(for example, 443 and 8443 if you have secured Jenkins to only use HTTPS connections, or 80 and 8080 if you allow HTTP connections\)\. For more information, see [Securing Jenkins](https://wiki.jenkins.io/display/JENKINS/Securing+Jenkins)\.
**Note**
This tutorial uses a code sample and configures build steps that convert the sample from Haml to HTML\. You can download the open\-source sample code from the GitHub repository by following the steps in [Copy or clone the sample into a GitHub repository](#tutorials-four-stage-pipeline-prerequisites-github)\. You will need the entire sample in your GitHub repository, not just the \.zip file\.
This tutorial also assumes that:
You are familiar with installing and administering Jenkins and creating Jenkins projects\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
b138e9f8724f-1 | This tutorial also assumes that:
You are familiar with installing and administering Jenkins and creating Jenkins projects\.
You have installed Rake and the Haml gem for Ruby on the same computer or instance that hosts your Jenkins project\.
You have set the required system environment variables so that Rake commands can be run from the terminal or command line \(for example, on Windows systems, modifying the PATH variable to include the directory where you installed Rake\)\.
**Topics**
+ [Copy or clone the sample into a GitHub repository](#tutorials-four-stage-pipeline-prerequisites-github)
+ [Create an IAM role to use for Jenkins integration](#tutorials-four-stage-pipeline-prerequisites-jenkins-iam-role)
+ [Install and configure Jenkins and the CodePipeline Plugin for Jenkins](#tutorials-four-stage-pipeline-prerequisites-jenkins-configure) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
258a3eb59763-0 | **To clone the sample and push to a GitHub repository**
1. Download the sample code from the GitHub repository, or clone the repositories to your local computer\. There are two sample packages:
+ If you will be deploying your sample to Amazon Linux, RHEL, or Ubuntu Server instances, choose [aws\-codepipeline\-jenkins\-aws\-codedeploy\_linux\.zip](https://github.com/awslabs/aws-codepipeline-jenkins-aws-codedeploy_linux)\.
+ If you will be deploying your sample to Windows Server instances, choose [AWSCodePipeline\-Jenkins\-AWSCodeDeploy\_Windows\.zip](https://github.com/awslabs/AWSCodePipeline-Jenkins-AWSCodeDeploy_windows)\.
1. From the repository, choose **Fork** to clone the sample repo into a repo in your Github account\. For more information, see the [GitHub documentation](https://help.github.com/articles/create-a-repo/)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
6bcae5af56ae-0 | As a best practice, consider launching an EC2 instance to host your Jenkins server and using an IAM role to grant the instance the required permissions for interacting with CodePipeline\.
1. Sign in to the AWS Management Console and open the IAM console at [https://console\.aws\.amazon\.com/iam/](https://console.aws.amazon.com/iam/)\.
1. In the IAM console, in the navigation pane, choose **Roles**, and then choose **Create role**\.
1. Under **Select type of trusted entity**, choose **AWS service**\. Under **Choose the service that will use this role**, choose **EC2**\. Under **Select your use case**, choose **EC2**\.
1. Choose **Next: Permissions**\. On the **Attach permissions policies** page, select the `AWSCodePipelineCustomActionAccess` managed policy, and then choose **Next: Tags**\. Choose **Next: Review**\.
1. On the **Review** page, in **Role name**, enter the name of the role to create specifically for Jenkins integration \(for example, *JenkinsAccess*\), and then choose **Create role**\.
When you create the EC2 instance where you will install Jenkins, in **Step 3: Configure Instance Details**, make sure you choose the instance role \(for example, *JenkinsAccess*\)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
6bcae5af56ae-1 | For more information about instance roles and Amazon EC2, see [IAM roles for Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html), [Using IAM Roles to Grant Permissions to Applications Running on Amazon EC2 Instances](https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-usingrole-ec2instance.html), and [Creating a Role to Delegate Permissions to an AWS Service](https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-creatingrole-service.html)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
57013b7c2765-0 | **To install Jenkins and the CodePipeline Plugin for Jenkins**
1. Create an EC2 instance where you will install Jenkins, and in **Step 3: Configure Instance Details**, make sure you choose the instance role you created \(for example, *JenkinsAccess*\)\. For more information about creating EC2 instances, see [Launch an Amazon EC2 instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance_linux.html) in the *Amazon EC2 User Guide*\.
**Note**
If you already have Jenkins resources you want to use, you can do so, but you must create a special IAM user, apply the `AWSCodePipelineCustomActionAccess` managed policy to that user, and then configure and use the access credentials for that user on your Jenkins resource\. If you want to use the Jenkins UI to supply the credentials, configure Jenkins to only allow HTTPS\. For more information, see [Troubleshooting CodePipeline](troubleshooting.md)\.
1. Install Jenkins on the EC2 instance\. For more information, see the Jenkins documentation for [installing Jenkins](https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins) and [starting and accessing Jenkins](https://wiki.jenkins.io/pages/viewpage.action?pageId=42469975), as well as [details of integration with Jenkins](integrations-action-type.md#JenkinsInt_2) in [Product and service integrations with CodePipeline](integrations.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
57013b7c2765-1 | 1. Launch Jenkins, and on the home page, choose **Manage Jenkins**\.
1. On the **Manage Jenkins** page, choose **Manage Plugins**\.
1. Choose the **Available** tab, and in the **Filter** search box, enter **AWS CodePipeline**\. Choose **CodePipeline Plugin for Jenkins** from the list and choose **Download now and install after restart**\.
1. On the **Installing Plugins/Upgrades** page, select **Restart Jenkins when installation is complete and no jobs are running**\.
1. Choose **Back to Dashboard**\.
1. On the main page, choose **New Item**\.
1. In **Item Name**, enter a name for the Jenkins project \(for example, *MyDemoProject*\)\. Choose **Freestyle project**, and then choose **OK**\.
**Note**
Make sure that the name for your project meets the requirements for CodePipeline\. For more information, see [Quotas in AWS CodePipeline](limits.md)\.
1. On the configuration page for the project, select the **Execute concurrent builds if necessary** check box\. In **Source Code Management**, choose **AWS CodePipeline**\. If you have installed Jenkins on an EC2 instance and configured the AWS CLI with the profile for the IAM user you created for integration between CodePipeline and Jenkins, leave all of the other fields empty\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
57013b7c2765-2 | 1. Choose **Advanced**, and in **Provider**, enter a name for the provider of the action as it will appear in CodePipeline \(for example, *MyJenkinsProviderName*\)\. Make sure that this name is unique and easy to remember\. You will use it when you add a build action to your pipeline later in this tutorial, and again when you add a test action\.
**Note**
This action name must meet the naming requirements for actions in CodePipeline\. For more information, see [Quotas in AWS CodePipeline](limits.md)\.
1. In **Build Triggers**, clear any check boxes, and then select **Poll SCM**\. In **Schedule**, enter five asterisks separated by spaces, as follows:
```
* * * * *
```
This polls CodePipeline every minute\.
1. In **Build**, choose **Add build step**\. Choose **Execute shell** \(Amazon Linux, RHEL, or Ubuntu Server\) **Execute batch command** \(Windows Server\), and then enter the following:
```
rake
```
**Note**
Make sure that your environment is configured with the variables and settings required to run rake; otherwise, the build will fail\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
57013b7c2765-3 | **Note**
Make sure that your environment is configured with the variables and settings required to run rake; otherwise, the build will fail\.
1. Choose **Add post\-build action**, and then choose **AWS CodePipeline Publisher**\. Choose **Add**, and in **Build Output Locations**, leave the location blank\. This configuration is the default\. It will create a compressed file at the end of the build process\.
1. Choose **Save** to save your Jenkins project\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
ee10c5a2f201-0 | In this part of the tutorial, you create the pipeline using the **Create Pipeline** wizard\.
**To create a CodePipeline automated release process**
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)\.
1. If necessary, use the Region selector to change the Region to the one where your pipeline resources are located\. For example, if you created resources for the previous tutorial in `us-east-2`, make sure that the Region selector is set to US East \(Ohio\)\.
For more information about the Regions and endpoints available for CodePipeline, see [AWS CodePipeline endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/codepipeline.html)\.
1. On the **Welcome** page, **Getting started** page, or the **Pipelines** page, choose **Create pipeline**\.
1. On the **Step 1: Choose pipeline settings** page, in **Pipeline name**, enter the name for your pipeline\.
1. In **Service role**, choose **New service role** to allow CodePipeline to create a service role in IAM\.
1. Leave the settings under **Advanced settings** at their defaults, and choose **Next**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
ee10c5a2f201-1 | 1. Leave the settings under **Advanced settings** at their defaults, and choose **Next**\.
1. In **Step 2: Add source stage**, in **Source provider**, choose **GitHub**, and then choose **Connect to GitHub**\. This will open a new browser window that will connect you to GitHub\. If prompted to sign in, provide your GitHub credentials\.
**Important**
Do not provide your AWS credentials on the GitHub website\.
After you have selected GitHub, a message displays advising that CodePipeline will create a webhook in GitHub for your pipeline\.
After you have connected to GitHub, choose the repository and branch where you pushed the sample you want to use for this tutorial \(aws\-codepipeline\-jenkins\-aws\-codedeploy\_linux\.zip or AWSCodePipeline\-Jenkins\-AWSCodeDeploy\_Windows\.zip\), and then choose **Next**\.
**Note**
In GitHub, there is a limit to the number of OAuth tokens you can use for an application, such as CodePipeline\. If you exceed this limit, retry the connection to allow CodePipeline to reconnect by reusing existing tokens\. 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/tutorials-four-stage-pipeline.md |
ee10c5a2f201-2 | 1. In **Step 3: Add build stage**, choose **Add Jenkins**\. In **Provider name**, enter the name of the action you provided in the CodePipeline Plugin for Jenkins \(for example *MyJenkinsProviderName*\)\. This name must exactly match the name in the CodePipeline Plugin for Jenkins\. In **Server URL**, enter the URL of the EC2 instance where Jenkins is installed\. In **Project name**, enter the name of the project you created in Jenkins, such as *MyDemoProject*, and then choose **Next**\.
1. In **Step 4: Add deploy stage**, reuse the CodeDeploy application and deployment group you created in [Tutorial: Create a simple pipeline \(S3 bucket\)](tutorials-simple-s3.md)\. In **Deploy provider**, choose **CodeDeploy**\. In **Application name**, enter **CodePipelineDemoApplication**, or choose the refresh button, and then choose the application name from the list\. In **Deployment group**, enter **CodePipelineDemoFleet**, or choose it from the list, and then choose **Next**\.
**Note**
You can use your own CodeDeploy resources or create new ones, but you might incur additional costs\.
1. In **Step 5: Review**, review the information, and then choose **Create pipeline**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
ee10c5a2f201-3 | 1. In **Step 5: Review**, review the information, and then choose **Create pipeline**\.
1. The pipeline automatically starts and runs the sample through the pipeline\. You can view progress and success and failure messages as the pipeline builds the Haml sample to HTML and deploys it a webpage to each of the Amazon EC2 instances in the CodeDeploy deployment\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
75d70405cbac-0 | Now you will add a test stage and then a test action to that stage that uses the Jenkins test included in the sample to determine whether the webpage has any content\. This test is for demonstration purposes only\.
**Note**
If you did not want to add another stage to your pipeline, you could add a test action to the Staging stage of the pipeline, before or after the deployment action\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
3842f5a60dda-0 | **Topics**
+ [Look up the IP address of an instance](#tutorials-four-stage-pipeline-instance-ip-lookup)
+ [Create a Jenkins project for testing the deployment](#tutorials-four-stage-pipeline-create-jenkins-project)
+ [Create a fourth stage](#tutorials-four-stage-pipeline-create-fourth-stage) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
7e8144b10157-0 | **To verify the IP address of an instance where you deployed your code**
1. After **Succeeded** is displayed for the pipeline status, in the status area for the Staging stage, choose **Details**\.
1. In the **Deployment Details** section, in **Instance ID**, choose the instance ID of one of the successfully deployed instances\.
1. Copy the IP address of the instance \(for example, *192\.168\.0\.4*\)\. You will use this IP address in your Jenkins test\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
4fc0af352fec-0 | **To create the Jenkins project**
1. On the instance where you installed Jenkins, open Jenkins and from the main page, choose **New Item**\.
1. In **Item Name**, enter a name for the Jenkins project \(for example, *MyTestProject*\)\. Choose **Freestyle project**, and then choose **OK**\.
**Note**
Make sure that the name for your project meets the CodePipeline requirements\. For more information, see [Quotas in AWS CodePipeline](limits.md)\.
1. On the configuration page for the project, select the **Execute concurrent builds if necessary** check box\. In **Source Code Management**, choose **AWS CodePipeline**\. If you have installed Jenkins on an EC2 instance and configured the AWS CLI with the profile for the IAM user you created for integration between CodePipeline and Jenkins, leave all the other fields empty\.
**Important**
If you are configuring a Jenkins project and it is not installed on an Amazon EC2 instance, or it is installed on an EC2 instance that is running a Windows operating system, complete the fields as required by your proxy host and port settings, and provide the credentials of the IAM user you configured for integration between Jenkins and CodePipeline\.
1. Choose **Advanced**, and in **Category**, choose **Test**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
4fc0af352fec-1 | 1. Choose **Advanced**, and in **Category**, choose **Test**\.
1. In **Provider**, enter the same name you used for the build project \(for example, *MyJenkinsProviderName*\)\. You will use this name when you add the test action to your pipeline later in this tutorial\.
**Note**
This name must meet the CodePipeline naming requirements for actions\. For more information, see [Quotas in AWS CodePipeline](limits.md)\.
1. In **Build Triggers**, clear any check boxes, and then select **Poll SCM**\. In **Schedule**, enter five asterisks separated by spaces, as follows:
```
* * * * *
```
This polls CodePipeline every minute\.
1. In **Build**, choose **Add build step**\. If you are deploying to Amazon Linux, RHEL, or Ubuntu Server instances, choose** Execute shell **\. Then enter the following, where the IP address is the address of the EC2 instance you copied earlier:
```
TEST_IP_ADDRESS=192.168.0.4 rake test
```
If you are deploying to Windows Server instances, choose **Execute batch command**, and then enter the following, where the IP address is the address of the EC2 instance you copied earlier:
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
4fc0af352fec-2 | ```
set TEST_IP_ADDRESS=192.168.0.4 rake test
```
**Note**
The test assumes a default port of 80\. If you want to specify a different port, add a test port statement, as follows:
```
TEST_IP_ADDRESS=192.168.0.4 TEST_PORT=8000 rake test
```
1. Choose **Add post\-build action**, and then choose **AWS CodePipeline Publisher**\. Do not choose **Add**\.
1. Choose **Save** to save your Jenkins project\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
39603411c626-0 | **To add a stage to your pipeline that includes the Jenkins test action**
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)\.
1. In **Name**, choose the name of the pipeline you created, MySecondPipeline\.
1. On the pipeline details page, choose **Edit**\.
1. On the **Edit** page, choose **\+ Stage** to add a stage immediately after the Build stage\.
1. In the name field for the new stage, enter a name \(for example, **Testing**\), and then choose **\+ Add action group**\.
1. In **Action name**, enter *MyJenkinsTest\-Action*\. In **Test provider**, choose the provider name you specified in Jenkins \(for example, *MyJenkinsProviderName*\)\. In **Project name**, enter the name of the project you created in Jenkins \(for example, *MyTestProject*\)\. In **Input artifacts**, choose the artifact from the Jenkins build whose default name is *BuildArtifact*, and then choose **Done**\.
**Note**
Because the Jenkins test action operates on the application built in the Jenkins build step, use the build artifact for the input artifact to the test action\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
39603411c626-1 | Because the Jenkins test action operates on the application built in the Jenkins build step, use the build artifact for the input artifact to the test action\.
For more information about input and output artifacts and the structure of pipelines, see [CodePipeline pipeline structure reference](reference-pipeline-structure.md)\.
1. On the **Edit** page, choose **Save pipeline changes**\. In the **Save pipeline changes** dialog box, choose **Save and continue**\.
1. Although the new stage has been added to your pipeline, a status of **No executions yet** is displayed for that stage because no changes have triggered another run of the pipeline\. To run the sample through the revised pipeline, on the pipeline details page, choose **Release change**\.
The pipeline view shows the stages and actions in your pipeline and the state of the revision running through those four stages\. The time it takes for the pipeline to run through all stages will depend on the size of the artifacts, the complexity of your build and test actions, and other factors\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
85adb1e939c4-0 | After you complete this tutorial, you should delete the pipeline and the resources it uses so you will not be charged for continued use of those resources\. If you do not intend to keep using CodePipeline, delete the pipeline, then the CodeDeploy application and its associated Amazon EC2 instances, and finally, the Amazon S3 bucket used to store artifacts\. You should also consider whether to delete other resources, such as the GitHub repository, if you do not intend to keep using them\.
**To clean up the resources used in this tutorial**
1. Open a terminal session on your local Linux, macOS, or Unix machine, or a command prompt on your local Windows machine, and run the delete\-pipeline command to delete the pipeline you created\. For **MySecondPipeline**, you would enter the following command:
```
aws codepipeline delete-pipeline --name "MySecondPipeline"
```
This command returns nothing\.
1. To clean up your CodeDeploy resources, follow the instructions in [Cleaning Up](http://docs.aws.amazon.com/codedeploy/latest/userguide/getting-started-walkthrough.html#getting-started-walkthrough-clean-up)\.
1. To clean up your instance resources, delete the EC2 instance where you installed Jenkins\. For more information, see [Clean up your instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-clean-up-your-instance.html)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
85adb1e939c4-1 | 1. If you do not intend to create more pipelines or use CodePipeline again, delete the Amazon S3 bucket used to store artifacts for your pipeline\. To delete the bucket, follow the instructions in [Deleting a bucket](http://docs.aws.amazon.com/AmazonS3/latest/UG/DeletingaBucket.html)\.
1. If you do not intend to use the other resources for this pipeline again, consider deleting them by following the guidance for that particular resource\. For example, if you want to delete the GitHub repository, follow the instructions in [Deleting a repository](https://help.github.com/articles/deleting-a-repository/) on the GitHub website\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-four-stage-pipeline.md |
f24e2e54fca4-0 | You can use Amazon CloudWatch Events to trigger pipelines to start when rule or schedule criteria are met\. For pipelines with an Amazon ECR source, an Amazon CloudWatch Events rule detects source changes and then starts your pipeline\. When you use the console to create or change a pipeline, the rule and all associated resources are created for you\. If you create or change a pipeline with an Amazon ECR source in the AWS CLI or AWS CloudFormation, you must use these steps to create the Amazon CloudWatch Events rule and all associated resources manually\.
In Amazon CloudWatch Events, you create a rule to detect and react to changes in the state of the pipeline's defined source\.
**Topics**
+ [Create a CloudWatch Events rule for an Amazon ECR source \(console\)](create-cwe-ecr-source-console.md)
+ [Create a CloudWatch Events rule for an Amazon ECR source \(CLI\)](create-cwe-ecr-source-cli.md)
+ [Create a CloudWatch Events rule for an Amazon ECR source \(AWS CloudFormation template\)](create-cwe-ecr-source-cfn.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/create-cwe-ecr-source.md |
20bf8dde4625-0 | AWS CodePipeline includes a number of actions that help you configure build, test, and deploy resources for your automated release process\. You can add actions to your pipeline that are in an AWS Region different from your pipeline\. When an AWS service is the provider for an action, and this action type/provider type are in a different AWS Region from your pipeline, this is a cross\-Region action\.
**Note**
Certain action types in CodePipeline may only be available in certain AWS Regions\. Also note that there may be AWS Regions where an action type is available, but a specific AWS provider for that action type is not available\.
You can use the console, AWS CLI, or AWS CloudFormation to add cross\-Region actions in pipelines\.
When you create or edit a pipeline, you must have an artifact bucket in the pipeline Region and then you must have one artifact bucket per Region where you plan to execute an action\. For more information about the `ArtifactStores` parameter, see [CodePipeline pipeline structure reference](reference-pipeline-structure.md)\.
**Note**
CodePipeline handles the copying of artifacts from one AWS Region to the other Regions when performing cross\-region actions\.
If you use the console to create a pipeline or cross\-Region actions, default artifact buckets are configured by CodePipeline in the Regions where you have actions\. When you use the AWS CLI, AWS CloudFormation, or an SDK to create a pipeline or cross\-Region actions, you provide the artifact bucket for each Region where you have actions\.
**Note** | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
20bf8dde4625-1 | **Note**
You must create the artifact bucket and encryption key in the same AWS Region as the cross\-Region action and in the same account as your pipeline\.
You cannot create cross\-Region actions for the following action types:
+ Source actions
+ Third\-party actions
+ Custom actions
When a pipeline includes a cross\-Region action as part of a stage, CodePipeline replicates only the input artifacts of the cross\-Region action from the pipeline Region to the action's Region\.
**Note**
The pipeline Region and the Region where your CloudWatch Events change detection resources are maintained remain the same\. The Region where your pipeline is hosted does not change\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
ba15bacec414-0 | You can use the CodePipeline console to add a cross\-Region action to an existing pipeline\. To create a new pipeline with cross\-Region actions using the Create pipeline wizard, see [Create a pipeline \(console\)](pipelines-create.md#pipelines-create-console)\.
In the console, you create a cross\-Region action in a pipeline stage by choosing the action provider and the **Region** field, which lists the resources you have created in that region for that provider\. When you add a cross\-Region action, CodePipeline uses a separate artifact bucket in the action's region\. For more information about cross\-Region artifact buckets, see [CodePipeline pipeline structure reference](reference-pipeline-structure.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
59ae9db37d13-0 | Use the console to add a cross\-Region action to a pipeline\.
**Note**
If the pipeline is running when changes are saved, that execution does not complete\.
**To add a cross\-Region action**
1. Sign in to the console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\.
1. Select your pipeline, and then choose **Edit**\.
1. At the bottom of the diagram, choose **\+ Add stage** if you are adding a new stage, or choose **Edit stage** if you want to add the action to an existing stage\.
1. On **Edit: <Stage>**, choose **\+ Add action group** to add a serial action\. Or choose **\+ Add action** to add a parallel action\.
1. On the **Edit action** page:
1. In **Action name**, enter a name for the cross\-Region action\.
1. In **Action provider**, choose the action provider\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
59ae9db37d13-1 | 1. In **Action provider**, choose the action provider\.
1. In **Region**, choose the AWS Region where you have created or plan to create the resource for the action\. When the Region is selected, the available resources for that Region are listed for selection\. The **Region** field designates where the AWS resources are created for this action type and provider type\. This field only displays for actions where the action provider is an AWS service\. The **Region** field defaults to the same AWS Region as your pipeline\.
![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/xregion-edit-action.png)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
1. In **Input artifacts** choose the appropriate input from the previous stage\. For example, if the previous stage is a source stage, choose **SourceArtifact**\.
1. Complete all the required fields for the action provider you are configuring\.
1. In **Output artifacts** choose the appropriate output to the next stage\. For example, if the next stage is a deployment stage, choose **BuildArtifact**\.
1. Choose **Save**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
59ae9db37d13-2 | 1. Choose **Save**\.
1. On **Edit: <Stage>**, choose **Done**\.
1. Choose **Save**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
4f8be90b7d5e-0 | Use the console to edit an existing cross\-Region action in a pipeline\.
**Note**
If the pipeline is running when changes are saved, that execution does not complete\.
**To edit a cross\-Region action**
1. Sign in to the console at [http://console.aws.amazon.com/codesuite/codepipeline/home.](http://console.aws.amazon.com/codesuite/codepipeline/home.)
1. Select your pipeline, and then choose **Edit**\.
1. Choose **Edit stage**\.
1. On **Edit: <Stage>**, choose the icon to edit an existing action\.
1. On the **Edit action** page, make changes to the fields, as appropriate\.
1. On **Edit: <Stage>**, choose **Done**\.
1. Choose **Save**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
b5464ee21942-0 | Use the console to delete an existing cross\-Region action from a pipeline\.
**Note**
If the pipeline is running when changes are saved, that execution does not complete\.
**To delete a cross\-Region action**
1. Sign in to the console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\.
1. Select your pipeline, and then choose **Edit**\.
1. Choose **Edit stage**\.
1. On **Edit: <Stage>**, choose the icon to delete an existing action\.
1. On **Edit: <Stage>**, choose **Done**\.
1. Choose **Save**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
7a3a0a4cf9cf-0 | You can use the AWS CLI to add a cross\-Region action to an existing pipeline\.
To create a cross\-Region action in a pipeline stage with the AWS CLI, you add the configuration action along with an optional `region` field\. You must also have already created an artifact bucket in the action's region\. Instead of providing the `artifactStore` parameter of the single\-region pipeline, you use the `artifactStores` parameter to include a listing of each Region's artifact bucket\.
**Note**
In this walkthrough and its examples, *RegionA* is the Region where the pipeline is created\. It has access to the *RegionA* Amazon S3 bucket used to store pipeline artifacts and the service role used by CodePipeline\. *RegionB* is the region where the CodeDeploy application, deployment group, and service role used by CodeDeploy are created\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
7dfdc2904eb3-0 | You must have created the following:
+ A pipeline in *RegionA*\.
+ An Amazon S3 artifact bucket in *RegionB*\.
+ The resources for your action, such as your CodeDeploy application and deployment group for a cross\-Region deploy action, in *RegionB*\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
e890da9d7849-0 | Use the AWS CLI to add a cross\-Region action to a pipeline\.
**To add a cross\-Region action**
1. For a pipeline in *RegionA*, 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. Add the `region` field to add a new stage with your cross\-Region action that includes the Region and resources for your action\. The following JSON sample adds a Deploy stage with a cross\-Region deploy action where the provider is CodeDeploy, in a new region `us-east-1`\.
```
{
"name": "Deploy",
"actions": [
{
"inputArtifacts": [
{
"name": "SourceArtifact"
}
],
"name": "Deploy",
"region": "RegionB",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"version": "1",
"provider": "CodeDeploy" | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
e890da9d7849-1 | "owner": "AWS",
"version": "1",
"provider": "CodeDeploy"
},
"outputArtifacts": [],
"configuration": {
"ApplicationName": "name",
"DeploymentGroupName": "name"
},
"runOrder": 1
}
```
1. In the pipeline structure, remove the `artifactStore` field and add the `artifactStores` map for your new cross\-Region action\. The mapping must include an entry for each AWS Region in which you have actions\. For each entry in the mapping, the resources must be in the respective AWS Region\. In the example below, `ID-A` is the encryption key ID for *RegionA*, and `ID-B` is the encryption key ID for *RegionB*\.
```
"artifactStores":{
"RegionA":{
"encryptionKey":{
"id":"ID-A",
"type":"KMS"
},
"location":"Location1",
"type":"S3"
},
"RegionB":{
"encryptionKey":{
"id":"ID-B",
"type":"KMS"
}, | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
e890da9d7849-2 | "encryptionKey":{
"id":"ID-B",
"type":"KMS"
},
"location":"Location2",
"type":"S3"
}
}
```
The following JSON example shows the us\-west\-2 bucket as `my-storage-bucket` and adds the new us\-east\-1 bucket named `my-storage-bucket-us-east-1`\.
```
"artifactStores": {
"us-west-2": {
"type": "S3",
"location": "my-storage-bucket"
},
"us-east-1": {
"type": "S3",
"location": "my-storage-bucket-us-east-1"
}
},
```
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": { | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
e890da9d7849-3 | 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\.
```
aws codepipeline update-pipeline --cli-input-json file://pipeline.json
```
This command returns the entire structure of the edited pipeline\. The output is similar to the following\.
```
{
"pipeline": {
"version": 4,
"roleArn": "ARN",
"stages": [
{
"name": "Source",
"actions": [
{
"inputArtifacts": [],
"name": "Source",
"actionTypeId": {
"category": "Source",
"owner": "AWS",
"version": "1", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
e890da9d7849-4 | "category": "Source",
"owner": "AWS",
"version": "1",
"provider": "CodeCommit"
},
"outputArtifacts": [
{
"name": "SourceArtifact"
}
],
"configuration": {
"PollForSourceChanges": "false",
"BranchName": "master",
"RepositoryName": "MyTestRepo"
},
"runOrder": 1
}
]
},
{
"name": "Deploy",
"actions": [
{
"inputArtifacts": [
{
"name": "SourceArtifact"
}
],
"name": "Deploy",
"region": "us-east-1",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"version": "1",
"provider": "CodeDeploy"
},
"outputArtifacts": [],
"configuration": {
"ApplicationName": "name", | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
e890da9d7849-5 | "outputArtifacts": [],
"configuration": {
"ApplicationName": "name",
"DeploymentGroupName": "name"
},
"runOrder": 1
}
]
}
],
"name": "AnyCompanyPipeline",
"artifactStores": {
"us-west-2": {
"type": "S3",
"location": "my-storage-bucket"
},
"us-east-1": {
"type": "S3",
"location": "my-storage-bucket-us-east-1"
}
}
}
}
```
**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\.
1. After you update your pipeline, the cross\-Region actions is displayed in the console, as shown here\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
e890da9d7849-6 | 1. After you update your pipeline, the cross\-Region actions is displayed in the console, as shown here\.
![\[A high-level view of a pipeline that includes a cross-Region action.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/cross-region-icon.png)![\[A high-level view of a pipeline that includes a cross-Region action.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[A high-level view of a pipeline that includes a cross-Region action.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
1cbf694d3702-0 | You can use AWS CloudFormation to add a cross\-Region action to an existing pipeline\.
**To add a cross\-Region action with AWS CloudFormation**
1. Add the `Region` parameter to the `ActionDeclaration` resource in your template, as shown in this example:
```
ActionDeclaration:
Type: Object
Properties:
ActionTypeId:
Type: ActionTypeId
Required: true
Configuration:
Type: Map
InputArtifacts:
Type: Array
ItemType:
Type: InputArtifact
Name:
Type: String
Required: true
OutputArtifacts:
Type: Array
ItemType:
Type: OutputArtifact
RoleArn:
Type: String
RunOrder:
Type: Integer
Region:
Type: String
```
1. Under `Mappings`, add the region map as shown in this example for a mapping named `SecondRegionMap` that maps values for the keys `RegionA` and `RegionB`\. Under the `Pipeline` resource, under the `artifactStore` field, add the `artifactStores` map for your new cross\-Region action as follows:
```
Mappings:
SecondRegionMap:
RegionA: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
1cbf694d3702-1 | ```
Mappings:
SecondRegionMap:
RegionA:
SecondRegion: "RegionB"
RegionB:
SecondRegion: "RegionA"
...
Properties:
ArtifactStores:
-
Region: RegionB
ArtifactStore:
Type: "S3"
Location: test-cross-region-artifact-store-bucket-RegionB
-
Region: RegionA
ArtifactStore:
Type: "S3"
Location: test-cross-region-artifact-store-bucket-RegionA
```
The following YAML example shows the *RegionA* bucket as `us-west-2` and adds the new *RegionB* bucket, `eu-central-1`:
```
Mappings:
SecondRegionMap:
us-west-2:
SecondRegion: "eu-central-1"
eu-central-1:
SecondRegion: "us-west-2"
...
Properties:
ArtifactStores:
-
Region: eu-central-1
ArtifactStore:
Type: "S3"
Location: test-cross-region-artifact-store-bucket-eu-central-1
-
Region: us-west-2
ArtifactStore: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
1cbf694d3702-2 | -
Region: us-west-2
ArtifactStore:
Type: "S3"
Location: test-cross-region-artifact-store-bucket-us-west-2
```
1. Save the updated template to your local computer, and then open the AWS CloudFormation console\.
1. Choose your stack, and then choose **Create Change Set for Current Stack**\.
1. Upload the template, and then view the changes listed in AWS CloudFormation\. These are the changes to be made to the stack\. You should see your new resources in the list\.
1. Choose **Execute**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-create-cross-region.md |
6694597a6efb-0 | If you have a pipeline that uses polling to react to source changes, you can update it to use the recommended detection method \(webhooks for pipelines with a GitHub source and Amazon CloudWatch Events for pipelines with a CodeCommit or Amazon S3 source\)\.
| How to migrate pipelines to the recommended change detection method | Source | Recommended detection method | Console | CLI | AWS CloudFormation |
| --- | --- | --- | --- | --- | --- |
| Amazon S3 | Amazon CloudWatch Events \(recommended\) and an AWS CloudTrail trail\. | See [Update pipelines for push events \(CodeCommit or Amazon S3 source\) \(console\)](update-change-detection.md#update-change-detection-console-codecommit-S3)\. | See [Update pipelines for push events \(Amazon S3 source\) \(CLI\)](update-change-detection.md#update-change-detection-cli-S3)\. | See [Update pipelines for push events \(Amazon S3 source\) \(AWS CloudFormation template\)](update-change-detection.md#update-change-detection-cfn-s3)\. | | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/trigger-S3-migration-cwe.md |
6694597a6efb-1 | | AWS CodeCommit | Amazon CloudWatch Events \(recommended\)\. | See [Update pipelines for push events \(CodeCommit or Amazon S3 source\) \(console\)](update-change-detection.md#update-change-detection-console-codecommit-S3)\. | See [Update pipelines for push events \(CodeCommit source\) \(CLI\)](update-change-detection.md#update-change-detection-cli-codecommit)\. | See [Update pipelines for push events \(CodeCommit source\) \(AWS CloudFormation template\)](update-change-detection.md#update-change-detection-cfn-codecommit)\. |
| GitHub | Webhooks \(recommended\)\.[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/trigger-S3-migration-cwe.html) | See [Update pipelines for push events \(GitHub source\) \(console\)](update-change-detection.md#update-change-detection-console-github)\. | See [Update pipelines for push events \(GitHub source\) \(CLI\)](update-change-detection.md#update-change-detection-cli-github)\. | See [Update pipelines for push events \(GitHub source\) \(AWS CloudFormation template\)](update-change-detection.md#update-change-detection-cfn-github)\. | | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/trigger-S3-migration-cwe.md |
0a777534bfaf-0 | Transitions are links between pipeline stages that can be disabled or enabled\. They are enabled by default\. When you re\-enable a disabled transition, the latest revision runs through the remaining stages of the pipeline unless more than 30 days have passed\. Pipeline execution won't resume for a transition that has been disabled more than 30 days unless a new change is detected or you manually rerun the pipeline\.
You can use the AWS CodePipeline console or the AWS CLI to disable or enable transitions between stages in a pipeline\.
**Note**
You can use an approval action to pause the run of a pipeline until it is manually approved to continue\. For more information, see [Manage approval actions in CodePipeline](approvals.md)\.
**Topics**
+ [Disable or enable transitions \(console\)](#transitions-disable-enable-console)
+ [Disable or enable transitions \(CLI\)](#transitions-disable-enable-cli) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/transitions.md |
905880d4099e-0 | **To disable or enable transitions in a pipeline**
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 for which you want to enable or disable transitions\. This opens a detailed view of the pipeline, including the transitions between the stages of the pipeline\.
1. Find the arrow after the last stage that you want to run, and then choose the button next to it\. For example, in the following pipeline, if you want the actions in the **Staging** stage to run, but not the actions in the stage named **Production**, choose the **Disable transition** button between those two stages:
![\[Select the arrow between stages to enable or disable transitions.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/codepipeline-enabled-transition-pol.png)![\[Select the arrow between stages to enable or disable transitions.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Select the arrow between stages to enable or disable transitions.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/transitions.md |
905880d4099e-1 | 1. In the **Disable transition** dialog box, enter a reason for disabling the transition, and then choose **Disable**\.
The button changes to show that transitions are disabled between the stage preceding the arrow and the stage following the arrow\. Any revisions that were already running in the stages that come after the disabled transition continue through the pipeline, but any subsequent revisions do not continue past the disabled transition\.
![\[The arrow between stages in a pipeline indicates whether a transition is enabled or disabled.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/codepipeline-disabled-transition3-pol.png)![\[The arrow between stages in a pipeline indicates whether a transition is enabled or disabled.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[The arrow between stages in a pipeline indicates whether a transition is enabled or disabled.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
1. Choose the **Enable transition** button next to the arrow\. In the **Enable transition** dialog box, choose **Enable**\. The pipeline immediately enables the transition between the two stages\. If any revisions have been run through the earlier stages after the transition was disabled, in a few moments, the pipeline starts running the latest revision through the stages after the formerly disabled transition\. The pipeline runs the revision through all remaining stages in the pipeline\.
**Note** | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/transitions.md |
905880d4099e-2 | **Note**
It might take a few seconds for changes to appear in the CodePipeline console after you enable the transition\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/transitions.md |
f8ef21a22bb8-0 | To disable a transition between stages by using the AWS CLI, run the disable\-stage\-transition command\. To enable a disabled transition, run the enable\-stage\-transition command\.
**To disable a transition**
1. Open a terminal \(Linux, macOS, or Unix\) or command prompt \(Windows\) and use the AWS CLI to run the [disable\-stage\-transition](http://docs.aws.amazon.com/cli/latest/reference/codepipeline/disable-stage-transition.html) command, specifying the name of the pipeline, the name of the stage to which you want to disable transitions, the transition type, and the reason you are disabling transitions to that stage\. Unlike using the console, you must also specify whether you are disabling transitions into the stage \(inbound\) or transitions out of the stage after all actions complete \(outbound\)\.
For example, to disable the transition to a stage named *Staging* in a pipeline named *MyFirstPipeline*, you would type a command similar to the following:
```
aws codepipeline disable-stage-transition --pipeline-name MyFirstPipeline --stage-name Staging --transition-type Inbound --reason "My Reason"
```
The command returns nothing\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/transitions.md |
f8ef21a22bb8-1 | ```
The command returns nothing\.
1. To verify the transition has been disabled, either view the pipeline in the CodePipeline console or run the get\-pipeline\-state command\. For more information, see [View pipeline details and history \(console\)](pipelines-view-console.md) and [View pipeline details and history \(CLI\)](pipelines-view-cli.md)\.
**To enable a transition**
1. Open a terminal \(Linux, macOS, or Unix\) or command prompt \(Windows\) and use the AWS CLI to run the [enable\-stage\-transition](http://docs.aws.amazon.com/cli/latest/reference/codepipeline/enable-stage-transition.html) command, specifying the name of the pipeline, the name of the stage to which you want to enable transitions, and the transition type\.
For example, to enable the transition to a stage named *Staging* in a pipeline named *MyFirstPipeline*, you would type a command similar to the following:
```
aws codepipeline enable-stage-transition --pipeline-name MyFirstPipeline --stage-name Staging --transition-type Inbound
```
The command returns nothing\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/transitions.md |
f8ef21a22bb8-2 | ```
The command returns nothing\.
1. To verify the transition has been disabled, either view the pipeline in the CodePipeline console or run the get\-pipeline\-state command\. For more information, see [View pipeline details and history \(console\)](pipelines-view-console.md) and [View pipeline details and history \(CLI\)](pipelines-view-cli.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/transitions.md |
179e8bdb4786-0 | Use this reference when working with the AWS CodePipeline commands and as a supplement to information documented in the [AWS CLI User Guide](https://docs.aws.amazon.com/cli/latest/userguide/) and the [AWS CLI Reference](https://docs.aws.amazon.com/cli/latest/reference/)\.
Before you use the AWS CLI, make sure you complete the prerequisites in [Getting started with CodePipeline](getting-started-codepipeline.md)\.
To view a list of all available CodePipeline commands, run the following command:
```
aws codepipeline help
```
To view information about a specific CodePipeline command, run the following command, where *command\-name* is the name of one of the commands listed below \(for example, create\-pipeline\):
```
aws codepipeline command-name help
```
To begin learning how to use the commands in the CodePipeline extension to the AWS CLI, go to one or more of the following sections:
+ [Create a custom action](actions-create-custom-action.md#actions-create-custom-action-cli)
+ [Create a pipeline \(CLI\)](pipelines-create.md#pipelines-create-cli)
+ [Delete a pipeline \(CLI\)](pipelines-delete.md#pipelines-delete-cli) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-command-line.md |
179e8bdb4786-1 | + [Delete a pipeline \(CLI\)](pipelines-delete.md#pipelines-delete-cli)
+ [Disable or enable transitions \(CLI\)](transitions.md#transitions-disable-enable-cli)
+ [View pipeline details and history \(CLI\)](pipelines-view-cli.md)
+ [Retry failed actions \(CLI\)](actions-retry.md#actions-retry-cli)
+ [Start a pipeline manually \(CLI\)](pipelines-rerun-manually.md#pipelines-rerun-manually-cli)
+ [Edit a pipeline \(AWS CLI\)](pipelines-edit.md#pipelines-edit-cli)
You can also view examples of how to use most of these commands in [CodePipeline tutorials](tutorials.md)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-command-line.md |
4f270125dbd4-0 | The following diagram shows an example release process using CodePipeline\.
![\[An example release process using CodePipeline.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/PipelineFlow.png)![\[An example release process using CodePipeline.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[An example release process using CodePipeline.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
In this example, when developers commit changes to a source repository, CodePipeline automatically detects the changes\. Those changes are built, and if any tests are configured, those tests are run\. After the tests are complete, the built code is deployed to staging servers for testing\. From the staging server, CodePipeline runs more tests, such as integration or load tests\. Upon the successful completion of those tests, and after a manual approval action that was added to the pipeline is approved, CodePipeline deploys the tested and approved code to production instances\.
CodePipeline can deploy applications to EC2 instances by using CodeDeploy, AWS Elastic Beanstalk, or AWS OpsWorks Stacks\. CodePipeline can also deploy container\-based applications to services by using Amazon ECS\. Developers can also use the integration points provided with CodePipeline to plug in other tools or services, including build services, test providers, or other deployment targets or systems\.
A pipeline can be as simple or as complex as your release process requires\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/welcome-introducing.md |
8d5c46ba53b2-0 | **To create an AWS CloudTrail trail and enable logging**
To use the AWS CLI to create a trail, call the create\-trail command, specifying:
+ The trail name\.
+ The bucket to which you have already applied the bucket policy for AWS CloudTrail\.
For more information, see [Creating a Trail with the AWS Command Line Interface](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail-by-using-the-aws-cli.html)\.
1. Call the create\-trail command and include the `--name` and `--s3-bucket-name` parameters\.
**Why am I making this change?** This creates the CloudTrail trail required for your S3 source bucket\.
The following command uses `--name` and `--s3-bucket-name` to create a trail named `my-trail` and a bucket named `myBucket`\.
```
aws cloudtrail create-trail --name my-trail --s3-bucket-name myBucket
```
1. Call the start\-logging command and include the `--name` parameter\.
**Why am I making this change? ** This command starts the CloudTrail logging for your source bucket and sends events to CloudWatch Events\.
Example: | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/create-cloudtrail-S3-source-cli.md |
8d5c46ba53b2-1 | **Why am I making this change? ** This command starts the CloudTrail logging for your source bucket and sends events to CloudWatch Events\.
Example:
The following command uses `--name` to start logging on a trail named `my-trail`\.
```
aws cloudtrail start-logging --name my-trail
```
1. Call the put\-event\-selectors command and include the `--trail-name` and `--event-selectors` parameters\. Use event selectors to specify that you want your trail to log data events for your source bucket and send the events to the Amazon CloudWatch Events rule\.
**Why am I making this change? ** This command filters events\.
Example:
The following command uses `--trail-name` and `--event-selectors` to specify data events for a source bucket and prefix named `myBucket/myFolder`\.
```
aws cloudtrail put-event-selectors --trail-name my-trail --event-selectors '[{ "ReadWriteType": "WriteOnly", "IncludeManagementEvents":false, "DataResources": [{ "Type": "AWS::S3::Object", "Values": ["arn:aws:s3:::myBucket/myFolder/file.zip"] }] }]'
```<a name="proc-cli-event-s3-createrule"></a> | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/create-cloudtrail-S3-source-cli.md |
8d5c46ba53b2-2 | ```<a name="proc-cli-event-s3-createrule"></a>
**To create a CloudWatch Events rule with Amazon S3 as the event source and CodePipeline as the target and apply the permissions policy**
1. Grant 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 to allow CloudWatch Events to assume the service role\. Name it `trustpolicyforCWE.json`\.
```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"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\.
**Why am I making this change?** Adding this trust policy to the role creates permissions for CloudWatch Events\.
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/create-cloudtrail-S3-source-cli.md |
8d5c46ba53b2-3 | **Why am I making this change?** Adding this trust policy to the role creates permissions for CloudWatch Events\.
```
aws iam create-role --role-name Role-for-MyRule --assume-role-policy-document file://trustpolicyforCWE.json
```
1. Create the permissions policy JSON, as shown here 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"
]
}
]
}
```
1. Use the following command to attach the new `CodePipeline-Permissions-Policy-for-CWE` permissions policy to the `Role-for-MyRule` role you created\.
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/create-cloudtrail-S3-source-cli.md |
8d5c46ba53b2-4 | ```
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\.
The following sample command creates a rule named `MyS3SourceRule`\.
```
aws events put-rule --name "MyS3SourceRule" --event-pattern "{\"source\":[\"aws.s3\"],\"detail-type\":[\"AWS API Call via CloudTrail\"],\"detail\":{\"eventSource\":[\"s3.amazonaws.com\"],\"eventName\":[\"CopyObject\",\"PutObject\",\"CompleteMultipartUpload\"],\"requestParameters\":{\"bucketName\":[\"my-bucket\"],\"key\":[\"my-key\"]}}}
--role-arn "arn:aws:iam::ACCOUNT_ID:role/Role-for-MyRule"
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/create-cloudtrail-S3-source-cli.md |
8d5c46ba53b2-5 | --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 `--rule` and `--targets` parameters\.
The following command specifies that for the rule named `MyS3SourceRule`, the target `Id` is composed of the number one, indicating that in a list of targets for the rule, this is target 1\. The command also specifies an example `ARN` for the pipeline\. The pipeline starts when something changes in the repository\.
```
aws events put-targets --rule MyS3SourceRule --targets Id=1,Arn=arn:aws:codepipeline:us-west-2:80398EXAMPLE:TestPipeline
```<a name="proc-cli-flag-s3"></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)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/create-cloudtrail-S3-source-cli.md |
8d5c46ba53b2-6 | 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 for a bucket named `storage-bucket` to `false`, as shown in this example\.
**Why am I making this change?** Setting this parameter to `false` turns off periodic checks so you can use event\-based change detection only\.
```
"configuration": {
"S3Bucket": "storage-bucket",
"PollForSourceChanges": "false",
"S3ObjectKey": "index.zip"
},
```
1. If you are working with the pipeline structure retrieved using the get\-pipeline command, you must 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:
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/create-cloudtrail-S3-source-cli.md |
8d5c46ba53b2-7 | 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\.
```
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/create-cloudtrail-S3-source-cli.md |
1acf27342d0b-0 | If you plan to use Amazon SNS to publish notifications to topics when approval actions require review, the service role you use in your CodePipeline operations must be granted permission to access the Amazon SNS resources\. You can use the IAM console to add this permission to your service role\.
****
1. Sign in to the AWS Management Console and open the IAM console at [https://console\.aws\.amazon\.com/iam/](https://console.aws.amazon.com/iam/)\.
**Important**
Make sure you are signed in to the AWS Management Console with the same account information you used in [Getting started with CodePipeline](getting-started-codepipeline.md)\.
1. In the IAM console, in the navigation pane, choose **Roles**\.
1. Choose the name of the service role you use in your CodePipeline operations\.
1. On the **Permissions** tab, in the **Inline Policies** area, choose **Create Role Policy**\.
βorβ
If the **Create Role Policy** button is not available, expand the **Inline Policies** area, and then choose **click here**\.
1. On the **Set Permissions** page, choose **Custom Policy**, and then choose **Select**\.
1. On the **Review Policy** page, in the **Policy Name** field, type a name to identify this policy, such as `SNSPublish`\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/approvals-service-role-permissions.md |
1acf27342d0b-1 | 1. Paste the following into the **Policy Document** field:
```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sns:Publish",
"Resource": "*"
}
]
}
```
1. Choose **Apply Policy**\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/approvals-service-role-permissions.md |
f7bfbdd8a1db-0 | -----
*****Copyright © 2020 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.*****
-----
Amazon's trademarks and trade dress may not be used in
connection with any product or service that is not Amazon's,
in any manner that is likely to cause confusion among customers,
or in any manner that disparages or discredits Amazon. All other
trademarks not owned by Amazon are the property of their respective
owners, who may or may not be affiliated with, connected to, or
sponsored by Amazon.
----- | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-0 | + [What is AWS CodePipeline?](welcome.md)
+ [Continuous delivery and continuous integration](concepts-continuous-delivery-integration.md)
+ [What can I do with CodePipeline?](welcome-what-can-I-do.md)
+ [A quick look at CodePipeline](welcome-introducing.md)
+ [How do I get started with CodePipeline?](welcome-get-started.md)
+ [We want to hear from you](welcome-contact-us.md)
+ [CodePipeline concepts](concepts.md)
+ [DevOps pipeline example](concepts-devops-example.md)
+ [How pipeline executions work](concepts-how-it-works.md)
+ [Input and output artifacts](welcome-introducing-artifacts.md)
+ [Getting started with CodePipeline](getting-started-codepipeline.md)
+ [Product and service integrations with CodePipeline](integrations.md)
+ [Integrations with CodePipeline action types](integrations-action-type.md)
+ [General integrations with CodePipeline](integrations-general.md)
+ [Examples from the community](integrations-community.md)
+ [Integration examples: Blog posts](integrations-community-blogposts.md)
+ [Integration examples: Videos](integrations-community-videos.md)
+ [CodePipeline tutorials](tutorials.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-1 | + [Integration examples: Videos](integrations-community-videos.md)
+ [CodePipeline tutorials](tutorials.md)
+ [Tutorial: Create a simple pipeline (S3 bucket)](tutorials-simple-s3.md)
+ [Tutorial: Create a simple pipeline (CodeCommit repository)](tutorials-simple-codecommit.md)
+ [Tutorial: Create a four-stage pipeline](tutorials-four-stage-pipeline.md)
+ [Tutorial: Set up a CloudWatch Events rule to receive email notifications for pipeline state changes](tutorials-cloudwatch-sns-notifications.md)
+ [Tutorial: Create a pipeline that builds and tests your Android app when a commit is pushed to your GitHub repository](tutorials-codebuild-devicefarm.md)
+ [Tutorial: Create a pipeline that tests your iOS app after a change in your S3 bucket](tutorials-codebuild-devicefarm-S3.md)
+ [Tutorial: Create a pipeline that deploys to AWS Service Catalog](tutorials-S3-servicecatalog.md)
+ [Tutorial: Create a pipeline with AWS CloudFormation](tutorials-cloudformation.md)
+ [Example 1: Create an AWS CodeCommit pipeline with AWS CloudFormation](tutorials-cloudformation-codecommit.md)
+ [Example 2: Create an Amazon S3 pipeline with AWS CloudFormation](tutorials-cloudformation-s3.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-2 | + [Example 2: Create an Amazon S3 pipeline with AWS CloudFormation](tutorials-cloudformation-s3.md)
+ [Example 3: Create a GitHub pipeline with AWS CloudFormation](tutorials-cloudformation-github.md)
+ [Tutorial: Create a pipeline that uses variables from AWS CloudFormation deployment actions](tutorials-cloudformation-action.md)
+ [Tutorial: Amazon ECS Standard Deployment with CodePipeline](ecs-cd-pipeline.md)
+ [Tutorial: Create a pipeline with an Amazon ECR source and ECS-to-CodeDeploy deployment](tutorials-ecs-ecr-codedeploy.md)
+ [Tutorial: Create a pipeline that deploys an Amazon Alexa skill](tutorials-alexa-skills-kit.md)
+ [Tutorial: Create a pipeline that uses Amazon S3 as a deployment provider](tutorials-s3deploy.md)
+ [Tutorial: Create a pipeline that publishes your serverless application to the AWS Serverless Application Repository](tutorials-serverlessrepo-auto-publish.md)
+ [Tutorial: Using variables with Lambda invoke actions](tutorials-lambda-variables.md)
+ [Tutorial: Use an AWS Step Functions invoke action in a pipeline](tutorials-step-functions.md)
+ [Tutorial: Create a pipeline that uses AWS AppConfig as a deployment provider](tutorials-AppConfig.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-3 | + [Tutorial: Create a pipeline that uses AWS AppConfig as a deployment provider](tutorials-AppConfig.md)
+ [CodePipeline best practices and use cases](best-practices.md)
+ [Tagging resources](tag-resources.md)
+ [Use CodePipeline with Amazon Virtual Private Cloud](vpc-support.md)
+ [Working with pipelines in CodePipeline](pipelines.md)
+ [Start a pipeline execution in CodePipeline](pipelines-about-starting.md)
+ [Use CloudWatch Events to start a pipeline (CodeCommit source)](triggering.md)
+ [Create a CloudWatch Events rule for a CodeCommit source (console)](pipelines-trigger-source-repo-changes-console.md)
+ [Create a CloudWatch Events rule for a CodeCommit source (CLI)](pipelines-trigger-source-repo-changes-cli.md)
+ [Create a CloudWatch Events rule for a CodeCommit source (AWS CloudFormation template)](pipelines-trigger-source-repo-changes-cfn.md)
+ [Use CloudWatch Events to start a pipeline (Amazon S3 source)](create-cloudtrail-S3-source.md)
+ [Create a CloudWatch Events rule for an Amazon S3 source (console)](create-cloudtrail-S3-source-console.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-4 | + [Create a CloudWatch Events rule for an Amazon S3 source (console)](create-cloudtrail-S3-source-console.md)
+ [Create a CloudWatch Events rule for an Amazon S3 source (CLI)](create-cloudtrail-S3-source-cli.md)
+ [Create a CloudWatch Events rule for an Amazon S3 source (AWS CloudFormation template)](create-cloudtrail-S3-source-cfn.md)
+ [Use webhooks to start a pipeline (GitHub source)](pipelines-webhooks.md)
+ [Create a webhook for a GitHub source](pipelines-webhooks-create.md)
+ [List webhooks in your account](pipelines-webhooks-view.md)
+ [Edit the webhook for your GitHub source](pipelines-webhooks-update.title.md)
+ [Delete the webhook for your GitHub source](pipelines-webhooks-delete.md)
+ [Tag a webhook in CodePipeline](tag-webhooks.md)
+ [Create a webhook for a GitHub source (AWS CloudFormation template)](pipelines-webhooks-create-cfn.md)
+ [Use CloudWatch Events to start a pipeline (Amazon ECR source)](create-cwe-ecr-source.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-5 | + [Use CloudWatch Events to start a pipeline (Amazon ECR source)](create-cwe-ecr-source.md)
+ [Create a CloudWatch Events rule for an Amazon ECR source (console)](create-cwe-ecr-source-console.md)
+ [Create a CloudWatch Events rule for an Amazon ECR source (CLI)](create-cwe-ecr-source-cli.md)
+ [Create a CloudWatch Events rule for an Amazon ECR source (AWS CloudFormation template)](create-cwe-ecr-source-cfn.md)
+ [Use periodic checks to start a pipeline](run-automatically-polling.md)
+ [Start a pipeline manually in AWS CodePipeline](pipelines-rerun-manually.md)
+ [Use Amazon CloudWatch Events to start a pipeline on a schedule](pipelines-trigger-source-schedule.md)
+ [Stop a pipeline execution in CodePipeline](pipelines-stop.md)
+ [Create a pipeline in CodePipeline](pipelines-create.md)
+ [Edit a pipeline in CodePipeline](pipelines-edit.md)
+ [View pipeline details and history in CodePipeline](pipelines-view.md)
+ [View pipeline details and history (console)](pipelines-view-console.md)
+ [View pipeline details and history (CLI)](pipelines-view-cli.md)
+ [Delete a pipeline in CodePipeline](pipelines-delete.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-6 | + [Delete a pipeline in CodePipeline](pipelines-delete.md)
+ [Create a pipeline in CodePipeline that uses resources from another AWS account](pipelines-create-cross-account.md)
+ [Edit pipelines to use push events](update-change-detection.md)
+ [Create the CodePipeline service role](pipelines-create-service-role.md)
+ [Create the CodePipeline service role (console)](pipelines-create-service-role-console.md)
+ [Create the CodePipeline service role (CLI)](pipelines-create-service-role-cli.md)
+ [Tag a pipeline in CodePipeline](pipelines-tag.md)
+ [Create a connection to Bitbucket](connections-pipelines.md)
+ [Create a notification rule](notification-rule-create.md)
+ [Working with actions in CodePipeline](actions.md)
+ [Create and add a custom action in CodePipeline](actions-create-custom-action.md)
+ [Tag a custom action in CodePipeline](customactions-tag.md)
+ [Invoke an AWS Lambda function in a pipeline in CodePipeline](actions-invoke-lambda-function.md)
+ [Retry a failed action in CodePipeline](actions-retry.md)
+ [Manage approval actions in CodePipeline](approvals.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-7 | + [Manage approval actions in CodePipeline](approvals.md)
+ [Grant approval permissions to an IAM user in CodePipeline](approvals-iam-permissions.md)
+ [Grant Amazon SNS permissions to a CodePipeline service role](approvals-service-role-permissions.md)
+ [Add a manual approval action to a pipeline in CodePipeline](approvals-action-add.md)
+ [Approve or reject an approval action in CodePipeline](approvals-approve-or-reject.md)
+ [JSON data format for manual approval notifications in CodePipeline](approvals-json-format.md)
+ [Add a cross-Region action in CodePipeline](actions-create-cross-region.md)
+ [Working with variables](actions-variables.md)
+ [Working with stage transitions in CodePipeline](transitions.md)
+ [Monitoring pipelines with CodePipeline](monitoring.md)
+ [Detect and react to changes in pipeline state with Amazon CloudWatch Events](detect-state-changes-cloudwatch-events.md)
+ [Events placeholder bucket reference](reference-ct-placeholder-buckets.md)
+ [Logging CodePipeline API calls with AWS CloudTrail](monitoring-cloudtrail-logs.md)
+ [Troubleshooting CodePipeline](troubleshooting.md)
+ [Security in AWS CodePipeline](security.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-8 | + [Troubleshooting CodePipeline](troubleshooting.md)
+ [Security in AWS CodePipeline](security.md)
+ [Data protection in AWS CodePipeline](data-protection.md)
+ [Identity and access management for AWS CodePipeline](security-iam.md)
+ [How AWS CodePipeline works with IAM](security_iam_service-with-iam.md)
+ [AWS CodePipeline identity-based policy examples](security_iam_id-based-policy-examples.md)
+ [Policy best practices](security_iam_service-with-iam-policy-best-practices.md)
+ [Viewing resources in the console](security-iam-resources-console.md)
+ [Allow users to view their own permissions](security_iam_id-based-policy-examples-view-own-permissions.md)
+ [Identity-based policies (IAM) examples](security-iam-id-policies-examples.md)
+ [Using tags to control access to CodePipeline resources](tag-based-access-control.md)
+ [Permissions required to use the CodePipeline console](security-iam-permissions-console.md)
+ [AWS managed (predefined) policies for CodePipeline](managed-policies.md)
+ [Customer managed policy examples](customer-managed-policies.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-9 | + [Customer managed policy examples](customer-managed-policies.md)
+ [AWS CodePipeline resource-based policy examples](security_iam_resource-based-policy-examples.md)
+ [Troubleshooting AWS CodePipeline identity and access](security_iam_troubleshoot.md)
+ [CodePipeline permissions reference](permissions-reference.md)
+ [Logging and monitoring in CodePipeline](incident-response.md)
+ [Compliance validation for AWS CodePipeline](SERVICENAME-compliance.md)
+ [Resilience in AWS CodePipeline](disaster-recovery-resiliency.md)
+ [Infrastructure security in AWS CodePipeline](infrastructure-security.md)
+ [Security best practices](security-best-practices.md)
+ [AWS CodePipeline command line reference](reference-command-line.md)
+ [CodePipeline pipeline structure reference](reference-pipeline-structure.md)
+ [Action structure reference](action-reference.md)
+ [Amazon ECR](action-reference-ECR.md)
+ [Amazon Elastic Container Service and CodeDeploy Blue-Green](action-reference-ECSbluegreen.md)
+ [Amazon Elastic Container Service](action-reference-ECS.md)
+ [Amazon S3](action-reference-S3.md)
+ [AWS AppConfig](action-reference-AppConfig.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
3e605cbc820c-10 | + [AWS AppConfig](action-reference-AppConfig.md)
+ [AWS CloudFormation](action-reference-CloudFormation.md)
+ [AWS CodeBuild](action-reference-CodeBuild.md)
+ [CodeCommit](action-reference-CodeCommit.md)
+ [AWS CodeDeploy](action-reference-CodeDeploy.md)
+ [AWS Device Farm](action-reference-DeviceFarm.md)
+ [AWS Lambda](action-reference-Lambda.md)
+ [AWS Step Functions](action-reference-StepFunctions.md)
+ [CodeStarSourceConnection](action-reference-CodestarConnectionSource.md)
+ [GitHub](action-reference-GitHub.md)
+ [Image definitions file reference](file-reference.md)
+ [Variables](reference-variables.md)
+ [Update polling pipelines to the recommended change detection method](trigger-S3-migration-cwe.md)
+ [Quotas in AWS CodePipeline](limits.md)
+ [AWS CodePipeline User Guide document history](history.md)
+ [AWS glossary](glossary.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/index.md |
e1d34d316760-0 | You use an AWS CodeDeploy action to deploy application code to your deployment fleet\. Your deployment fleet can consist of Amazon EC2 instances, on\-premises instances, or both\.
**Note**
This reference topic describes the CodeDeploy deployment action for CodePipeline where the deployment platform is Amazon EC2\. For reference information about Amazon Elastic Container Service to CodeDeploy blue/green deployment actions in CodePipeline, see [Amazon Elastic Container Service and CodeDeploy Blue\-Green](action-reference-ECSbluegreen.md)\.
**Topics**
+ [Action Type](#action-reference-CodeDeploy-type)
+ [Configuration Parameters](#action-reference-CodeDeploy-config)
+ [Input Artifacts](#action-reference-CodeDeploy-input)
+ [Output Artifacts](#action-reference-CodeDeploy-output)
+ [Action Declaration](#action-reference-CodeDeploy-example)
+ [See Also](#action-reference-CodeDeploy-links) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeDeploy.md |
5a59aed4681b-0 | + Category: `Deploy`
+ Owner: `AWS`
+ Provider: `CodeDeploy`
+ Version: `1` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeDeploy.md |
aaf7f73cf0ee-0 | **ApplicationName**
Required: Yes
The name of the application that you created in CodeDeploy\.
**DeploymentGroupName**
Required: Yes
The deployment group that you created in CodeDeploy\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeDeploy.md |
701b066f037c-0 | + **Number of Artifacts:** `1`
+ **Description:** The AppSpec file that CodeDeploy uses to determine:
+ What to install onto your instances from your application revision in Amazon S3 or GitHub\.
+ Which lifecycle event hooks to run in response to deployment lifecycle events\.
For more information about the AppSpec file, see the [CodeDeploy AppSpec File Reference](https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeDeploy.md |
91006fb63ae4-0 | + **Number of Artifacts:** `0`
+ **Description:** Output 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-CodeDeploy.md |
67a2b1600f94-0 | ------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeDeploy.md |
e45c015bcb78-0 | ```
Name: Deploy
Actions:
- Name: Deploy
ActionTypeId:
Category: Deploy
Owner: AWS
Provider: CodeDeploy
Version: '1'
RunOrder: 1
Configuration:
ApplicationName: my-application
DeploymentGroupName: my-deployment-group
OutputArtifacts: []
InputArtifacts:
- Name: SourceArtifact
Region: us-west-2
Namespace: DeployVariables
```
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeDeploy.md |
e394dfcba0a4-0 | ```
{
"Name": "Deploy",
"Actions": [
{
"Name": "Deploy",
"ActionTypeId": {
"Category": "Deploy",
"Owner": "AWS",
"Provider": "CodeDeploy",
"Version": "1"
},
"RunOrder": 1,
"Configuration": {
"ApplicationName": "my-application",
"DeploymentGroupName": "my-deployment-group"
},
"OutputArtifacts": [],
"InputArtifacts": [
{
"Name": "SourceArtifact"
}
],
"Region": "us-west-2",
"Namespace": "DeployVariables"
}
]
},
```
------ | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeDeploy.md |
984db320553c-0 | The following related resources can help you as you work with this action\.
+ [Tutorial: Create a simple pipeline \(S3 bucket\)](tutorials-simple-s3.md) β This tutorial walks you through the creation of a source bucket, EC2 instances, and CodeDeploy resources to deploy a sample application\. You then build your pipeline with a CodeDeploy deployment action that deploys code maintained in your S3 bucket to your Amazon EC2 instance\.
+ [Tutorial: Create a simple pipeline \(CodeCommit repository\)](tutorials-simple-codecommit.md) β This tutorial walks you through the creation of your CodeCommit source repository, EC2 instances, and CodeDeploy resources to deploy a sample application\. You then build your pipeline with a CodeDeploy deployment action that deploys code from your CodeCommit repository to your Amazon EC2 instance\.
+ [CodeDeploy AppSpec File Reference](https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html) β This reference chapter in the *AWS CodeDeploy User Guide* provides reference information and examples for CodeDeploy AppSpec files\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodeDeploy.md |
fb9c5173b109-0 | You can use the AWS CodePipeline console or the AWS CLI to create a pipeline\. Pipelines must have at least two stages\. The first stage of a pipeline must be a source stage\. The pipeline must have at least one other stage that is a build or deployment stage\.
You can add actions to your pipeline that are in an AWS Region different from your pipeline\. A cross\-Region action is one in which an AWS service is the provider for an action and the action type or provider type are in an AWS Region different from your pipeline\. For more information, see [Add a cross\-Region action in CodePipeline](actions-create-cross-region.md)\.
You can also create pipelines that build and deploy container\-based applications by using Amazon ECS as the deployment provider\. Before you create a pipeline that deploys container\-based applications with Amazon ECS, you must create an image definitions file as described in [Image definitions file reference](file-reference.md)\.
CodePipeline uses change detection methods to start your pipeline when a source code change is pushed\. These detection methods are based on source type:
+ CodePipeline uses Amazon CloudWatch Events to detect changes in your CodeCommit source repository and branch or your S3 source bucket\.
+ CodePipeline uses webhooks to detect changes in your GitHub source repository and branch\. A webhook is an HTTP notification that detects events in an external tool and connects those external events to a pipeline\.
**Note** | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md |
fb9c5173b109-1 | **Note**
When you use the console to create or edit a pipeline, the change detection resources are created for you\. If you use the AWS CLI to create the pipeline, you must create the additional resources yourself\. For more information, see [ Use CloudWatch Events to start a pipeline \(CodeCommit source\)](triggering.md)\.
**Topics**
+ [Create a pipeline \(console\)](#pipelines-create-console)
+ [Create a pipeline \(CLI\)](#pipelines-create-cli) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.