Skip to content

Commit

Permalink
fix(pubsub): s/artifacts/receivedArtifacts/ in Pipelines. (spinnaker#174
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jtk54 authored Sep 27, 2017
1 parent 2715eba commit cdf1a9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
List<Map<String, Object>> notifications;

@JsonProperty
List<Artifact> artifacts;
List<Artifact> receivedArtifacts;

@JsonProperty
List<Map<String, Object>> parameterConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected Function<Trigger, Pipeline> buildTrigger(Pipeline pipeline, TriggerEve
PubsubEvent pubsubEvent = (PubsubEvent) event;
MessageDescription description = pubsubEvent.getContent().getMessageDescription();
return trigger -> pipeline
.withArtifacts(description.getArtifacts())
.withReceivedArtifacts(description.getArtifacts())
.withTrigger(trigger.atMessageDescription(description.getSubscriptionName(), description.getPubsubSystem().toString()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class MessageArtifactTranslatorSpec extends Specification {
def "can deserialize several artifacts from a list with jinja magic"() {
String template = '''
[
{% for artifact in artifacts %}
{% for artifact in receivedArtifacts %}
{
"reference": "{{ artifact['id'] }}",
"type": "{{ artifact['type'] }}"
Expand All @@ -85,7 +85,7 @@ class MessageArtifactTranslatorSpec extends Specification {
'''
String payload = '''
{
"artifacts": [
"receivedArtifacts": [
{"id": "gs://this/is/my/id1", "type": "gcs/object"},
{"id": "gs://this/is/my/id2", "type": "tarball"},
{"id": "gs://this/is/my/id3", "type": "binary"}
Expand Down

0 comments on commit cdf1a9f

Please sign in to comment.