Updating Load_Cartridge job

This section describes two ways how to update your ADOP Instance to inherit Pluggable SCM -

  • Automatically - quick way
  • Manually - more like a workaround

Automatic way

  • Re-run Load_Platform job to grab all the DSL jobs for the new Load_Cartridge job
  • Update your Jenkins image to be the latest version on the Github repository in your compose and then re-initialise ADOP using ./adop compose init -m name-of-your-machine
    • Note: Just check the latest Jenkins image version here, it contains a couple of additional environment variables, plugins and some properties files in the right location. This change has been described below using Manual way.
  • Re-generate your Workspace and Project to ensure you have the latest version of Load_Cartridge job which should contain some additional fields, take a loot at picture below.

Manual way

This basically describes what changes have been done on the Jenkins image and if you prefer not to use the latest version.

Note: Please use your own values, below are just examples!

  • Get onto the ADOP/C host and add the following files in the respective locations on the Jenkins volume (you have to create all directories manually)

    • /var/jenkins_home/userContent/datastore/pluggable/scm/CartridgeLoader/adop-gitlab.props
    loader.id=adop-gitlab-1
    gitlab.endpoint=gitlab
    gitlab.user=jenkins
    gitlab.port=29418
    gitlab.protocol=ssh
    gitlab.context=gitlab
    
    • /var/jenkins_home/userContent/datastore/pluggable/scm/ScmProviders/adop-gitlab.ssh.props
    scm.loader.id=adop-gitlab-1
    scm.id=adop-gitlab-ssh
    scm.type=gitlab
    scm.code_review.enabled=true
    scm.protocol=ssh
    scm.port=29418
    scm.host=10.0.0.1
    scm.url=http://gitlab/gitlab/
    
    • /var/jenkins_home/userContent/datastore/pluggable/scm/ScmProviders/adop-gitlab.http.props
    scm.loader.id=adop-gitlab-1
    scm.id=adop-gitlab-http
    scm.type=gitlab
    scm.protocol=http
    scm.port=80
    scm.host=10.0.0.1
    scm.context=gitlab
    scm.url=http://gitlab/gitlab/
    
  • Add the following Environment Variables in Manage Jenkins -> Configure System -> Global Properties
    • PLUGGABLE_SCM_PROVIDER_PROPERTIES_PATH=”/var/jenkins_home/userContent/datastore/pluggable/scm”
    • PLUGGABLE_SCM_PROVIDER_PATH=”/var/jenkins_home/userContent/job_dsl_additional_classpath/”
  • Install the Active Choices plugin from Manage Jenkins (You will probably need to restart Jenkins)
  • Add your Jenkins private key (used to connect to Gitlab) as a secret file type credential with the ID adop-jenkins-private. This can be done in Credentials section.
  • Create a new Workspace and a new project (which should also have a new parameter), and you should have a new Load_Cartridge job ready to go!
    • Note: If there is nothing in drop-down menu, go in to Configure Job and just save it.

After all the steps, the Load_Cartridge job should look something like this -

Updated Load Cartridge job


More info: