Issue
I created an AWS CodePipeline pipeline to pull from Github, build with Jenkins, and deploy to an ElasticBeanstalk project. I can deploy the war to beanStack directly and validate.
When i try to do the same from CodePipeLine i see the below error in AWS CodePipeline Polling Log of Jenkins -
ERROR: Failed to record SCM polling for hudson.model.FreeStyleProject@ae44565e6[AppPortal] com.amazonaws.services.codepipeline.model.ActionTypeNotFoundException: ActionType (Category: 'Build', Owner: 'Custom', Provider: 'MPiplelineProvider', Version: '1') is not available (Service: AWSCodePipeline; Status Code: 400; Error Code: ActionTypeNotFoundException; Request ID: e35456561d-999f-56e7-3rgf-75985675533b3) at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1401) at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:945) at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:723) at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:475) at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:437) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:386) at com.amazonaws.services.codepipeline.AWSCodePipelineClient.doInvoke(AWSCodePipelineClient.java:2078)
I have set the SCM poll to * * * * * for testing purpose.
Post-build Actions - AWS CodePipeline publisher - Location - target/AppPortal
I installed only AWS Codepipeline pulgin in jenkins.
Can you let me know what I'm missing.
Thanks
Solution
Did you register the Jenkins custom action type in CodePipeline, in the same region you're polling?
Check your Jenkins job configuration for:
- AWS Region
- Category
- Provider
- Version
From your error message:
ActionType (Category: 'Build', Owner: 'Custom', Provider: 'MPiplelineProvider', Version: '1')
Then use the AWS CLI to list your custom action types, in that region, and make sure the Category, Provider, and Version match:
aws codepipeline list-action-types --action-owner-filter Custom --region us-west-2
If you created the Jenkins action type through the AWS Console, it should have these values:
ActionType (Category: 'Build', Owner: 'Custom', Provider: 'Jenkins', Version: '1')
If that's the case, updating your Jenkins job Provider from MPiplelineProvider to Jenkins should fix your problem.
Answered By - tapichu