Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Latest commit

 

History

History
159 lines (159 loc) · 7.57 KB

JENKINS.md

File metadata and controls

159 lines (159 loc) · 7.57 KB

Jenkins

admin UI install and setup for macOS

  • brew install jenkins-lts
    • Note: When using launchctl the port will be 8080. You can launch with --httpPort=7070 to change the port
    • To have launchd start jenkins-lts now and restart at login:  brew services start jenkins-ltsOr, if you don't want/need a background service you can just run:  jenkins-lts
  • jenkins-lts -> launches jenkins and gives you the initial admin password. You can launch with --httpPort=7070 to change the port
  • localhost:8080 brings up the ui
  • selected all the ssh plugins
  • admin user:
    • jenkinstest

Ubuntu Jenkins test node setup

  • users:
    • adduser jenkinstest
    • sudo usermod -aG sudo jenkinstest
  • ssh:
    • already had ~/.ssh/id_rsa.pub on mac so just needed to add it to the node...
    • cat .ssh/id_rsa.pub | ssh jenkinstest@(ubuntu ip) 'cat >> .ssh/authorized_keys'
  • docker:
  • appsody:
  • bash:
    • sudo dpkg-reconfigure dash
      • select no to change system shell from dash to bash
  • go:
  • java:
    • sudo apt install openjdk-8-jdk
  • make:
    • sudo apt update
    • sudo apt install make
  • bats:
  • create test node:
    • Manage Jenkins -> Manage Nodes -> New Node
      • Name: Appsody-Ubutu-Test-Node
      • Remote root directory: /home/jenkinstest
      • Launch method: Launch agent agents via SSH
      • Host: IP of the Ubuntu system/VM
      • Credentials: Add jenkinstest:(password)
  • create jenkins job to deploy bats tests on the node:
    • New item -> Name: Ubuntu-BATS -> Freestyle Project -> General
      • check "Restrict where this project can be run" and provide the name of the Jenkins Ubuntu node, ex: Appsody-Ubuntu-Test-Node
      • Build Environment
        • check "Delete workspace before build starts"
      • Build:
        • Execute shell command:
        git clone https://github.com/appsody/integration-test.git
        bats integration-test/ubuntu/integration_test/integration_tests.bats
        

RHEL Jenkins test node setup

  • users:
    • useradd jenkinstest
    • usermod -aG wheel jenkinstest
  • docker:
    • sudo yum remove docker docker-common docker-selinux docker-engine
    • sudo yum install yum-utils
    • sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    • sudo yum install docker-ce
    • sudo systemctl enable docker.service
    • sudo systemctl start docker.service
    • sudo usermod -aG docker jenkinstest
  • appsody:
  • bats:
  • go:
  • java:
    • sudo yum update
    • sudo yum install java-1.8.0-openjdk-devel
  • create test node:
    • Manage Jenkins -> Manage Nodes -> New Node
      • Name: Appsody-RHEL-Test-Node
      • Remote root directory: /home/jenkinstest
      • Launch method: Launch agent agents via SSH
      • Host: IP of the RHEL system/VM
      • Credentials: Add jenkinstest:(password)
  • create jenkins job to deploy bats tests on the node:
    • New item -> Name: RHEL-BATS -> Freestyle Project -> General
      • check "Restrict where this project can be run" and provide the name of the Jenkins RHEL node, ex: Appsody-RHEL-Test-Node
      • Build Environment
        • check "Delete workspace before build starts"
      • Build:
        • Execute shell command:
        git clone https://github.com/appsody/integration-test.git
        bats integration-test/ubuntu/integration_test/integration_tests.bats
        

Windows Jenkins test node setup

  • users:
    • create jenkinstest user in Administrators group
  • go:
  • choco:
  • make:
    • choco install make
  • docker:
  • appsody:
  • bash/ssh:
  • java
    • needed to manually copy the remoting.jar file from another slave node (ubuntu) to get the agent to connect
  • create test node:
    • Manage Jenkins -> Manage Nodes -> New Node
      • Name: Appsody-Windows-Test-Node
      • Remote root directory: /c/Users/jenkinstest
      • Launch method: Launch agent agents via SSH
      • Host: IP of the Windows system/VM
      • Credentials: Add jenkinstest:(password)
      • Advanced:
        • java path: /c/java/bin/java
  • create jenkins job to deploy bats tests on the node:
    • New item -> Name: Windows-BATS -> Freestyle Project -> General
      • check "Restrict where this project can be run" and provide the name of the Jenkins Windows node, ex: Appsody-Windows-Test-Node
      • Build Environment
        • check "Delete workspace before build starts"
      • Build:
        • Execute shell command:
        git clone https://github.com/appsody/integration-test.git
        bats integration-test/ubuntu/integration_test/integration_tests.bats
        
    • if stuff like "make" isn't found then log into the windows node as jenkinstest and edit the env path to include the directory where its stored (C:\ProgramData\chocolatey\bin). may need to disconnect the node and reconnect it for it to pick up the path changes