All Projects → psfinaki → Finelines

psfinaki / Finelines

Licence: MIT license
YAML pipelines as proper code.

Programming Languages

F#
602 projects

Projects that are alternatives of or similar to Finelines

Rocket
Define your release steps 🚀
Stars: ✭ 99 (+65%)
Mutual labels:  yaml
compose-generator
🐳 Easy to use cli tool to generate Docker Compose configurations
Stars: ✭ 111 (+85%)
Mutual labels:  yaml
ccheck
A command line tool for validating Kubernetes configs with rego
Stars: ✭ 63 (+5%)
Mutual labels:  yaml
write-yaml
Basic node.js utility for converting JSON to YAML and writing formatting YAML files to disk.
Stars: ✭ 38 (-36.67%)
Mutual labels:  yaml
pytest-variables
Plugin for providing variables to pytest tests/fixtures
Stars: ✭ 69 (+15%)
Mutual labels:  yaml
config-cpp
C++ Configuration management library inspired by the Viper package for golang.
Stars: ✭ 21 (-65%)
Mutual labels:  yaml
powerflows-dmn
Power Flows DMN - Powerful decisions and rules engine
Stars: ✭ 46 (-23.33%)
Mutual labels:  yaml
QRCodeReader
🔳 The Aim of the project is to detect and extract QR code from the images
Stars: ✭ 81 (+35%)
Mutual labels:  yaml
luban
你的最佳游戏配置解决方案 {excel, csv, xls, xlsx, json, bson, xml, yaml, lua, unity scriptableobject} => {json, bson, xml, lua, yaml, protobuf(pb), msgpack, flatbuffers, erlang, custom template} data + {c++, java, c#, go(golang), lua, javascript(js), typescript(ts), erlang, rust, gdscript, protobuf schema, flatbuffers schema, custom template} code。
Stars: ✭ 1,660 (+2666.67%)
Mutual labels:  yaml
ad localize
ADLocalize is a simple way to manage your localization files. Supported wording sources : CSVs and Google Sheets. Localization file generation available for iOS, Android, JSON (i18next), YAML and Java properties
Stars: ✭ 22 (-63.33%)
Mutual labels:  yaml
idr-metadata
Curated metadata for all studies published in the Image Data Resource
Stars: ✭ 12 (-80%)
Mutual labels:  yaml
ADLES
Automated Deployment of Lab Environments System (ADLES)
Stars: ✭ 28 (-53.33%)
Mutual labels:  yaml
yaml-include
Valid, modular YAML documents with js-yaml. Seriously.
Stars: ✭ 39 (-35%)
Mutual labels:  yaml
Ubigeo-Peru
Base de datos de departamentos, provincias y distritos del Perú (UBIGEO) actualizada al 2019 (El INEI ha actualizado hasta el 2016). SQL, JSON, XML, CSV, Arreglos PHP, YAML.
Stars: ✭ 113 (+88.33%)
Mutual labels:  yaml
dif
'dif' is a Linux preprocessing front end to gvimdiff/meld/kompare
Stars: ✭ 18 (-70%)
Mutual labels:  yaml
yaml-runtimes
YAML processor runtimes via docker
Stars: ✭ 28 (-53.33%)
Mutual labels:  yaml
fix2json
A command-line utility to present FIX protocol messages as JSON or YAML
Stars: ✭ 44 (-26.67%)
Mutual labels:  yaml
django-yamlfield
A Django database field for storing YAML data
Stars: ✭ 31 (-48.33%)
Mutual labels:  yaml
pipeline-as-yaml-plugin
Jenkins Pipeline As Yaml Plugin
Stars: ✭ 111 (+85%)
Mutual labels:  yaml
jr.mitou.org
未踏ジュニアの公式Webサイトです! YAML ファイルで更新できます 🛠💨
Stars: ✭ 17 (-71.67%)
Mutual labels:  yaml

.NET

Finelines

Write YAML pipelines in F#.

Demo

let hostedPool = 
    hostedPool {
        vmImage VmImage.Windows2019 
    }

let buildCode = 
    dotNetCoreCliBuild {
        workingDirectory "src"
    }

let test =
    dotNetCoreCliTest {
        workingDirectory "test"
    }

let publish =
    dotNetCoreCliPublish {
        arguments "-c release -o deploy -r win-x64"
    }    
    
let buildTestPublish =
    job {
        name "my-awesome-job"
        addTask buildCode
        addTask test
        addTask publish
    }

...

let build =
    stage {
        name "Build"
        pool hostedPool
        addJob buildTestPublish
    }

let release =
    stage {
        name "Release"
        pool hostedPool
        addJob createResources
        addJob deployToProduction
    }

let myAwesomePipeline =
    pipeline {
        addStage build
        addStage release
    }

Motivation

As continuous integration becomes more complex, the developer world is moving towards the idea of "Pipelines as Code" bringing the benefits of version control, easy rollbacks and so on. YAML pipelines have been gradually replacing old UI pipelines for CI and CD.

Now the problem with YAML pipelines is that YAML is not "code". It's not a programming language. It was never meant to be. It's a markup language, or a data serialization language, or whatever, but it was not created for development. All the attempts to build programming experience (like variables or conditions) on top of it are obstructions and only cause pain.

Finelines are created for writing pipelines using real programming language (F#) to leverage the power of compiler and developer environment.

Why F#?

F# has great type inference which lets people write strongly typed code without actually specifying types everywhere (I'm looking at you C#). Computational expressions make syntax very succinct and close to plain English.

Inspiration

The concept and implementation are influenced by the "Infrastructure as Code" projects and in particular by Farmer which translates F# to ARM templates (JSON configuration) is a similar manner and for similar reasons.

Scope

The project was written with Azure DevOps YAML pipelines in mind and therefore deals with the respective schema.

Nonetheless, most probably the whole thing can be rather easily generalized to support other CI/CD systems dealing with YAML. I would welcome this, it's just that I don't have experience with other engines yet.

State of the art

The current code is not supporting the whole schema yet.

Here's what's available:

  • Stages
  • Jobs (both regular jobs and deployments)
  • Pools (private and hosted ones)
  • Tasks (a dozen of some popular ones)

What needs to be done:

  • Triggers
  • Environments
  • Other steps besides tasks
  • Other tasks

Design philosophy

One idea is to catch as many errors as possible while generating the pipeline. For example, this code will throw when trying to generate YAML:

azureWebAppWindows {
    subscription "Test"
    appName "Test"
    target "Test"
    addAppSetting "port" "5000"
    addAppSetting "port" "3000" // throws: copypaste? another setting meant here?
}

This is a much faster response compared to actually executing the pipeline (or worse, the service).

Another idea is to bring back the discoverability of UI pipelines:

image

It's much more clear what is required here as compared to this monster. We can split this into possible cases for the task and then leverage things like IntelliSense to understand what can be specified:

image

State of the code

The code needs a proper review for things like naming, structure and so on. It's relatively well covered with unit and integration tests.

To get started, run:

dotnet tool restore
dotnet paket restore

Then you should be good to go. In the solution you can find a sample showing things in action (generating YAML from F#). Integration tests will also we helpful.

Help needed!

This project is a result of a few months of exciting mornings with computational expressions in F#. Before I continue, I need to understand if this is of some use. Feel free to create issues and pull requests or just reach out to me with your feedback via Discussions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].