How to add Jenkins master to Spinnaker


#1

I’m newby in Spinnaker and trying to build CI/CD deployment with spinnaker + jenkins. I want to create automated trigger from Jenkins. but i couldn’t add jenkins configuration in to Spinnaker.

this is current hal configuration

%hal config
ci:
  jenkins:
    enabled: true
    masters: []
  travis:
    enabled: false
    masters: []

and this is configuration file /opt/spinnaker/config/spinnaker-local.yml

services:
  igor:
    enabled: true
  jenkins:
    enabled: true
    defaultMaster:
      name: myjenkins
      baseUrl: http://myip:8080
      username: {my user id}
      password: {my password}

as u can see, i added jenkins configuration into spinnaker-local.yml but when i test with curl command, i cannot find jenkins master

$ curl localhost:8084/v2/builds
[]

I’m using spinnaker 1.5.4 and Jenkinx 2.8X version


#2

Are you still stuck?
There have been quite a few releases since 1.5.4. (Current 1.10.2).
Have you seen these docs? https://www.spinnaker.io/setup/ci/jenkins/


#3

Looking at your config, I believe you’ll want to move your jenkins server configuration into the hal config and re-deploy.

ci:
  jenkins:
    enabled: true
    masters:
    - name: myjenkins
      baseUrl: http://myip:8080
      username: {my user id}
      password: {my password}

This can also be done with hal config ci jenkins master add (https://www.spinnaker.io/reference/halyard/commands/#hal-config-ci-jenkins-master-add)

I’d also second Karl’s suggestion of upgrading to a newer Spinnaker version if possible.