Back to Browse

How to execute a script before or after a job (Quick & Easy Guide 2026)

779 views
Premiered Apr 23, 2025
14:48

In this video, you’ll learn how to execute scripts before or after a job runs in GitLab CI/CD using the before_script and after_script keywords. These features allow you to prepare the environment before a job starts and perform cleanup or notifications after the job finishes. If you want more control over your GitLab CI job lifecycle, this tutorial is essential for building reliable and professional CI/CD pipelines. 🎯 What You Will Learn: ✅In this GitLab CI/CD tutorial, you will learn how to: ✅Understand the role of before_script and after_script in GitLab CI ✅Execute commands before the main job script runs ✅Run cleanup or post-execution tasks after the job completes ✅Share common setup steps across multiple jobs ✅Improve pipeline reliability and maintainability ✅Apply real-world DevOps use cases using GitLab CI/CD 🚀 Subscribe to our channel For more FREE courses 🔴🎁👉 https://www.youtube.com/@devops_topics?sub_confirmation=1 ⭐️ T I M E S T A M P S ⭐️🌟 ✅ Maybe also interesting courses for you 👇 ▶️Docker for absolute beginners: https://www.youtube.com/watch?v=0bVaGpn4aoU&list=PLE1_rz1ItUtnQaPoM8ZcD2XHs5mLDTPd-&ab_channel=DevOpsTopics ▶️Kubernetes for absolute beginners: https://www.youtube.com/watch?v=8SQY3pcJ13k&list=PLE1_rz1ItUtklKKtmNPyy6KuZIJmbVEvG&index=1&ab_channel=DevOpsTopics ▶️Helm for absolute beginners: https://www.youtube.com/watch?v=VfGpidWj7rs&list=PLE1_rz1ItUtmKfnWpea2H5eb7GQ4ng2vP&ab_channel=DevOpsTopics ▶️Kubernetes advanced topics: https://www.youtube.com/watch?v=fX5LJehYca0&list=PLE1_rz1ItUtnlCgJPRSfSianrArOF6WfE&index=1&ab_channel=DevOpsTopics ▶️Terraform: https://www.youtube.com/watch?v=lNrffkUn5dg&list=PLE1_rz1ItUtlx9NQ_VtkweGXcOJ3xDf0-&ab_channel=DevOpsTopics ▶️Linux basics: https://www.youtube.com/watch?v=tlwiYi5p2bU&list=PLE1_rz1ItUtnEPC77zbp6KDonWQgSI8Fe&ab_channel=DevOpsTopics ✅ Follow us on 👇 ➡️Facebook: https://www.facebook.com/devopstopics ➡️Instagram: https://www.instagram.com/devopstopics ➡️LinkedIn: https://www.linkedin.com/company/devops-topics ➡️Don't forget to subscribe: https://www.youtube.com/@devops_topics?sub_confirmation=1 #Terraform #DevOps #kubernetes #DevOpsEngineer #devopsengineering #devopscommunity #devopstools #devopsjobs #DevOpsCertification #devopstransformation #DevOpsBestPractices #IAC #InfrastructureAsCode

Download

1 formats

Video Formats

360pmp418.5 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

How to execute a script before or after a job (Quick & Easy Guide 2026) | NatokHD