This repository was archived by the owner on Jun 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,12 @@ def get_input_artifact(event):
2828 )
2929
3030 input_artifacts = event ['CodePipeline.job' ]['data' ]['inputArtifacts' ]
31- _validate_input_artifacts (input_artifacts )
31+
32+ if len (input_artifacts ) != 1 :
33+ raise RuntimeError ('You should only have one input artifact. Please check the setting for the action.' )
34+
3235 artifact_to_fetch = input_artifacts [0 ]
36+ LOG .info ('artifact_to_fetch=%s' , artifact_to_fetch )
3337
3438 artifact_s3_location = artifact_to_fetch ['location' ]['s3Location' ]
3539 bucket = artifact_s3_location ['bucketName' ]
@@ -42,16 +46,6 @@ def get_input_artifact(event):
4246 return _unzip_as_string (zipped_content_as_bytes )
4347
4448
45- def _validate_input_artifacts (input_artifacts ):
46- """Validate the length of input artifacts list is 1.
47-
48- Arguments:
49- input_artifacts {dict list} -- list of input artifacts
50- """
51- if len (input_artifacts ) != 1 :
52- raise RuntimeError ('You should only have one input artifact. Please check the setting for the action.' )
53-
54-
5549def _unzip_as_string (data ):
5650 """Unzip stream of data in bytes as string.
5751
You can’t perform that action at this time.
0 commit comments