Say Goodbye to Makefile - Use Taskfile to Manage Tasks in CI/CD Pipelines and Locally

  Рет қаралды 21,419

DevOps Toolkit

DevOps Toolkit

Күн бұрын

Discover the modern way of managing tasks in your development workflow with Taskfile, your Makefile alternative. In this video, we dive into how Taskfile simplifies task management both in CI/CD pipelines and local environments. Learn how to define and execute tasks with ease, gain insights into Taskfile's convenient features, and see practical examples that will help you streamline your development process. Say goodbye to the complexity of Makefiles and embrace the simplicity of Taskfile for more efficient and maintainable workflows.
#Taskfile #CICD #Makefile
Consider joining the channel: / devopstoolkit
▬▬▬▬▬▬ 🔗 Additional Info 🔗 ▬▬▬▬▬▬
➡ Gist with the commands: gist.github.com/vfarcic/77c63...
🔗 Task: taskfile.dev
🎬 Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline: • Dagger: The Missing In...
▬▬▬▬▬▬ 💰 Sponsorships 💰 ▬▬▬▬▬▬
If you are interested in sponsoring this channel, please use calendar.app.google/Q9eaDUHN8... to book a timeslot that suits you, and we'll go over the details. Or feel free to contact me over Twitter or LinkedIn (see below).
▬▬▬▬▬▬ 👋 Contact me 👋 ▬▬▬▬▬▬
➡ Twitter: / vfarcic
➡ LinkedIn: / viktorfarcic
▬▬▬▬▬▬ 🚀 Other Channels 🚀 ▬▬▬▬▬▬
🎤 Podcast: www.devopsparadox.com/
💬 Live streams: / devopsparadox
▬▬▬▬▬▬ ⏱ Timecodes ⏱ ▬▬▬▬▬▬
00:00 Introduction
01:51 GNU Make (Makefile) to the Rescue?
04:22 Task and Taskfile (Replacements for Make and Makefile)
12:50 Task (Taksfile) Pros and Cons

Пікірлер: 67
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
What do you think of Task and Taskfile? Could it be useful for those who prefer defining tasks in a declarative way?
@coocoobau
@coocoobau 3 ай бұрын
Seriously disliking makefiles since the 90s. Tried nix, but... did not really like it and does not really apply imo to dev or infra/config as code projects. Using taskfile since a year now on multi-repo projects and works great, really like it. Has a few quirks with watcher, with the underlying shell interpreter, but managed to run past them.
@daveinthesky
@daveinthesky 3 ай бұрын
garden-rs/garden is great for this and similar use cases. It’s worth a look
@PeteDavison93
@PeteDavison93 3 ай бұрын
Great video! I've been helping to maintain Task for the last couple of years and you've done a fantastic job of introducing the project. It's always super motivating to see the community talking about it so positively.
@east4ming
@east4ming 3 ай бұрын
The Task's documentation is fantastic!
@torbendury4374
@torbendury4374 3 ай бұрын
Saving this for later. Wanted to look into Taskfiles some while ago, recently found another post on HN but with your video it'll definitely rank up on my "have a look at it" list!
@IvanRizzante
@IvanRizzante 3 ай бұрын
Thanks for another great video! I didn't know about this, it's definitively interesting and more appealing than Makefile to me. That being said I stick with remote development so I don't feel the pain of replicating the tasks locally/remotely but I'll definitively keep this (and Dagger) in my toolbox
@Taddy_Mason
@Taddy_Mason 3 ай бұрын
Yes finally!!
@cheebadigga4092
@cheebadigga4092 3 ай бұрын
Awesome thanks for the video! One note: You can execute dependencies synchronously by adding them as "- task: taskname" under "cmds" rather than "deps".
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
That's what I'm doing. I was referring specifically to the `deps` section. I think I mentioned in the video that they should be in `cmds` when synchronous exec is required.
@cheebadigga4092
@cheebadigga4092 3 ай бұрын
@@DevOpsToolkit ah sorry I misheard that then I think.
@Rundik
@Rundik 3 ай бұрын
"just" is another good task runner
@juanbreinlinger
@juanbreinlinger 3 ай бұрын
I've been using tasks for months now and can't recommend it more!
@32zim32
@32zim32 3 ай бұрын
I like it's simplicity. Look at Gradle. It can also be used for thi purpose. But it's too difficult and heavy. You need to read the whole gradle book and learn groovy. I like that modern IT is leaning towards simplicity again
@sohansingh2022
@sohansingh2022 3 ай бұрын
I was just exploring it because YAML feels much more comfortable to me! Thanks as usual.
@Propherex
@Propherex 3 ай бұрын
That what we need! More yaml!!! And build logic workarounds like 8:30! Nah, for me its no go zone.
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
I said at the very start that Task is for people who prefer a declarative format. Dagger is a better choice for those who prefer imperative languages.
@modernlogix
@modernlogix 3 ай бұрын
I thought I was the only one who had yaml-o-phobia. :P
@andywilson2177
@andywilson2177 3 ай бұрын
I've been using Task for years, it's great! I find it's great for working across platforms (Windows, Linux) to run the same commands that would usually just be a short bash script or Makefile. I don't quite understand your con about containers though? To me it's just a way of sequencing commands, which has nothing to do with containers.. and Dagger has a somewhat different use-case in mind which obviously *is* centered around containerised execution of things. In fact I have a Taskfile execute dagger commands, which saves me from having to remember command syntax and flags etc.. I think Task is more just a replacement for bash scripts really. Makefile wasn't designed to be a generic command running tool, whereas Task is
@M3MYS3LF1979
@M3MYS3LF1979 3 ай бұрын
Counterpoint: it works nicely with shell scripts if you need more complicated tasks than a multiline block scalar command can accomplish; the maintainers list this use case in the official style guide.
@danko95bgd
@danko95bgd 3 ай бұрын
Have you used justfile? It doesn't use yaml so it might seem leaner for defining tasks
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
I wasn't aware of it. I'll give it a try.
@manuelgp343
@manuelgp343 3 ай бұрын
I switched to Justfile and couldn't be happier. I was looking at taskfile first but man I already have enough YAML in my life. 😅
@MichaelBushey
@MichaelBushey 3 ай бұрын
@@manuelgp343There's not enough yaml in my life. I love things that are simple, clean, and readable.
@MrLinuxguru
@MrLinuxguru 3 ай бұрын
Mage is good aswell
@hkupty
@hkupty 3 ай бұрын
Use entr instead of the watcher... It can solve the issue with breaking a running execution
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
I haven't tried that one. Will do soon...
@hkupty
@hkupty 3 ай бұрын
@@DevOpsToolkit I hope it solves your issue. I've been using it for years for running tests. Seems like a good match for task as well.
@advertslaxxor
@advertslaxxor 3 ай бұрын
I like the idea of Taskfile, but I think it's execution is lacking a bit. You can't override env vars. You instead need to bloat your file with "{{.env}} some-cmd" or "{{.cmd}}" to override things. It handles hashing of generative tasks poorly. It doesn't hash the output files, so effectively you want to run the generation every time, since sometimes users will modify the files accidentally (or worse :D) It uses yaml. OK, OK, I know, I know; but I think yaml is riddled with bad designs (back to the yes/no bools, ...). I wonder if this could be done with a better data format such as TOML, though I think it would be more verbose.
@pettymanny6487
@pettymanny6487 3 ай бұрын
Why don't you have more likes?
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
Maybe I'm not a likable person 🙂
@joebowbeer
@joebowbeer 2 ай бұрын
A comparison to 'just' would be appreciated
@DevOpsToolkit
@DevOpsToolkit 2 ай бұрын
Adding it to my to-do list...
@thescourgeofathousan
@thescourgeofathousan 3 ай бұрын
I use Ansible to implement the actual work (can be actual work or just integration with tools depending on what the task is) that needs to be done at each stage of the pipeline. It’s perfect for this purpose. It also allows me to use the inventory of Ansible as configuration for the pipeline which enables me to manage this configuration in versions control rather than putting configuration in pipeline tool config via admin pages. The pipeline is purely orchestrator. This also facilitates the evolution of how the tasks in the pipeline are accomplished to be developed, tested and deployed via CICD also
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
The key is to be able to run tasks independently on the medium that runs them. We should be able to define them in a way that they can run anywhere and without duplication. Too many of us ended up having completely separate scripts and definitions of the same thing running in CI/CD pipelines, locally, remotely, etc.
@thescourgeofathousan
@thescourgeofathousan 3 ай бұрын
@@DevOpsToolkit I implement the functionality in Ansible roles which I package, test and publish to the pkg manager like any other software module. This is DevOps right? We are supposed to be doing things the dev way which means modularisation, packaging, publishing and reusability. Originally I did this with a maven archetype and parent Pom to integrate testing, packaging and publishing into the role (and playbook and inventory) delivery lifecycle but I think I would use collections today. Getting embedded script out of the pipeline config like you are doing in this video is great but we must replace it with modular, reusable packages available from a central repository as well. Using Ansible makes executing these tasks locally or remotely and via command line or pipeline as easy as can be. It’s like it was made for this (which it was just with a different impetus in mind)! But I imagine doing the same with the task definitions you are using would present no great obstacle.
@coocoobau
@coocoobau 3 ай бұрын
@@thescourgeofathousan Used bash a lot. Then used use ansible a lot, until 2.10, then everything became more difficult. I have always found ansible to slow for complex tasks and too heavy a deployment and dependencies for simple tasks. Ever used kubespray? God... Then went back to bash and was using makefiles just because most ppl did and with AI generators, they became easier to generate. Then switched to taskfile, thought was too limited at first, but I really wanted a fast, simple dsl with low deps (just one binary, cross platform). I really like it now.
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
@thescourgeofathousan those two are very similar in the way of organization.
@juanbreinlinger
@juanbreinlinger 3 ай бұрын
Ansible was originally designed to remote server provisioning. Later was extended to do a lot of other things, including AWS provisioning , DNS provisioning just to name a few. Passing variables between tasks is tedious to say the least. Ansible itself has to be mantained and upgraded. It has its own dependencies that can also be a bit of a nightmare if you use many of its plugins. I found ansible overly complicated and hard to mantain in a long term. Taskfile is a single binary with an specific purpose. I like it better because i can then choose helm / awscli / whatever and finally tasks as building blocks to orchestrate whatever I have in mind. The whole approach is more modular, easier to mantain and I can upgrade components individually.
@RoaiDude1
@RoaiDude1 3 ай бұрын
Why did you use make instead of projects like jenkins for example? Doesnt jenkins answer your commands needs?
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
Jenkins works well remotely, but not locally. I need a tool that i can use to define tasks that can be executed everywhere, both inside pipelines (e.g. Jenkins) and my laptop.
@RoaiDude1
@RoaiDude1 3 ай бұрын
@@DevOpsToolkit thanks for the answer. You are such a great educator!!!
@autohmae
@autohmae 3 ай бұрын
With this much YAML in my life... I guess I will come up with better tooling with dealing with them, so Taskfile seems like a good idea. I'll add it on my list for when it happens. PS I assume you didn't see my comment on how to reach me on social media ? I know KZfaq loves to block such things.
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
YT tends to delete those without any notifying me. Ping me on Twitter (@vfarcic) or LinkedIn (linkedin.com/in/viktorfarcic).
@autohmae
@autohmae 3 ай бұрын
@@DevOpsToolkit I pinged on X
@autohmae
@autohmae 3 ай бұрын
@@DevOpsToolkit well, I did ping you.
@kdietz65
@kdietz65 3 ай бұрын
It needs pluggable tasks, not just execute things by spawning out to shell. Can it do that?
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
Not sure what you mean by "pluggable tasks". Execute tasks defined elsewhere?
@kdietz65
@kdietz65 3 ай бұрын
@@DevOpsToolkit Like this stuff ... steps: - name: Setup Node.js uses: actions/setup-node@v2
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
I haven't tried something like that (tasks outside the main Taskfile). I tend to keep everything as Shell scripts and use Taskfile mostly to orchestrate them. Like that, "pluggable tasks" are just scripts Task should execute.
@martinbrusevold4405
@martinbrusevold4405 3 ай бұрын
I like Makefile
@modernlogix
@modernlogix 3 ай бұрын
I don't understand your argument of how nix-shell is an ephemeral environment. Anything that you build or run using nix shell stays behind in your filesystem. And for me, that is the most annoying part of the dev environment setup and not the installing and uninstalling of the packages. Most of the dev packages are available using some package manager. And if you install anything using curl from nix shell, that will leave behind files which is what you want containers for. I get that container use some resources to run on mac, but on modern macs(M1/+) it's a breeze and a much better experience IMO. And on Linux it's a no brainer since it's supported out of the box.
@starawojtka
@starawojtka 3 ай бұрын
another yaml based configuration system :S, I'm gonna skip it and just use good old bash/powershell scripts, some of the features you mentioned in the video are supported natively by modern CI/CD platforms
@DevOpsToolkit
@DevOpsToolkit 3 ай бұрын
You're right about CI/CD platforms. However, I am not going to run Jenkins build (or whichever other pipeline tool I'm using) while developing locally, especially since I expect that something to run in a watch mode and run tasks every time I save changes to whatever I'm working on. The goal is to be able to run tasks everywhere and that can be, as you said, Bash. From there on, it does not matter whether that something is executed from my laptop, or from GitHub Actions, or from a server, or from anywhere else. What I don't want is to write tasks (in whichever format) multiple times. Once in pipelines, once for running the same thing locally, once for... That's the important part. Now, whether you define all the tasks as scripts, or as Makefile, or as Taskfile, or as Dagger, or as anything else is of lesser importance.
@mostrealtutu
@mostrealtutu 3 ай бұрын
yaml >;C
@julianomoraisbarbosa
@julianomoraisbarbosa 3 ай бұрын
# til
@east4ming
@east4ming 3 ай бұрын
Ha ha ha, obviously, you pamper your audience and you care about their comments.
@udiromano3746
@udiromano3746 3 ай бұрын
Write some decent code and stop with this yaml engineering
@dinoscheidt
@dinoscheidt 3 ай бұрын
Yup.
@juanbreinlinger
@juanbreinlinger 3 ай бұрын
Taskfile is just a different approach to makefiles. C/C++ developers created makefiles in the past to improve their build processes. Taskfiles is the analogue to SREs to improve orchestrate CI/CD pipelines. i started coding, followed by makefiles / gradle tasks and finally using tasks . In my experience the benefits by using tasks greatly justify its use
@VeejayRampay
@VeejayRampay 3 ай бұрын
YAML really is a disease
@terrencemoore8739
@terrencemoore8739 3 ай бұрын
Not a fan lol. It looks bad.
From Makefile to Justfile (or Taskfile): Recipe Runner Replacement
11:44
Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline
33:29
Just try to use a cool gadget 😍
00:33
123 GO! SHORTS
Рет қаралды 85 МЛН
Testcontainers have forever changed the way I write tests
12:11
Dreams of Code
Рет қаралды 111 М.
5 Command Line Tools That Boost Developer Productivity (2023)
8:02
This Makes Golang CLI Development So MUCH Better
7:34
Melkey
Рет қаралды 20 М.
Kubernetes Deployment Order and Dependencies Demystified
21:03
DevOps Toolkit
Рет қаралды 7 М.
Kubernetes Events Are Broken (If You Are Building a Developer Portal)
18:16
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1 МЛН
Asus  VivoBook Винда за 8 часов!
1:00
Sergey Delaisy
Рет қаралды 1,2 МЛН
Спутниковый телефон #обзор #товары
0:35
Product show
Рет қаралды 1,8 МЛН
How To Unlock Your iphone With Your Voice
0:34
요루퐁 yorupong
Рет қаралды 28 МЛН
Что не так с яблоком Apple? #apple #macbook
0:38
Не шарю!
Рет қаралды 181 М.
YOTAPHONE 2 - СПУСТЯ 10 ЛЕТ
15:13
ЗЕ МАККЕРС
Рет қаралды 142 М.