Skip to content

Commit

Permalink
fix(provider/appengine): groovy.lang.MissingMethodException when refe…
Browse files Browse the repository at this point in the history
…rencing github config artifact for GAE deploy - spinnaker/spinnaker#5836 (#3739)

* fix(provider/appengine): Fix for issue spinnaker/spinnaker#5836

groovy.lang.MissingMethodException when referencing github config artifact for GAE deploy. The config artifacts  were of instance of HashMap not an Artifact object. Added logic to translate HashMap to Artifact.'
fix(provider/appengine): Fix for issue spinnaker/spinnaker#5836

* Change to objectMapper

* Removed left over Slf4j lines
  • Loading branch information
guido9j authored Jun 22, 2020
1 parent 3cbd942 commit ebb04d2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ class AppEngineServerGroupCreator implements ServerGroupCreator {
List<ArtifactAccountPair> configArtifacts = operation.configArtifacts
if (configArtifacts != null && configArtifacts.size() > 0) {
operation.configArtifacts = configArtifacts.collect { artifactAccountPair ->
def artifact = artifactUtils.getBoundArtifactForStage(stage, artifactAccountPair.id, artifactAccountPair.artifact)
artifact.artifactAccount = artifactAccountPair.account
def artifact = artifactUtils.getBoundArtifactForStage(stage, artifactAccountPair.id, objectMapper.convertValue(artifactAccountPair.artifact, Artifact.class))
if (artifactAccountPair.account != null){
artifact.artifactAccount = artifactAccountPair.account
}
return artifact
}
}
Expand Down

0 comments on commit ebb04d2

Please sign in to comment.