Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Add support for Starlark export #39

Merged
merged 8 commits into from
May 13, 2022
Merged

Conversation

malcolmholmes
Copy link
Contributor

For Drone builds that are already using Starlark, being able to export a
Shipwright build as Starlark will allow the import of a Shipwright
build into the Starlark one, making possible a gradual transition from
one build tool to the other.

Copy link
Collaborator

@kminehart kminehart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple minor style changes and comment changes. I haven't quite looked at the reflection code yet.

plumbing/pipeline/clients/drone/client.go Outdated Show resolved Hide resolved
plumbing/pipeline/clients/drone/client.go Outdated Show resolved Hide resolved
plumbing/pipeline/clients/drone/config.go Outdated Show resolved Hide resolved
plumbing/pipeline/clients/drone/client.go Outdated Show resolved Hide resolved
plumbing/pipeline/clients/drone/starlark/starlark_test.go Outdated Show resolved Hide resolved
plumbing/pipeline/clients/drone/starlark/starlark_test.go Outdated Show resolved Hide resolved
plumbing/pipeline/clients/drone/starlark/starlark_test.go Outdated Show resolved Hide resolved
@@ -197,9 +204,7 @@ func (c *Client) renderStarlark(cfg []yaml.Resource) error {
for _, resource := range cfg {
switch t := resource.(type) {
case *yaml.Pipeline:
pipeline := resource.(*yaml.Pipeline)

sl.MarshalPipeline(pipeline)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My gut tells me that this could really return an error. Are there any places in this function where errors are being ignored or not returned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I first wrote this, I had all the err:= stuff in it. Then I eventually removed it because there was nothing that actually emitted an error.

plumbing/pipeline/clients/drone/client.go Outdated Show resolved Hide resolved
plumbing/pipeline/clients/drone/client.go Outdated Show resolved Hide resolved
malcolmholmes and others added 2 commits May 13, 2022 16:38
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
@malcolmholmes malcolmholmes merged commit 83f74f6 into main May 13, 2022
@malcolmholmes malcolmholmes deleted the malcolmholmes/add-starlark branch May 13, 2022 15:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants