Live data from Hacker News

Show HN: Updatecli – What if Dependabot and Ansible had a child?

news.ycombinator.com

1–10 of 39 posts

Show HN: Updatecli – What if Dependabot and Ansible had a child?

#1
What if Dependabot and Ansible had a child? Well for me that could be Updatecli.

Updatecli is a project that I started to help maintain the infrastructure of the Jenkins project. I needed something flexible enough to update YAML with whatever information needed. Because let’s say it, everybody loves YAML. YAML is everywhere.

Run it from everywhere…

Updatecli is a command-line tool written in Golang and available for Windows, Linux, MacOSx, amd64, arm64, thank you Goreleaser All of that to say that it runs from wherever CI or laptop we need.

As of today, Updatecli opened over 3000 Pull requests on Github, and it evolved to update automatically Dockerfile, Markdown, Helm Chart, and of course a lot of YAML for tools like Puppet, Kubernetes, or Jenkins.

How does it work?

Updatecli loads pipeline configurations from YAML(s) or Golang templates then enforce the state defined by the pipeline configuration. A pipeline run as followed:

1. Clone in a temporary location any git repositories used by the pipeline.

2. Fetch information for every *source* defined, and then inject them as entry parameters into condition(s) and target(s).

3. Test that all *conditions* defined succeed otherwise abort the pipeline.

4. Enforce the state for every *target* defined. A state means different things depending on the resource type, more on this later.

5. Commit and open pull requests when needed.

6. Apply next pipeline

A Updatecli pipeline relies on resources aka “extension” aka “plugins” to adapt pipeline behavior. By combining them, we can easily automate scenarios for release workflow, GitOps, dependency management, documentation update, etc.

A simple scenario could be: * Retrieve the latest Golang version * Test that a docker image with the latest Golang version exist on Dockerhub * If it exists, then bump the version in a YAML file and open a pull request on GitHub with the change

As of today, there are 9 extensions for "sources", 8 for "conditions", 6 for "targets", 2 for git repositories, and 1 for pull requests.

A very simple pipeline is available on -> https://www.updatecli.io/docs/prologue/quick-start/

For more complex pipelines, you can look for directories named “updatecli/updatecli.d” at the root of repositories on https://github.com/updatecli or the Jenkins infrastructure repository such as https://github.com/jenkins-infra/kubernetes-management/tree/...

I maintain a documentation website to document the different configuration. It’s not perfect but it’s available on www.updatecli.io

What’s next?

Well, it depends on many things. Updatecli is since the beginning, a fun side project, I wanted to practice Golang programming while automating tedious recurring tasks. I built it in a way that I could reuse it across the different projects which I maintain. It’s rather simple to add new resources so I’ll keep adding them based on my needs, I welcome any contributions that would benefit the community.

More information on https://www.updatecli.io https://github.com/updatecli/updatecli

Re: Show HN: Updatecli – What if Dependabot and Ansible had a child?

#3
This does sound interesting. Regarding the idea of constantly updating dependencies automatically, I've heard of Dependabot, and haven't used it much myself, but isn't there a danger with an automatic update breaking things in production without supervision?

I'd guess I'm missing something in that question?

Re: Show HN: Updatecli – What if Dependabot and Ansible had a child?

#4

This does sound interesting. Regarding the idea of constantly updating dependencies automatically, I've heard of Dependabot, and haven't used it much myself, but isn't there a danger with an automatic update breaking things in production without supervision? I'd guess I'm missing something in that question?

Depends on your risk tolerance. At a bare minimum you should have tests as part of your project and CI for detecting breaking changes from version bumps, with validating deploys to dev environments, and possibly human review of changes before deploys to prod.

Re: Show HN: Updatecli – What if Dependabot and Ansible had a child?

#5
post #2

this tool looks amazing. dependabot but open-source, with a plugin system, and you can run it locally. great idea, looking forward to trying it out!

Thank you very much. Major difference with dependabot is that you can use it for more use cases as you define what, how, and when something should be updated

Re: Show HN: Updatecli – What if Dependabot and Ansible had a child?

#6
post #2

this tool looks amazing. dependabot but open-source, with a plugin system, and you can run it locally. great idea, looking forward to trying it out!

agreed, FYI dependabot is open source for non-commercial use and you can run it locally

https://github.com/dependabot/dependabot-core/blob/main/LICE...

Re: Show HN: Updatecli – What if Dependabot and Ansible had a child?

#7

This does sound interesting. Regarding the idea of constantly updating dependencies automatically, I've heard of Dependabot, and haven't used it much myself, but isn't there a danger with an automatic update breaking things in production without supervision? I'd guess I'm missing something in that question?

You need very good tests in place to automatically change something or a lot of trust in your dependencies :P.

It's not the case on most of my project, so I never commit directly to the main branch, instead I commit on a temporary branch then open a PR on GitHub so we just review and merge the changes.

Re: Show HN: Updatecli – What if Dependabot and Ansible had a child?

#8

This does sound interesting. Regarding the idea of constantly updating dependencies automatically, I've heard of Dependabot, and haven't used it much myself, but isn't there a danger with an automatic update breaking things in production without supervision? I'd guess I'm missing something in that question?

Yes, an automatic update can break things. Personally, I am happy to have minor version updates be applied automatically if my test suite passes. For anything larger, I at least review the changelog to make sure there aren't any obvious breaking changes and then if the tests pass, I go ahead and deploy.

Re: Show HN: Updatecli – What if Dependabot and Ansible had a child?

#10

I had the need for such a tool a couple of months ago and wanted to build a dedicated tool. And you did it ! Thanks !

Thanks, Feel free to open GitHub issue on https://github.com/updatecli/updatecli/issues was what you were looking for. That would be very useful
Post reply on HN