Skip to content

Commit

Permalink
feat(bakeManifest/kustomize): add kustomizeFilePath to support git/re…
Browse files Browse the repository at this point in the history
…po artifact type (#3260)
  • Loading branch information
Mark Rampton authored and mergify[bot] committed Oct 29, 2019
1 parent 34fc2cf commit 2136674
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ public class KustomizeBakeManifestRequest extends BakeManifestRequest {
@JsonProperty("inputArtifact")
private Artifact inputArtifact;

@JsonProperty("kustomizeFilePath")
private String kustomizeFilePath;

public KustomizeBakeManifestRequest(
BakeManifestContext bakeManifestContext, Artifact inputArtifact, String outputArtifactName) {
super(
bakeManifestContext.getTemplateRenderer(),
outputArtifactName,
bakeManifestContext.getOutputName());
this.inputArtifact = inputArtifact;
this.kustomizeFilePath = bakeManifestContext.getKustomizeFilePath();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class BakeManifestContext {
private final String outputName;
private final String namespace;
private final Boolean rawOverrides;
@Nullable private final String kustomizeFilePath;
// There does not seem to be a way to auto-generate a constructor using our current version of
// Lombok (1.16.20) that
// Jackson can use to deserialize.
Expand All @@ -48,6 +49,7 @@ public BakeManifestContext(
@JsonProperty("outputName") String outputName,
@JsonProperty("namespace") String namespace,
@Nullable @JsonProperty("inputArtifact") CreateBakeManifestTask.InputArtifact inputArtifact,
@Nullable @JsonProperty("kustomizeFilePath") String kustomizeFilePath,
@JsonProperty("rawOverrides") Boolean rawOverrides) {
this.inputArtifacts = Optional.of(inputArtifacts).orElse(new ArrayList<>());
// Kustomize stage configs provide a single input artifact
Expand All @@ -60,6 +62,7 @@ public BakeManifestContext(
this.templateRenderer = templateRenderer;
this.outputName = outputName;
this.namespace = namespace;
this.kustomizeFilePath = kustomizeFilePath;
this.rawOverrides = rawOverrides;
}
}

0 comments on commit 2136674

Please sign in to comment.