Skip to content

Instantly share code, notes, and snippets.

@fideloper
Created May 12, 2020 01:18
Embed
What would you like to do?

The pipeline could use a selection of pre-set features.

Goals

  1. Give the pipeline more polish by allowing users to "build" their pipeline (preset items they can run)
  2. Make Chipper feel more integrated with services such as AWS, Forge, Envoyer, Vapor
  3. Make it easier to script more complex items such as conditional actions, or creating build artifacts

It might be nice to have a way to have icons for each as well - PHP, NodeJS, Composer, Dusk, Vapor, etc etc etc.

Features

Here are some ideas on how this can work.

Simple

We make some presets (perhaps in the DB so we can add more). When a pipeline object is saved, some bash script is saved in the projects pipeline for the step.

Essentially each pipeline preset is just bash that we wrote.

Examples:

Composer Install (dev)

composer install

Composer Install (prod)

composer install --no-dev

Test

phpunit

Dusk

all that dusk bullshit

Medium

Pipeline scripts that allow some user input.

Examples:

  • Composer install script with option for dev vs prod to decide which deps to install.
  • Artifact uploader (uploads to s3) with fields for bucket, key, secret, files to exclude

Complex

Each pipeline object corresponds to a pipeline object that has pre, run, and post hooks. It's probably mostly just translated into bash but we can do things like send webhooks in the queue for users (with retries) instead of force them to write it in bash (fire and forget).

This allows for a mix of pipeline bash and custom logic around it.

Example pipeline object App\Pipeline\PostDeployWebhook.

  1. Run on success only
  2. Webook url: POST https://foo.org/hook
  3. Retries: 3

(This example has no bash to translate into the pipeline, but some could while others don't I'm sure).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment