This repository was archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Make the type of builder to be a parameter of the config file #3
Open
mscherer
wants to merge
1
commit into
OSAS:master
Choose a base branch
from
mscherer:make_builder_parameter
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: {{ name }} | ||
builder: 'middleman' | ||
notification: | ||
{% if irc_server %} | ||
irc: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems you want to be able to handle different steps, which is nice.
Nevertheless I would have said:
command = builder_commands[config['builder']]['build']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, good catch. I am also wondering if we should assume that each step will always be 1 command, or it can be more.
And I am also pondering on putting that in a yaml file, like this:
$ cat /something/middleman.yml
Can we reasonably assume that bundle would be used to install if there is a Gemfile, or that's something that could be bound to change right now (like, is the state of the ecosystem such that everybody use it, if I am not wrong ?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for a YAML config file
I think so for the Gemfile. In this case you need to handle that future steps would need to be run using "bundle exec" (if a Gemfile was detected only).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, i wonder if we need a config file, or if we can also try to be smart and autodetect. Like, if there is a gem file and it contains middleman, then we know what to do. I can be added later however, but I wanted to dump that idea so I do not forget.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some well-documented magic for simple things not requiring customization if nice. Gemfile->bundler is a simple one, no parameters needed, always the same command to run.
nevertheless there are tasks which are custom, like rh-events runs a dedicated ruby script. We may have ordering problems too (like do something before the build but after bundler).
So I guess we can defined these phases which would be enough for all cases I can think of in our current work:
for maximum flexibility we could allow to not run the magic build.
maybe we could even have a single YAML file with just a list of commands to run, and have special magic command names for the smart deps install and build phase, so you could reorder or skip very easily. An missing recipe file would result into chaining these two magic actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, why not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's like DH in some way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DH ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like dh_auto_*here the actions are normal commands, so you can order things as you want, or even not call the command of this step of the workflow, or pass special parameters…
well of course we do not need such complicated things here.