Commit Graph

10 Commits

Author SHA1 Message Date
R Tyler Croy 42a10e3b9b
Automatically test parsing of all the .otto examples in the examples/ directory 2019-07-07 09:00:31 -07:00
R Tyler Croy 84fd6bcba7
Properly allow arbitrary ordering of macros and stages in the stages block 2019-07-06 10:37:14 -07:00
R Tyler Croy 1c8e0a66ee
Add an example of a potential matrix type pipeline.
Still exploring the syntax here a bit. The expectation is that blah() syntax
would actually be invoking macros which would simple expand out at parse/compile
time.

In this example, the `each` macro would create four different stage blocks.
Inside of those macro blocks, the keyword `it` is introduced to represent the
item which is intended to be substituted.

Each of those stage blocks have a name created using the`concat` macro.
2019-07-06 10:37:14 -07:00
R Tyler Croy ff919ce892
Make the stage block behave more consistently like other blocks
None of the other blocks have parenthesis and take arguments the way the
stage(name) does. To make all blocks behave a bit more in line with one another,
this commit changes the behavior of naming stages to look more like a
generalized block settings.

This presages some macro work that's coming in the following commits.
2019-07-06 10:37:13 -07:00
R Tyler Croy 9307068785
Remove the when, feedback, and before blocks in favor of more understandable "gates"
This syntax makes it more clear the conditions not only that a stage can be
entered , but what conditions must be met in order for the stage to
exit/complete.

There's a slight nuance, which I am not certain at the moment is important with
'when' in the declarative Jenkins Pipeline syntax as it relates to 'enter' here.
The 'when' directive can be used to prevent a stage from being executed in a
flow, i.e. skipped. An "enter" however could mean "wait for this criteria to be met"
which might be confusing to a user, but I think this initial simplicity is worth
the experiment.

The "exit" is obviously a bit easier to understand, but where some nuance will
come later on is how we might determine/model what exit criteria should hold
onto cluster resources, versus a simple "listener" which requires no 'runtime'
2019-07-05 19:28:28 -07:00
R Tyler Croy 0f66174874
Clean up the cache use syntax to avoid the confusing re-use of "from"
In the context of the cache {} block, we don't want to use `from` to copy the
cache directives from another stage entirely, rather we want to "use" the named
cached entry.

I think it makes sense to allow caches to be pulled individually. Imagining a
case where a compilation stage might create multiple platform specific
directories or binaries. In such cases, a Windows test-specific stage would only
want to grab the cached entries for Windows, etc.
2019-07-05 18:39:09 -07:00
R Tyler Croy 0df23d721e
Implement a grammar and lexer with Antlr4 capable of actually parsing an example
This of course comes with no actual implementation, but it at least provides a
grammar to start with.  There's likely some cleanup in the rules and edge cases
that are missing, but this is a start.
2019-07-04 17:33:19 -07:00
R Tyler Croy 7438e633ef
Experimenting with creating extensible steps
There's a big question in my mind on how to express what requires a runtime and
access to the working directory, and what should live "outside" of that.

Still uncertain.
2019-02-16 12:58:40 -08:00
R Tyler Croy 89597eecec
Sketch out some thinking on re-usability and extensibility through blueprints 2019-02-16 12:21:49 -08:00
R Tyler Croy 7208464aa8
Flesh out some initial thoughts on the characteristics of a model
Including an example to help tinker with the user interface for modeling a
process for a mock heroku-based web application.

What's missing right now for sure is the concept of credentials and how those
might fit into the world. That will require more thought.

The syntax is at the moment heavily inspired by Declarative Pipeline from
Jenkins, but not actually compatible.
2019-02-15 21:57:57 -08:00