Skip to content

Commit

Permalink
chore(artifacts): always configure artifact store-related beans (#1045)
Browse files Browse the repository at this point in the history
since spinnaker/kork#1120 removes the artifact-store.enabled
property such that ArtifactStore beans are always present.
  • Loading branch information
dbyron-sf committed Nov 26, 2023
1 parent efd0602 commit 144b433
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ import com.netflix.spinnaker.rosco.services.ServiceConfig
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression
import org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
Expand Down Expand Up @@ -104,13 +102,11 @@ class Main extends SpringBootServletInitializer {
}

@Bean
@ConditionalOnExpression('${artifact-store.enabled:false}')
EmbeddedArtifactSerializer artifactSerializer(ArtifactStore store, @Qualifier("artifactObjectMapper") ObjectMapper objectMapper) {
return new EmbeddedArtifactSerializer(objectMapper, store);
}

@Bean
@ConditionalOnBean(EmbeddedArtifactSerializer.class)
ObjectMapper objectMapper(Jackson2ObjectMapperBuilder builder, EmbeddedArtifactSerializer serializer) {
return builder.createXmlMapper(false)
.serializerByType(Artifact.class, serializer)
Expand Down

0 comments on commit 144b433

Please sign in to comment.