DEV Community

Cover image for I Set Up a Real CI/CD Pipeline in 20 Minutes Using Alibaba Cloud—Here’s How
Bhavesh Panchal
Bhavesh Panchal

Posted on

I Set Up a Real CI/CD Pipeline in 20 Minutes Using Alibaba Cloud—Here’s How

A few weeks ago, I was tired of manually building, testing, and deploying a little side project every time I made a change. You know the drill:

“Did I push the right image?”

“Wait, is this the staging or prod cluster?”

“Why did it work locally but fail in the cloud?!”

So I decided to finally set up a proper CI/CD pipeline. But I didn’t want to wrestle with Jenkins or stitch together five different services. I wanted something simple, integrated, and—ideally—free to start.

That’s when I gave Alibaba Cloud DevOps a shot. And honestly? It surprised me.

In under 20 minutes, I had a working pipeline that:

  • Builds a Docker image on every git push
  • Runs tests
  • Deploys to Kubernetes (ACK) with zero manual intervention

No YAML nightmares. No self-hosted runners. Just… it worked.

Here’s how I did it—and how you can too.


Why I Chose Alibaba Cloud DevOps (And Why You Might Like It)

I’m already using Alibaba Cloud for hosting, so I figured: why not keep everything in one place?

Turns out, their DevOps platform comes with:

  • A built-in Git repo (like GitHub, but inside Alibaba Cloud)
  • Visual + YAML pipeline editor
  • Direct integration with their Kubernetes service (ACK), container registry (ACR), and monitoring tools
  • Free tier that’s generous enough for personal projects

No extra accounts. No secret management headaches. Just code → build → deploy.


Step 1: Create a Project (Takes 30 Seconds)

Log into the Alibaba Cloud Console, go to Application Services → DevOps, and click Create Project.

I named mine my-tiny-api and chose “Create a new code repository.”

Boom—now I had a Git URL like https://code.aliyun.com/yourname/my-tiny-api.git.


Step 2: Throw in a Simple App

I used a bare-bones Node.js server—nothing fancy.

// index.js
const http = require('http');
http.createServer((req, res) => {
  res.end('Hello from CI/CD land! 🌍\n');
}).listen(8080);
Enter fullscreen mode Exit fullscreen mode

And a minimal package.json with a fake test script (hey, it’s a demo!):

{
  "scripts": {
    "start": "node index.js",
    "test": "echo '✅ All good!'"
  }
}
Enter fullscreen mode Exit fullscreen mode

Then:

git add .
git commit -m "Hello, pipeline!"
git push origin main
Enter fullscreen mode Exit fullscreen mode

Step 3: Build the Pipeline (The Fun Part)

In the DevOps dashboard, I clicked Pipelines → Create Pipeline and picked Custom Pipeline.

Instead of clicking through a UI (though you can!), I switched to YAML mode and pasted this:

version: "0.1"
stages:
  - stage:
      name: Build
      steps:
        - step: build@docker
          name: Build Docker image
          properties:
            dockerfile: |
              FROM node:18-alpine
              WORKDIR /app
              COPY . .
              RUN npm ci --only=production
              CMD ["npm", "start"]
            imageName: registry.cn-hangzhou.aliyuncs.com/my-namespace/my-tiny-api
            imageTag: ${BUILD_NUMBER}

  - stage:
      name: Test
      steps:
        - step: script
          name: Run tests
          properties:
            commands: ["npm test"]

  - stage:
      name: Deploy
      steps:
        - step: deploy@kubernetes
          name: Ship it!
          properties:
            clusterId: "cls-xxxxxx"  # ← your ACK cluster ID
            namespace: "default"
            manifests:
              # Your Deployment + Service YAML goes here
              # (see full example in the expanded version)
Enter fullscreen mode Exit fullscreen mode

🛠️ Gotchas I hit:

  • Make sure your Container Registry namespace exists
  • Grant your DevOps project permissions to ACK and ACR (it prompts you!)
  • Use npm ci, not npm install, for reproducible builds

I clicked Run, held my breath… and watched it build, test, and deploy—successfully!


Step 4: Automate It

Back in pipeline settings, I turned on “Trigger on push to main”.

Now, every time I git push, magic happens:

  1. Code lands in the repo
  2. Pipeline starts automatically
  3. New version is live in my cluster in ~2 minutes

It feels like cheating. In a good way.


Bonus: It’s Not Just for Alibaba Fans

Even if you’re used to GitHub Actions or GitLab CI, give this a look if:

  • You’re already on Alibaba Cloud
  • You want less context-switching
  • You value “it just works” over maximum flexibility

Is it as customizable as Jenkins? No.

Do I care for a small project? Also no.

Sometimes, simplicity is the real superpower.


Final Thoughts

I walked in expecting complexity. I walked out with a working CI/CD pipeline and time to spare.

If you’ve been putting off automating your deployments—especially on Alibaba Cloud—just try it. You might be done before your coffee gets cold.

🔗 Get started: Alibaba Cloud DevOps

(Yes, there’s a free tier!)


Have you tried Alibaba Cloud DevOps?

Or do you swear by another CI/CD tool? I’d love to hear your take in the comments! 👇



Built something cool with cloud automation? Share it! We’re all learning.

#devops #cicd #alibabacloud #kubernetes #webdev #beginners #programming #automation


P.S. No, I don’t work for Alibaba—I’m just a dev who hates manual deploys. 😅

Top comments (0)