Skip to main content

One post tagged with "ci/cd"

View All Tags

Write your CI/CD in TypeScript

· 6 min read
Tom Marcuzzi
Head of engineering @ Webcapsule

If most CI/CD tools today are robust, the way we define scripts in them comes with a few drawbacks:

  • they have strong vendor lock-ins;
  • they are difficult to test and debug locally;
  • they all use a different syntax in YAML, which is difficult to extend and compose. For all these reasons, when the person who wrote them is not around, it’s not uncommon that teams don’t know what scripts do. They rarely evolve and their maintenance is hard.

Using code and native Node.js modules to write CI/CD could solve all these problems and comes with a lot of benefits:

  • it’s possible to debug locally. To avoid regressions, it's even possible to test the CI/CD with a normal testing framework;
  • it offers better reusability across projects and greater composability;
  • it uses code instead of configuration, making it easy to catch errors, manage retries, loops, and conditional logic;
  • it integrates seamlessly with the rich Node.js ecosystem.

ci-cd