Integrating Gitee with Zadig for Seamless Microservice CI/CD
This guide walks you through adding a Gitee code source to Zadig, configuring a microservice-demo project with Vue.js frontend and Golang backend, setting up services, builds, environments, workflows, and automatic triggers to achieve end‑to‑end continuous delivery on Kubernetes.
Preparation
The example uses the microservice-demo project, which contains a Vue.js frontend service and a Golang backend service. All required source code and configuration are forked from the official Zadig examples repository.
Add Gitee Code Source
Create a Gitee third‑party application: go to your Gitee account avatar → Settings → Data Management → Third‑party Applications → Create Application.
Fill in the required fields (application name, homepage, callback URL, logo, and permissions such as
projects,
pull_requests,
hook,
groups) and click Create . After creation, note the Client ID and Client Secret .
In the Zadig system, navigate to System Settings → Integration Management → Code Source Integration and click Add . Choose Gitee as the code source and fill in the previously obtained Client ID, Client Secret, and the Gitee username.
Project Configuration
Create a new project in Zadig: click New Project , enter the name microservice-demo , select K8s YAML Project , and proceed through the wizard.
Create Services and Configure Builds
For each service (backend and frontend), create a service in Zadig and manually input the Kubernetes YAML definition (Service as Code). Save the service after entering its name and YAML content.
Configure the build for the backend service: select the backend service, click Add Build , specify the Go 1.13 runtime, point to the forked repository, and provide the build script.
Repeat the same steps for the frontend service.
Add Environments
Proceed through the wizard’s next steps; Zadig will automatically create two environments (e.g., dev and prod) containing the two services and associated workflows.
Workflow Delivery
Run the workflow for the dev environment by selecting microservice-demo-workflow-dev and clicking Start Task . Monitor the workflow execution and view real‑time build logs.
After completion, both backend and frontend services are deployed with updated images in the dev environment.
Configure Automatic Trigger
Add a webhook trigger so that code pushes, pull requests, and tag pushes automatically start the build and deployment workflow.
Change Code to Trigger Workflow
When a Gitee pull request is created, the associated workflow microservice-demo-workflow-dev is automatically triggered in Zadig.
Configure IM Notification
Set up IM notifications in the workflow so that execution results, environment changes, and service updates are pushed to the chosen instant‑messaging system for real‑time monitoring.
After the workflow finishes, the updated images appear in the environment, and the IM channel receives a notification.
Ops Development Stories
Maintained by a like‑minded team, covering both operations and development. Topics span Linux ops, DevOps toolchain, Kubernetes containerization, monitoring, log collection, network security, and Python or Go development. Team members: Qiao Ke, wanger, Dong Ge, Su Xin, Hua Zai, Zheng Ge, Teacher Xia.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.