You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

945 B

Jenkins Server

  • Setup docker compose yml
version: '3.8'

networks:
  jenkinsNet:
    external: false

services:
  jenkins:
    image: jenkins/jenkins:lts-jdk11
    privileged: true
    user: root
    restart: always
    networks:
      - jenkinsNet
    ports:
      - 6080:8080
      - 50000:50000
    environment:
      DOCKER_TLS_CERTDIR: /certs
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./jenkins-data:/var/jenkins_home
      - /home/mitech/.ssh:/root/.ssh
    extra_hosts:
      - "dev.mitech.com.sg:172.16.40.21"    

  • setup ssh credential and known_host
// to generate private and public key
$ ssh-keygen

// TO add gitea server into known_hots file
$ git clone ssh://git@dev.mitech.com.sg:29419/mitech-public/scm-setup.git
  • copy rsa_id.pub into Gitea jenkins account
  • add rsa_id private key into jenkins credential store Credential