Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow to pass spec inline #28

Merged
merged 2 commits into from
Jan 6, 2020
Merged

feat: allow to pass spec inline #28

merged 2 commits into from
Jan 6, 2020

Conversation

sh0rez
Copy link
Contributor

@sh0rez sh0rez commented Aug 14, 2019

This allows to pass the contents from spec directly from drone.yml, for use
with autogenerated drone configurations.

See #27 (comment) for details why this is required.

Fixes #27

plugin.go Show resolved Hide resolved
This allows to pass the contents from `spec` directly from `drone.yml`, for use
with autogenerated drone configurations.
@tboerger
Copy link
Contributor

@drone-plugins/maintainers what do you think about that? IMHO it doesn't make a big difference if a previous step simply generates the manifest template which gets used by this plugin or if it's assigned as a multiline value.

I personally would prefer the previous step, showcased at #27 (comment).

@bradrydzewski
Copy link
Member

bradrydzewski commented Aug 14, 2019

I do not really have strong opinions.

I read the comment in issue #27 and I think the only question I have is how you plan on generating the string with jsonnet? Have you tested generating the string to ensure it works as expected before we modify the plugin accordingly?

In terms of implementation, I think if we allow reading from an inline string, we should use a different attribute name. I know in the past we have re-used the same attribute, however, in retrospect I think being more explicit is better.

for example:

spec: path/to/manifest.tmpl
spec_string: |
  image: ...
  manifests: ...

@bradrydzewski
Copy link
Member

@tboerger this is more of an aside, but one thing I noticed with the manifest plugin is that we tend to re-use the same templates for most (all?) of our projects and we only change the image name. Is there a way to represent this in yaml (sort of like auto_tag) so we can make the template optional?

@tboerger
Copy link
Contributor

Currently the template don't support the auto tagging, if we add that to the template it would be doable for most parts, but our windows versioning doesn't match the exact naming and I haven't checked how manifest is handling the arm versions without the template file.

Copy link
Contributor

@tboerger tboerger left a comment

Choose a reason for hiding this comment

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

Since we are already doing this string or read from file stuff on the github release plugin I think I'm fine with this change.

@sh0rez
Copy link
Contributor Author

sh0rez commented Jan 6, 2020

What's the state of this? Can it be merged?

@tboerger tboerger merged commit 2fe5f56 into drone-plugins:master Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline spec
3 participants