DevStream-Based GitLab Jenkins Harbor Integration

Prerequisites

Kubernetes cluster and DevStream CLI installed

Toolchain Deployment Configuration

Create toolchain.yaml configuration file:

---
tools:
- name: gitlab-docker
  instanceID: primary
  options:
    hostname: gitlab.example.org
    httpPort: 30080
- name: jenkins-k8s
  instanceID: main
  options:
    chart:
      valuesYaml: |
        controller:
          adminPassword: "securepass123"
          ingress:
            hostName: jenkins.example.org
- name: harbor-k8s
  instanceID: registry
  options:
    chart:
      valuesYaml: |
        externalURL: http://harbor.example.org
        persistence:
          registry:
            size: 10Gi

Deploy Tools

dtm init -f toolchain.yaml
dtm apply -f toolchain.yaml -y

Network Configuration

Add DNS records to /etc/hosts:

SERVER_IP gitlab.example.org jenkins.example.org harbor.example.org

Update CoreDNS ConfigMap:

kubectl edit cm coredns -n kube-system
# Add hosts block:
hosts {
  SERVER_IP gitlab.example.org
  ...
}

Access Credentials

  • GitLab: Retrieve root password via docker exec gitlab cat /etc/gitlab/initial_root_password
  • Jenkins: Username admin, password securepass123
  • Harbor: Username admin, password Harbor12345

Piepline Configuration

Create pipeline.yaml:

---
tools:
- name: repo-scaffolding
  instanceID: java-app
  options:
    destinationRepo:
      repo: java-spring-demo
      baseURL: http://gitlab.example.org:30080
- name: jenkins-pipeline
  instanceID: main
  dependsOn: [repo-scaffolding.java-app]
  options:
    jenkins:
      url: http://jenkins.example.org
    scm:
      cloneURL: http://gitlab.example.org:30080/root/java-spring-demo
    pipeline:
      jobName: springboot-pipeline
      imageRepo:
        url: http://harbor.example.org

Execute Pipeline Setup

export GITLAB_TOKEN=YOUR_GITLAB_TOKEN
export HARBOR_PASS=Harbor12345
dtm apply -f pipeline.yaml -y

Verification Steps

  1. Access GitLab at http://gitlab.example.org:30080 - verify repository creation
  2. Log in to Jenkins - confirm pipeline job exists
  3. Check Harbor at http://harbor.example.org - validate container storage
  4. Trigger GitLab commit - observe pipeline execution

CI Workflow

Automated process flow:

  1. Code push to GitLab triggers Jenkins pipeline
  2. Jenkins builds artifacts and creates container image
  3. Image pushed to Harbor registry
  4. Build status reported back to GitLab

Tags: DevStream gitlab Jenkins harbor kubernetes

Posted on Sat, 03 Oct 2026 16:27:53 +0000 by ace21