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 69 forks source link

Outputs processed in incorrected order #23

Closed mrwibble closed 7 years ago

mrwibble commented 7 years ago

When using multiple outputs the order the outputs are processed in doesn't match the order they're defined in the UI. I've found this occur with three outputs, though I could have just been lucky with two outputs.

The two attachments show the order in the pipeline and in the Jenkins job. When the job is executed, the log contains the following (emphasis mine):

08:20:06 [AWS CodePipeline Plugin] Uploading artifact: {Name: {color:red}ReqMgrLog{color},Location: {Type: S3,S3Location: {BucketName: ###, ObjectKey: EOT/ReqMgrLog/vDtEgfa}}}, file: /var/lib/jenkins/workspace/RequestManager/{color:red}RequestManager/request-manager/bin/requestmanager{color} 08:20:07 [AWS CodePipeline Plugin] Upload successful 08:20:07 [AWS CodePipeline Plugin] Uploading artifact: {Name: {color:red}ReqMgrTags{color},Location: {Type: S3,S3Location: {BucketName: ###, ObjectKey: EOT/ReqMgrTags/xxtDOf4}}}, file: /var/lib/jenkins/workspace/RequestManager/{color:red}build.log{color} 08:20:07 [AWS CodePipeline Plugin] Upload successful 08:20:07 [AWS CodePipeline Plugin] Compressing directory '/var/lib/jenkins/workspace/RequestManager/identifiers' as a 'Zip' archive 08:20:07 [AWS CodePipeline Plugin] Uploading artifact: {Name: {color:red}ReqMgrBin{color},Location: {Type: S3,S3Location: {BucketName: ###, ObjectKey: EOT/ReqMgrBin/IJqrhKh}}}, file:{color:red} /tmp/RequestManager-7108802193708017228.zip{color} 08:20:07 [AWS CodePipeline Plugin] Upload successful

What's worse is that I have three jobs set up in this way, and in each case the outputs are picked up in a different order. aws-output jenkins-output

zhngha commented 7 years ago

Here is a workaround:

After that the order will stay constant. It’s not perfect but it works.

mrwibble commented 7 years ago

Which is what I've had to do, but the issue is having more of an impact due to the unpredictability of each new job. I'd be fine if it was something I was doing wrong, but I can't see how considering how little control I have over the inputs :/

bankAWS commented 7 years ago

Sorry for the inconvenience caused. We are aware of this problem and are working on a fix. We will post an update to this thread once the fix is rolled out. Thanks for bringing this to our attention.

maggiecopyAWS commented 7 years ago

The release aws-codepipeline-0.29 adds an optional field Artifact Name to each Location, which allows explicitly specifying the Output artifact the Location will be uploaded.