What Happens After You Push
By Syncfusion®, Inc. · Last updated
What a CI/CD pipeline does after you push: the nine stops from push to production, the parts of a run (trigger, runner, job, step, log), and how to find the one log line that explains a red build.
What you will learn
- Say what CI and CD each check
- Name the nine stops from push to production
- Explain trigger, run, runner, job, step, log and exit code
- Find the first error line in a failed run
- Read a small GitHub Actions or Azure Pipelines file
- Fix a pipeline with no checkout, a missing trigger, a typo or tabs
What Happens After You Push
You push code. A robot checks it for you.
That robot is called a pipeline.
- It starts by itself on every push.
- It gets your code onto a clean machine.
- It installs packages, builds the app and runs the tests.
- It puts a green ✓ or a red ✗ on your pull request.
- A red ✗ keeps the Merge button locked.
Simple lesson: the pipeline checks every change, so broken code does not reach the main branch.
A Real-World Example
Think about a school canteen.
- A cook makes a new batch of samosas.
- A checker tastes one before it goes on the counter.
- The checker also checks it is cooked inside.
- A raw batch goes back to the kitchen.
- The checker does this for every batch, every day.
Now map the story:
- Kitchen = your laptop, where you write code.
- New batch = your push.
- Checker = the pipeline.
- Counter = the main branch that users get.
Simple lesson: a pipeline is a checker that never gets tired and never skips a batch.
Try It: Push a Change
Pick a change. Press git push. Watch the pull request.
- Typo fix: the check turns green. Merge unlocks.
- Price math change: a test fails. Merge stays locked.
- Nobody had to remember to test. The pipeline did it.
The red ✗ is not a punishment. It is the pipeline saving the main branch. A failed check before merge is cheap. A bug found by users is not.
CI and CD
CI and CD are two halves of one job.
Continuous Integration (CI)
CI = checking every change before it is merged.
- It runs on every push and every pull request.
- It builds the code and runs the tests.
- It answers one question: "Is this change safe to merge?"
Continuous Delivery (CD)
CD = moving a merged change safely to users.
- It runs after the change is merged.
- It answers: "How does this reach users safely?"
- It also answers: "How do we undo it if it breaks?"
The Path From Push to Production
Every change travels through the same nine stops.
Click a stop to see what it does. Or press Walk the path.
- Stops 1 to 5 are CI. They run before merge.
- Stops 6 to 9 are CD. They run after merge.
- Each stop has its own lesson in this course.
Simple lesson: CI says "safe to merge". CD says "safe to ship, and safe to undo".
Anatomy of a Run
A pipeline has a few simple parts.
Learn these words once. Every platform uses the same ideas.
Pipeline
Pipeline = a file in your repo that lists what to check.
- GitHub Actions calls it a workflow.
- It is written in YAML, a text format that uses spaces to show levels.
Trigger
Trigger = the event that starts a run.
- A push to a branch.
- A new or updated pull request.
- A schedule, like every night at 2 AM.
- A person clicking Run.
Run
Run = one time the pipeline does its work.
- Ten pushes make ten runs.
- Each run gets a number, like Run #41.
Runner
Runner = the computer that does the work.
- It is a fresh, empty machine in the cloud.
- Azure Pipelines calls it an agent.
- It starts empty, so it must download your code first.
- It is thrown away after the run.
Job
Job = a group of steps that run on one runner.
- A pipeline can have many jobs.
- Jobs can run at the same time, on different runners.
Step
Step = one command, or one ready-made action.
- Steps in a job run in order, top to bottom.
- If one step fails, the steps after it are skipped.
Log
Log = the text each step prints while it runs.
- It shows every command and its output.
- When a run fails, the log tells you why.
Watch a Run
Press a button. Watch each part light up.
- The push fires the trigger.
- The runner starts empty, so checkout comes first.
- The steps go one after another.
- A failed step stops the job. The result goes back as ✗.
Simple lesson: a trigger starts a run. A runner does the job. A job runs steps. Steps write the log.
Your First Run in the Lab
Now run a real pipeline file yourself.
- The popup has a real code editor with your pipeline file.
- Change picks what you pushed. Event picks what happened.
- Press ▶ Run. The log appears one line at a time.
Reading a Run
This run failed. Click each step on the left to read its log.
- Green steps passed.
- The red step is where it broke.
- Grey steps were skipped, because an earlier step failed.
- The highlighted line inside the red step tells you why.
Read the First Error, Not the Last
- The last line often says "exit code 1".
- That line only says that it failed.
- The first real error says why it failed.
- So scroll up from the bottom to the first error line.
Exit Code
Exit code = a number a command gives back when it ends.
0means success.- Any other number means failure.
- The runner fails the step when it sees a number other than 0.
Real tools vs this lab: GitHub and Azure show the same parts: a list of steps, a log per step, and a red error line. In this lab, the log follows the app and platform you picked at the top of the page.
Simple lesson: find the red step first. Then find the first error line inside it.
The Pipeline File
Here is a small pipeline. It runs on push and pull request, then builds and tests.
Click a note on the right. The lines it explains light up.
- Both platforms do the same job. Only the words differ.
- GitHub keeps the file in
.github/workflows/. - Azure keeps it at the top of the repo.
Spaces matter in YAML. Use two spaces for each level. Never use the Tab key. One tab makes the whole file fail to load.
Simple lesson: the file lists the triggers, the runner and the steps. The platform does the rest.
Fix Broken Pipelines
Each lab below starts with a broken file. Run it, read the log, fix the file.
The Runner Has No Code
- The runner starts empty.
- No checkout step means no code on the machine.
- So install fails with "file not found".
The Pull Request Is Not Checked
- A run starts only for events in the triggers.
- No pull request trigger means pull requests are never checked.
A Typo in a Command
- The runner types your command exactly as written.
- One wrong letter and the tool says "unknown command".
Tabs in YAML
- The file fails before any step runs.
- The editor shows a red line where the tab is.
Simple lesson: most red runs come from four things: no checkout, a missing trigger, a typo or bad spaces.
- Download the starter repo with the link above. It is a small shop app with 6 tests and a ready pipeline.
- Create an empty repo on GitHub and push the starter to it. The README has the exact commands.
- Open the Actions tab and click the newest run called CI.
- Click the test job and read its log, the way you did in this lesson.
What you should see: lint, typecheck and test turn green. The build-image and deploy jobs turn red, because they need your own image name and an Azure account. You set those up in Containers in CI and Deploy for Real. Red there is expected for now.
Quick Check
Cheat Sheet
| Idea | GitHub Actions | Azure Pipelines |
|---|---|---|
| File | .github/workflows/ci.yml | azure-pipelines.yml |
| Run on push | on: push | trigger: |
| Run on pull request | on: pull_request | pr: |
| Machine | runs-on: ubuntu-latest | pool: vmImage: ubuntu-latest |
| Get the code | uses: actions/checkout@v4 | checkout: self (added for you) |
| Run a command | run: npm test | script: npm test |
| Error line in log | ##[error]Process completed with exit code 1. | ##[error]Bash exited with code '1'. |
Common mistakes
| Mistake | Wrong idea | Correct idea | What goes wrong |
|---|---|---|---|
| Reading only the last log line | "exit code 1" is the cause | The first error line is the cause | You fix the wrong thing |
| No checkout step | The runner already has my code | The runner starts empty | Install fails with "file not found" |
Only push as a trigger | Pull requests are checked anyway | Add pull_request too | Pull requests merge with no check |
| Tabs in YAML | Tabs and spaces are the same | YAML needs spaces | The file fails to load |
| Re-running a red build without reading | It will pass next time | Read the log first | Real bugs get merged |
| "It works on my laptop" | My laptop proves it works | The clean runner is the real test | Hidden setup breaks for others |
Before you ask a teammate about a red run, find the red step and the first error line. Paste those two things. They will help you much faster.
What to Remember
- A pipeline checks every change, every time.
- CI guards the merge. CD guards the release.
- Trigger → runner → job → steps → log.
- The runner starts empty, so check out the code first.
- The first error line tells you why it failed.
- If it is not checked in CI, it is not a rule. It is a hope.
Exercises
Next: Builds, Artifacts and Environments