awslabs / aws-codepipeline-plugin-for-jenkins

Use this plugin to integrate your Jenkins project with a pipeline in AWS CodePipeline. For more information and step-by-step directions on how to install and configure this plugin, follow the Four Stage Pipeline Tutorial. http://docs.aws.amazon.com/codepipeline/latest/userguide/getting-started-4.html
Apache License 2.0
82 stars 68 forks source link

Polling for jobs failing with ActionTypeNotFoundException: #14

Closed Makthum closed 8 years ago

Makthum commented 8 years ago

Hi ,

I am trying to setup jenkins with AWS codePipeline and i am getting following exception.

[AWS CodePipeline Plugin] Polling for jobs for action type id: [Owner: Custom, Category: Build, Provider: MyJenkinsProviderName, Version: 1, ProjectName: build_kifiengine_pmd] ERROR: Failed to record SCM polling for hudson.model.FreeStyleProject@20959a48[build_kifiengine_pmd] com.amazonaws.services.codepipeline.model.ActionTypeNotFoundException: ActionType (Category: 'Build', Owner: 'Custom', Provider: 'MyJenkinsProviderName', Version: '1') is not available (Service: AWSCodePipeline; Status Code: 400; Error Code: ActionTypeNotFoundException; Request ID: 9719c8eb-76e0-11e6-adf3-a96fe750b199) 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) at com.amazonaws.services.codepipeline.AWSCodePipelineClient.invoke(AWSCodePipelineClient.java:2048) at com.amazonaws.services.codepipeline.AWSCodePipelineClient.pollForJobs(AWSCodePipelineClient.java:1407) at com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelineSCM.pollForJobs(AWSCodePipelineSCM.java:229) at com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelineSCM.compareRemoteRevisionWith(AWSCodePipelineSCM.java:171) at hudson.scm.SCM.poll(SCM.java:408) at hudson.model.AbstractProject._poll(AbstractProject.java:1460) at hudson.model.AbstractProject.poll(AbstractProject.java:1363) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:528) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:574) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

I verified using aws cli and i am getting following response from command line

{
    "jobs": [{
        "nonce": "3",
        "data": {
            "inputArtifacts": [{
                "location": {
                    "type": "S3",
                    "s3Location": {
                        "objectKey": "test/MyApp/OHhR3lG.zip",
                        "bucketName": "codepipeline-us-west-2-251461012282"
                    }
                },
                "name": "MyApp",
                "revision": "3d70a56ae6b9a026c51d18ca0ce0e39f38176c53"
            }],
            "pipelineContext": {
                "action": {
                    "name": "Build"
                },
                "pipelineName": "test",
                "stage": {
                    "name": "Build"
                }
            },
            "actionTypeId": {
                "category": "Build",
                "owner": "Custom",
                "version": "1",
                "provider": "MyJenkinsProviderName"
            },
            "outputArtifacts": [{
                "name": "MyAppBuild",
                "location": {
                    "type": "S3",
                    "s3Location": {
                        "objectKey": "test/MyAppBuild/SYq5iXZ",
                        "bucketName": "codepipeline-us-west-2-251461012282"
                    }
                }
            }],
            "actionConfiguration": {
                "configuration": {
                    "ProjectName": "build_kifiengine_pmd"
                }
            },
            "artifactCredentials": {
                "secretAccessKey": "",
                "sessionToken": "",
                "accessKeyId": ""
            }
        },
        "id": "de5779b1-7083-4aa7-95b0-020f2a7fc3d9",
        "accountId": "904475547274"
    }]
}```
rangaataws commented 8 years ago

Hi, I verified that your action type does exist. Can you check if the Jenkins plugin is polling AWS CodePipeline in us-west-2 region. It may be possible that your Jenkins is setup for polling in different region than us-west-2. Please let us know if you still see any issues after verifying the region value.

Thanks,

Makthum commented 8 years ago

it worked. region was not configured. Thanks for taking a look.

sumanthravipati commented 6 years ago

Hi, I verified that your action type does exist. Can you check if the Jenkins plugin is polling AWS CodePipeline in us-west-2 region. It may be possible that your Jenkins is setup for polling in different region than us-west-2. Please let us know if you still see any issues after verifying the region value.

Thanks,

Hi Even i had the same issue, I verified the region it is same in my case US-WEST-1. Still I am facing the same problem

kunal8607 commented 4 years ago

I am also facing the same problem