From 384f8df66ba278c2d5445ec36e6d3dc59bf663d5 Mon Sep 17 00:00:00 2001 From: Chris Hill Date: Mon, 10 Nov 2025 11:30:02 -0700 Subject: [PATCH] Add versions field and template artifacts support --- aws-api-gateway-lambda/massdriver.yaml | 1 + aws-ecs-service/massdriver.yaml | 1 + aws-lambda/massdriver.yaml | 1 + azure-app-service/massdriver.yaml | 1 + azure-function-app/massdriver.yaml | 1 + bicep-template/massdriver.yaml | 58 +++++++++++++------------ gcp-cloud-run/massdriver.yaml | 1 + helm-chart/massdriver.yaml | 59 ++++++++++++++------------ kubernetes-cronjob/massdriver.yaml | 1 + kubernetes-deployment/massdriver.yaml | 1 + kubernetes-job/massdriver.yaml | 1 + opentofu-module/massdriver.yaml | 18 +++++--- phoenix-kubernetes/massdriver.yaml | 1 + rails-kubernetes/massdriver.yaml | 1 + terraform-module/massdriver.yaml | 18 +++++--- 15 files changed, 99 insertions(+), 65 deletions(-) diff --git a/aws-api-gateway-lambda/massdriver.yaml b/aws-api-gateway-lambda/massdriver.yaml index b59d13f..74f1c65 100644 --- a/aws-api-gateway-lambda/massdriver.yaml +++ b/aws-api-gateway-lambda/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" app: # Environment variables can be pulled from params or connections using jq diff --git a/aws-ecs-service/massdriver.yaml b/aws-ecs-service/massdriver.yaml index 80e908b..53f2c33 100644 --- a/aws-ecs-service/massdriver.yaml +++ b/aws-ecs-service/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" steps: - path: src diff --git a/aws-lambda/massdriver.yaml b/aws-lambda/massdriver.yaml index fc21793..4b5fe84 100644 --- a/aws-lambda/massdriver.yaml +++ b/aws-lambda/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" steps: - path: src diff --git a/azure-app-service/massdriver.yaml b/azure-app-service/massdriver.yaml index 66af930..cc631fc 100644 --- a/azure-app-service/massdriver.yaml +++ b/azure-app-service/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" steps: - path: src diff --git a/azure-function-app/massdriver.yaml b/azure-function-app/massdriver.yaml index 0c4e1a0..7e0c111 100644 --- a/azure-function-app/massdriver.yaml +++ b/azure-function-app/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" steps: - path: src diff --git a/bicep-template/massdriver.yaml b/bicep-template/massdriver.yaml index b938155..bcccc11 100644 --- a/bicep-template/massdriver.yaml +++ b/bicep-template/massdriver.yaml @@ -2,8 +2,8 @@ schema: draft-07 name: "{{ name }}" description: "{{ description }}" +version: "1.0.0" -# schema-params.json # JSON Schema sans-fields above steps: - path: src @@ -13,27 +13,26 @@ steps: {{ paramsSchema }} {% else %} params: - # Examples will show up as configuration presets in the UI _and_ - # they will be used to test configurations of the bundle. - examples: - - __name: Development - foo: bar - - __name: Production - foo: foo - required: - - foo - properties: - foo: - type: string - title: Foo - description: Name of {{ name }} - default: "" - examples: - - US-West 2 VPC - - US-East 1 VPC + properties: {} + # # Examples will show up as configuration presets in the UI _and_ they will be used to test configurations of the bundle. + # examples: + # - __name: Development + # foo: bar + # - __name: Production + # foo: foo + # required: + # - foo + # properties: + # foo: + # type: string + # title: Foo + # description: Name of {{ name }} + # default: "" + # examples: + # - US-West 2 VPC + # - US-East 1 VPC {% endif %} -# schema-connections.json # Named list of input connections (artifacts) (map[name]artifact) connections: {%- if connections.size > 0 %} @@ -50,17 +49,22 @@ connections: properties: {} {% endif %} -# schema-artifacts.json # Named list of output artifacts (map[name]artifact) artifacts: +{%- if artifacts.size > 0 %} + required: + {%- for art in artifacts %} + - {{ art.name -}} + {% endfor %} + properties: + {%- for art in artifacts %} + {{ art.name }}: + $ref: {{ art.artifact_definition -}} + {% endfor %} +{% else %} properties: {} - # required: - # - network - # properties: - # network: - # $ref: massdriver/aws-vpc +{% endif %} -# schema-ui.json # List of form customizations for params-schema # learn more about widgets & fields: https://docs.massdriver.cloud/bundles/custom-widgets-and-fields ui: diff --git a/gcp-cloud-run/massdriver.yaml b/gcp-cloud-run/massdriver.yaml index 026ab83..e42bfa7 100644 --- a/gcp-cloud-run/massdriver.yaml +++ b/gcp-cloud-run/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" steps: - path: src diff --git a/helm-chart/massdriver.yaml b/helm-chart/massdriver.yaml index d5190af..693cb3c 100644 --- a/helm-chart/massdriver.yaml +++ b/helm-chart/massdriver.yaml @@ -1,39 +1,37 @@ -# This file will be used to generate all of the schema-*.json files in a bundle schema: draft-07 name: "{{ name }}" description: "{{ description }}" +version: "1.0.0" steps: - path: chart provisioner: helm -# schema-params.json # JSON Schema sans-fields above {%- if paramsSchema.size > 0 %} {{ paramsSchema }} {% else %} params: - # Examples will show up as configuration presets in the UI _and_ - # they will be used to test configurations of the bundle. - examples: - - __name: Development - foo: bar - - __name: Production - foo: foo - required: - - foo - properties: - foo: - type: string - title: Foo - description: Name of {{ name }} - default: "" - examples: - - US-West 2 VPC - - US-East 1 VPC + properties: {} + # # Examples will show up as configuration presets in the UI _and_ they will be used to test configurations of the bundle. + # examples: + # - __name: Development + # foo: bar + # - __name: Production + # foo: foo + # required: + # - foo + # properties: + # foo: + # type: string + # title: Foo + # description: Name of {{ name }} + # default: "" + # examples: + # - US-West 2 VPC + # - US-East 1 VPC {% endif %} -# schema-connections.json # Named list of input connections (artifacts) (map[name]artifact) connections: required: @@ -50,17 +48,22 @@ connections: {% endfor %} -# schema-artifacts.json # Named list of output artifacts (map[name]artifact) artifacts: +{%- if artifacts.size > 0 %} + required: + {%- for art in artifacts %} + - {{ art.name -}} + {% endfor %} + properties: + {%- for art in artifacts %} + {{ art.name }}: + $ref: {{ art.artifact_definition -}} + {% endfor %} +{% else %} properties: {} - # required: - # - network - # properties: - # network: - # $ref: massdriver/aws-vpc +{% endif %} -# schema-ui.json # List of form customizations for params-schema # learn more about widgets & fields: https://docs.massdriver.cloud/bundles/custom-widgets-and-fields ui: diff --git a/kubernetes-cronjob/massdriver.yaml b/kubernetes-cronjob/massdriver.yaml index 7514cdd..a29f96e 100644 --- a/kubernetes-cronjob/massdriver.yaml +++ b/kubernetes-cronjob/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" steps: - path: src diff --git a/kubernetes-deployment/massdriver.yaml b/kubernetes-deployment/massdriver.yaml index 17a0e8a..f1dbcbe 100644 --- a/kubernetes-deployment/massdriver.yaml +++ b/kubernetes-deployment/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" steps: - path: src diff --git a/kubernetes-job/massdriver.yaml b/kubernetes-job/massdriver.yaml index e1f276b..f414f7a 100644 --- a/kubernetes-job/massdriver.yaml +++ b/kubernetes-job/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" steps: - path: src diff --git a/opentofu-module/massdriver.yaml b/opentofu-module/massdriver.yaml index ca22288..b4034df 100644 --- a/opentofu-module/massdriver.yaml +++ b/opentofu-module/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: "{{ name }}" description: "{{ description }}" +version: "1.0.0" # steps to execute in order to provision this bundle (order is reversed for decommissioning) steps: @@ -50,12 +51,19 @@ connections: # Named list of output artifacts (map[name]artifact) artifacts: +{%- if artifacts.size > 0 %} + required: + {%- for art in artifacts %} + - {{ art.name -}} + {% endfor %} + properties: + {%- for art in artifacts %} + {{ art.name }}: + $ref: {{ art.artifact_definition -}} + {% endfor %} +{% else %} properties: {} - # required: - # - network - # properties: - # network: - # $ref: massdriver/aws-vpc +{% endif %} # List of form customizations for params-schema # learn more about widgets & fields: https://docs.massdriver.cloud/bundles/custom-widgets-and-fields diff --git a/phoenix-kubernetes/massdriver.yaml b/phoenix-kubernetes/massdriver.yaml index 0a4d6db..d2e67a1 100644 --- a/phoenix-kubernetes/massdriver.yaml +++ b/phoenix-kubernetes/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" steps: - path: src diff --git a/rails-kubernetes/massdriver.yaml b/rails-kubernetes/massdriver.yaml index d3d4f39..814bc00 100644 --- a/rails-kubernetes/massdriver.yaml +++ b/rails-kubernetes/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" steps: - path: src diff --git a/terraform-module/massdriver.yaml b/terraform-module/massdriver.yaml index 6f382f8..75c3a65 100644 --- a/terraform-module/massdriver.yaml +++ b/terraform-module/massdriver.yaml @@ -1,6 +1,7 @@ schema: draft-07 name: {{ name }} description: {{ description }} +version: "1.0.0" # steps to execute in order to provision this bundle (order is reversed for decommissioning) steps: @@ -50,12 +51,19 @@ connections: # Named list of output artifacts (map[name]artifact) artifacts: +{%- if artifacts.size > 0 %} + required: + {%- for art in artifacts %} + - {{ art.name -}} + {% endfor %} + properties: + {%- for art in artifacts %} + {{ art.name }}: + $ref: {{ art.artifact_definition -}} + {% endfor %} +{% else %} properties: {} - # required: - # - network - # properties: - # network: - # $ref: massdriver/aws-vpc +{% endif %} # List of form customizations for params-schema # learn more about widgets & fields: https://docs.massdriver.cloud/bundles/custom-widgets-and-fields