gsandf / dev-scripts

✨ Our tools for project setup, configuration, and deployment
6 stars 0 forks source link

Create standardized or template `yml` files for pipelines #10

Open coherencez opened 6 years ago

coherencez commented 6 years ago

possibly covered by #5 but incase it's not. As the title says the idea would be to have either some sort of pipeline standardization, or a set of pipeline templates for each type of deploy we have. i.e. pipeline-templates

blakek commented 6 years ago

I really like this, and I've been thinking about how we could do this same thing.

The problem has been the bitbucket-pipelines.yml doesn't have the ability to import other files into it. However, with the repo you linked, we might could instead compile them outside the repo and just import them. I'd be interested in seeing how that'd work. Another restriction is the bitbucket-pipelines.yml must exist in the root of the repo before being pushed, so we can't build it on the fly. However, I'm sure we could think of something.

Another (not thoroughly thought through) option would be making a simple file that only has one script. For example:

image: gsandf/nonexistant-deploy

pipelines:
  default:
    - step:
        caches:
          - node
        script:
          - yarn pipeline

The idea is that script would figure out what branch it's being run from and run a set of defaults (e.g. lint, test, deploy).

Anyway, this is a good topic that needs some research! Maybe tomorrow we can get time set aside to get a plan on this.