--------------------------------------------------------
--  DDL for Function FNC_GET_JENKINS_LOG_URL
--------------------------------------------------------

  CREATE OR REPLACE EDITIONABLE FUNCTION "ENVX_OPER"."FNC_GET_JENKINS_LOG_URL" (
    --pi_id_request          IN  NUMBER,
    pi_id_prc_exec_deploy IN VARCHAR2
) RETURN VARCHAR2 AS
    url VARCHAR2(4000);
BEGIN 

    --IF pi_id_request JENKINS_PRIMARY_URL

    url := pkg_sicd_commons.get_parameter_value('JENKINS_PRIMARY_PUBLIC_URL')
           || pkg_sicd_commons.get_parameter_value('JENKINS_LOG_JOB')
           || replace(substr(pi_id_prc_exec_deploy, 9), '-', '/')
           || pkg_sicd_commons.get_parameter_value('JENKINS_LOG_CONSOLE');

    --ELSE
     /* url :=   pkg_sicd_commons.get_parameter_value('JENKINS_SECONDARY_URL')
              || pkg_sicd_commons.get_parameter_value('JENKINS_LOG_JOB')
                || replace(substr(ed.id_dep_proc, 9), '-', '/')
                || pkg_sicd_commons.get_parameter_value('JENKINS_LOG_CONSOLE')
                ;
                 */

    RETURN url;
END fnc_get_jenkins_log_url;


/
