pipedream icon indicating copy to clipboard operation
pipedream copied to clipboard

Deploy / Update Workflows via Git, API, CLI

Open dylburger opened this issue 7 years ago • 58 comments

I want to write and test workflows on my local machine, storing the workflow's code in my existing version control system.

I also want to programmatically deploy workflows using a CLI, for example using a command like pipedream deploy. This way, I can deploy workflows locally or as part of my CI/CD pipeline.

Related: #1139

dylburger avatar Oct 23 '19 22:10 dylburger

We've launched the first version of the Pipedream CLI: https://docs.pipedream.com/cli/reference/

The CLI supports managing Event Sources for now (not yet workflows), so I updated the title of this ticket to reflect the need for managing workflows via CLI, and am keeping it open to track that request.

dylburger avatar Mar 12 '20 19:03 dylburger

@dylburger Thank you! I am finding Pipedream really useful, Workflow management via CLI would be great. I'm pretty new to this service, but picking up the concept and how to get real utility out of it is not a chore. I'll DM you if I can.

morganism avatar Oct 03 '20 13:10 morganism

Adding a comment from #857 here. When we support an API / CLI for deploying workflows, we plan to also let you serialize workflows to plaintext (e.g. JavaScript code with some config locally), which means you'd be able to store them in Git. That feature would enable the request below.

"For testing my workflow with a real case, I need to deploy my code, so everytime I test something I create a new version of the workflow. My workflow ends up with lots of versions. Most of them have bugs or are here for testing/debugging Sometimes I want to go back to a specific version but I can't remember which one it was, it can be 10 versions back or more, it's hard to identify versions and difference between them

Describe the solution you'd like Something closer to real code versioning, so more like git commits:

being able to add a comment to a version. This would be a "quick win", as I could just tag a revision that I know is working before creating more revisions, So I can easily come back to it even if I created many revisions after. Nice to have: being able to compare 2 versions of a workflow"

dylburger avatar Jan 28 '21 18:01 dylburger

This would be very useful.

ghost avatar Feb 08 '21 23:02 ghost

Would love to get this supported, this way we can migrate our processes from unstable Zapier zaps and Integromat scenarios to proper code solution with some tests.

moltar avatar Apr 05 '21 11:04 moltar

Geetings. I'm a newby to Pipedream, but after several weeks of working with workflows between Dropbox and ClickUp etc., I've been able to accomplish a lot processing information from phone to the ClickUp app. However, as I have developed these routines, there have been instances where I have deleted a step... I know, I know, even though it warns me about the delete, I just needed it to get out of the way so I could try another option, and of course when I did... I lost the routine. I only had to do that once, and fortunately it wasn't filled with a lot of functions, etc. I've looked and asked about a utility that will allow me to save a step, maybe as an archive, so it suggested I follow this issue.

At this point, my only option is to cut and paste the code between the async(events, steps, auths) {...} and place them in a .js files defined as functions. Does anyone have a better method? Then, I can test the code, and if it works, cut and paste the new version back into my .js functions file. Thanks.

sjn001tvh avatar Jun 10 '21 03:06 sjn001tvh

👍 for this, right now it's the only thing preventing my team from using your service!

cakemountain avatar Oct 29 '21 15:10 cakemountain

@cakemountain I hear you and we are working on an early version of this now! We’ll be sharing details on that here. We’d love y’all and anyone else watching this issue to test the beta when it’s ready.

dylburger avatar Oct 29 '21 15:10 dylburger

@dylburger love hearing it. Do you have an approximate release timeline for the beta?

cakemountain avatar Oct 29 '21 15:10 cakemountain

I don’t, but I’ll let you know as soon as we have clarity on that.

dylburger avatar Oct 29 '21 16:10 dylburger

@dylburger okay gotcha. if you're taking applicants for early access or beta testing we're highly motivated. Reach out to me on LinkedIn if you want to connect.

cakemountain avatar Oct 29 '21 17:10 cakemountain

this is my local workflow for writing tests inside of VSCode and constantly redeploying changes to pipeDream:

one file, 4 shells:

workflow

essentially:

  • pd dev (watch for changes)
  • pd logs (so i don’t need the web browser)
  • jest tests on my code
  • a scratchpad for doing random stuff

community post: https://pipedream.com/community/t/developing-code-steps-in-a-workflow-locally/1489

ak--47 avatar Nov 01 '21 17:11 ak--47

+1

doronlh avatar Mar 07 '22 12:03 doronlh

Would LOVE ❤️ this feature.

We manage code in a monorepo and storing workflows would be 👌 👌 👌

mmlngl avatar May 09 '22 12:05 mmlngl

This would be great! Looking forward to hearing some updates, hopefully.

jondkinney avatar May 10 '22 03:05 jondkinney

@sjn001tvh and anyone else that needs it, you can hit https://api.pipedream.com/v1/users/me/workflows (use the Authorization: Bearer ... header from the settings page) to download a JSON array of your workflows, including custom code in any components.

charlie-s avatar May 13 '22 19:05 charlie-s

Interesting - so this would be a code view of a complete workflow then? And in theory, we will next have a way to push these back? (Well one at a time. ;) And I assume we will have an endpoint to get one workflow eventually?

cfjedimaster avatar May 13 '22 20:05 cfjedimaster

It's not listed as an endpoint in their REST API docs. I also tried getting a workflow by ID without success. You may find that some POST/PUT requests work, but I wouldn't count on it in terms of creating/updating nested objects and such.

I just don't like the idea of building a complicated workflow that my users will depend on without having version control / backups. So this is better than nothing.

charlie-s avatar May 13 '22 20:05 charlie-s

Oh - duh - I misread you as someone from PD. :)

cfjedimaster avatar May 13 '22 20:05 cfjedimaster

@sjn001tvh and anyone else that needs it, you can hit https://api.pipedream.com/v1/users/me/workflows (use the Authorization: Bearer ... header from the settings page) to download a JSON array of your workflows, including custom code in any components.

How would you paginate?

andre-brunetta avatar May 16 '22 16:05 andre-brunetta