plugins/jenkins/app/models/samson/jenkins.rb
def check_job_config
      conf = jenkins_job_config
      changes = {}
      expected_build_parameters = JENKINS_BUILD_PARAMETERS.keys
      present_build_params = build_params(conf).map(&:to_sym)
      missing_build_params = expected_build_parameters.to_set - present_build_params.to_set
      if missing_build_params.any?
        changes["build_params"] = missing_build_params
      end
      unless description_exists?(conf)
        changes['job_description'] = true
      end
      changes
    end
# we need to add new build parameters without manually changing each job's configuration in
# manually. To do this, we check if this job is mentioned in
# description of jenkins job. if not, we add it. We use JENKINS_DESC_HEADER/FOOTER markers
# to keep track of description added through samson.
we need to add new build parameters without manually changing each job's configuration in
manually. To do this, we check if this job is mentioned in
description of jenkins job. if not, we add it. We use JENKINS_DESC_HEADER/FOOTER markers
to keep track of description added through samson.
we need to add new build parameters without manually changing each job ' s configuration in manually . To do this we check if this job is mentioned in description of jenkins job . if not we add it . We use JENKINS_DESC_HEADER / FOOTER markers to keep track of description added through samson .
def check_job_config
      conf = jenkins_job_config
      changes = {}
      expected_build_parameters = JENKINS_BUILD_PARAMETERS.keys
      present_build_params = build_params(conf).map(&:to_sym)
      missing_build_params = expected_build_parameters.to_set - present_build_params.to_set
      if missing_build_params.any?
        changes["build_params"] = missing_build_params
      end
      unless description_exists?(conf)
        changes['job_description'] = true
      end
      changes
    end
def check_job_config conf = jenkins_job_config changes = { } expected_build_parameters = JENKINS_BUILD_PARAMETERS . keys present_build_params = build_params ( conf ) . map ( & :to_sym ) missing_build_params = expected_build_parameters . to_set - present_build_params . to_set if missing_build_params . any? changes [ "build_params" ] = missing_build_params end unless description_exists? ( conf ) changes [ 'job_description' ] = true end changes end
we need to add new build parameters without manually changing each job's configuration in
manually.
we need to add new build parameters without manually changing each job ' s configuration in manually .