Closed richardowen closed 7 years ago
I could not reproduce the issue. Would you mind posting more details about your environment?
This appears to be an issue with upgrading from 0.28 to 0.29. If you create a fresh job on 0.29 it will work fine. If you create a job on 0.28 and then upgrade the plugin to 0.29 it will fail. It will succeed again after you save the job configuration on 0.29 (without making any changes).
I did the following test:
I took a snapshot of the job directory before and after step 4. Before saving, this was the job config.xml:
<?xml version='1.0' encoding='UTF-8'?>
<project>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelineSCM" plugin="aws-codepipeline@0.28">
<clearWorkspace>true</clearWorkspace>
<projectName>CodePipeline_Test_2</projectName>
<actionTypeCategory>Build</actionTypeCategory>
<actionTypeProvider>Jenkins</actionTypeProvider>
<actionTypeVersion>4</actionTypeVersion>
<region>eu-west-1</region>
<awsAccessKey></awsAccessKey>
<awsSecretKey></awsSecretKey>
<proxyHost></proxyHost>
<proxyPort>0</proxyPort>
<awsClientFactory/>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<hudson.triggers.SCMTrigger>
<spec>* * * * *</spec>
<ignorePostCommitHooks>false</ignorePostCommitHooks>
</hudson.triggers.SCMTrigger>
</triggers>
<concurrentBuild>false</concurrentBuild>
<builders/>
<publishers>
<com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelinePublisher plugin="aws-codepipeline@0.28">
<outputArtifacts>
<com.amazonaws.codepipeline.jenkinsplugin.OutputArtifact>
<location></location>
</com.amazonaws.codepipeline.jenkinsplugin.OutputArtifact>
</outputArtifacts>
<awsClientFactory/>
</com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelinePublisher>
</publishers>
<buildWrappers/>
</project>
After saving, this was the new job xml:
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelineSCM" plugin="aws-codepipeline@0.29">
<clearWorkspace>true</clearWorkspace>
<projectName>CodePipeline_Test_2</projectName>
<actionTypeCategory>Build</actionTypeCategory>
<actionTypeProvider>Jenkins</actionTypeProvider>
<actionTypeVersion>4</actionTypeVersion>
<region>eu-west-1</region>
<awsAccessKey></awsAccessKey>
<awsSecretKey></awsSecretKey>
<proxyHost></proxyHost>
<proxyPort>0</proxyPort>
<awsClientFactory/>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<hudson.triggers.SCMTrigger>
<spec>* * * * *</spec>
<ignorePostCommitHooks>false</ignorePostCommitHooks>
</hudson.triggers.SCMTrigger>
</triggers>
<concurrentBuild>false</concurrentBuild>
<builders/>
<publishers>
<com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelinePublisher plugin="aws-codepipeline@0.29">
<outputArtifacts>
<com.amazonaws.codepipeline.jenkinsplugin.OutputArtifact>
<location></location>
<artifactName></artifactName>
</com.amazonaws.codepipeline.jenkinsplugin.OutputArtifact>
</outputArtifacts>
<awsClientFactory/>
</com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelinePublisher>
</publishers>
<buildWrappers/>
</project>
I think the relevant difference is probably that after saving the outputArtifact has an (empty) artifactName.
Thank you for bringing this issue to us. We have been able to reproduce this issue, and new release aws-codepipeline-0.32 fixes the problem.
Thanks. I can confirm this issue is fixed with version 0.32.
This issue appears to be new in version 0.29. I'm getting these errors at the end of my builds now:
Sometimes there is no stack trace:
These builds all have a single artifact with a blank location (to zip up the whole workspace). Our build which doesn't have any artifacts is succeeding.
The PutJobSuccessResult call appears to have been successful because CodePipeline thinks the job has succeeded. The Jenkins job is marked as failed however.