getpopper / popper

Container-native task automation engine.
https://getpopper.io
MIT License
305 stars 61 forks source link

Translate `uses: sh` workflows into Drone's Exec Pipeline #982

Closed shumbo closed 3 years ago

shumbo commented 3 years ago

Close #981

This PR adds support for uses: sh in Popper-to-Drone translator.

Limitations

Drone's pipelines must be executed by one runner, so Popper workflows need to have the same type for its all steps.

For example,

steps:
  - uses: docker://alpine
    runs: ["echo", "command 1"]
  - uses: docker://alpine
    runs: ["echo", "command 2"]

this Popper workflow will be translated to pipeline: docker.

steps:
  - uses: sh
    runs: ["echo", "command 1"]
  - uses: sh
    runs: ["echo", "command 2"]

this will be translated to pipeline: exec workflow.

However,

steps:
  - uses: docker://alpine
    runs: ["echo", "command 1"]
  - uses: sh
    runs: ["echo", "command 2"]

this cannot be translated and shows an error.

JayjeetAtGithub commented 3 years ago

Looks great ! I will try it out on my local once and merge.

JayjeetAtGithub commented 3 years ago

Thanks a lot @shumbo .