semaphoreci / cli

Semaphore 2.0 Command Line Interface
Apache License 2.0
25 stars 13 forks source link

Implement Periodic Scheduler in the CLI #144

Open darkofabijan opened 5 years ago

darkofabijan commented 5 years ago

https://github.com/renderedtext/s2-public-api-docs

CLI:

sem get schedules
sem get schedule <SCHEDULE_NAME>
sem edit schedule <SCHEDULE_NAME>
sem create schedule <SCHEDULE_NAME>
sem delete schedule <SCHEDULE_NAME>
sem apply -f <PATH_TO_FILE>
sem create -f <PATH_TO_FILE>
shiroyasha commented 5 years ago

Listing all schedules is not yet supported by the API if I have read the docs correctly:

sem get schedules
darkofabijan commented 5 years ago

Hmm yea. @DamjanBecirovic can we drop this "project_id" being required? :) https://github.com/renderedtext/s2-public-api-docs#list--schedules

shiroyasha commented 5 years ago

One more thing, we also need:

sem create -f <PATH_TO_FILE>
darkofabijan commented 5 years ago

@shiroyasha tnx. Updated description.

vendelin8 commented 5 years ago

What's the difference between create -f and apply -f ?

shiroyasha commented 5 years ago

@vendelin8 Valid question.

create -f creates a new, non-existing, resource. apply -f updates an existing resource.


We had plans to expand apply -f to support a logic like:

if resource.exists?
  update(resource)
else
  create(resource)
end

but this has not yet been implemented.

vendelin8 commented 5 years ago

Ok, thanks.