<commit_before>#!/bin/bash

function removeSwidTag () {
        local swidtagToRemove=$1
        if [ -f $swidtagToRemove ]; then
                echo "remove $swidtagToRemove"
                rm $swidtagToRemove
        fi
}

function removeAllSwidTag () {
	local swidtagToRemove=$1
        removeSwidTag /config/apps/decisioncenter.war/META-INF/swidtag/$swidtagToRemove
        removeSwidTag /config/apps/decisionmodel.war/META-INF/swidtag/$swidtagToRemove
        removeSwidTag /config/apps/decisioncenter-api.war/META-INF/swidtag/$swidtagToRemove
        removeSwidTag /config/apps/teamserver.war/META-INF/swidtag/$swidtagToRemove

        removeSwidTag /config/apps/DecisionRunner.war/META-INF/swidtag/$swidtagToRemove
        removeSwidTag /config/apps/DecisionService.war/META-INF/swidtag/$swidtagToRemove
        removeSwidTag /config/apps/res.war/META-INF/swidtag/$swidtagToRemove
}

if [ -n "$KubeVersion" ]
then
  if [[ $KubeVersion =~ "icp" ]] || [[ $KubeVersion =~ "ODM on K8s" ]]
  then
    if [ -n "$DEPLOY_FOR_PRODUCTION" ]
    then
    	if [[ "$DEPLOY_FOR_PRODUCTION" =~ "TRUE" ]]
        then
        	echo "DEPLOY_FOR_PRODUCTION is true then ODM production configuration : remove ODM non production Swidtag"
        	removeAllSwidTag ibm.com_IBM_ODM_Server_for_Non-Production-*.swidtag
    	else
        	echo "DEPLOY_FOR_PRODUCTION is false then ODM non production configuration : remove ODM production Swidtag"
        	removeAllSwidTag ibm.com_IBM_ODM_Server-*.swidtag
    	fi
    else
      echo "DEPLOY_FOR_PRODUCTION not set then ODM production configuration : remove ODM non production Swidtag"
      removeAllSwidTag ibm.com_IBM_ODM_Server_for_Non-Production-*.swidtag
    fi
    echo "ODM configuration : remove all DBAMC Swidtag"
    removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4Auto*.swidtag
    removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4Auto*.swidtag
  else
    if [ -n "$DEPLOY_FOR_PRODUCTION" ]
    then
    	if [[ "$DEPLOY_FOR_PRODUCTION" =~ "TRUE" ]]
        then
        	echo "DEPLOY_FOR_PRODUCTION is true then DBAMC production configuration : remove DBAMC non production Swidtag"
        	removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4Auto_-_Non_Prod-*.swidtag
    	else
        	echo "DEPLOY_FOR_PRODUCTION is false then DBAMC non production configuration : remove DBAMC production Swidtag"
        	removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4Auto-*.swidtag
    	fi
    else
      echo "DEPLOY_FOR_PRODUCTION not set then DBAMC production configuration : remove DBAMC non production Swidtag"
    	removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4Auto_-_Non_Prod-*.swidtag
    fi
    echo "DBAMC configuration : remove all ODM Swidtag"
    removeAllSwidTag ibm.com_IBM_ODM_Server*.swidtag
    removeAllSwidTag ibm.com_IBM_ODM_Server*.swidtag
  fi
fi<commit_msg>pb with rm swidtag on OKD<commit_after>#!/bin/bash

function removeSwidTag () {
        local swidtagToRemove=$1
        if [ -f $swidtagToRemove ]; then
                echo "remove $swidtagToRemove"
                rm $swidtagToRemove
        fi
}

function removeAllSwidTag () {
	local swidtagToRemove=$1
        removeSwidTag /config/apps/decisioncenter.war/META-INF/swidtag/$swidtagToRemove
        removeSwidTag /config/apps/decisionmodel.war/META-INF/swidtag/$swidtagToRemove
        removeSwidTag /config/apps/decisioncenter-api.war/META-INF/swidtag/$swidtagToRemove
        removeSwidTag /config/apps/teamserver.war/META-INF/swidtag/$swidtagToRemove

        removeSwidTag /config/apps/DecisionRunner.war/META-INF/swidtag/$swidtagToRemove
        removeSwidTag /config/apps/DecisionService.war/META-INF/swidtag/$swidtagToRemove
        removeSwidTag /config/apps/res.war/META-INF/swidtag/$swidtagToRemove
}

if [ -n "$KubeVersion" ]
then
  if [[ $KubeVersion =~ "icp" ]] || [[ $KubeVersion =~ "ODM on K8s" ]]
  then
    if [ -n "$DEPLOY_FOR_PRODUCTION" ]
    then
    	if [[ "$DEPLOY_FOR_PRODUCTION" =~ "TRUE" ]]
        then
        	echo "DEPLOY_FOR_PRODUCTION is true then ODM production configuration : remove ODM non production Swidtag"
        	removeAllSwidTag ibm.com_IBM_ODM_Server_for_Non-Production-*.swidtag
    	else
        	echo "DEPLOY_FOR_PRODUCTION is false then ODM non production configuration : remove ODM production Swidtag"
        	removeAllSwidTag ibm.com_IBM_ODM_Server-*.swidtag
    	fi
    else
      echo "DEPLOY_FOR_PRODUCTION not set then ODM production configuration : remove ODM non production Swidtag"
      removeAllSwidTag ibm.com_IBM_ODM_Server_for_Non-Production-*.swidtag
    fi
    echo "ODM configuration : remove all DBAMC Swidtag"
    removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4Auto*.swidtag
    removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4Auto_-_Non_Prod*.swidtag
  else
    if [ -n "$DEPLOY_FOR_PRODUCTION" ]
    then
    	if [[ "$DEPLOY_FOR_PRODUCTION" =~ "TRUE" ]]
        then
        	echo "DEPLOY_FOR_PRODUCTION is true then DBAMC production configuration : remove DBAMC non production Swidtag"
        	removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4Auto_-_Non_Prod-*.swidtag
    	else
        	echo "DEPLOY_FOR_PRODUCTION is false then DBAMC non production configuration : remove DBAMC production Swidtag"
        	removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4Auto-*.swidtag
    	fi
    else
      echo "DEPLOY_FOR_PRODUCTION not set then DBAMC production configuration : remove DBAMC non production Swidtag"
    	removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4Auto_-_Non_Prod-*.swidtag
    fi
    echo "DBAMC configuration : remove all ODM Swidtag"
    removeAllSwidTag ibm.com_IBM_ODM_Server*.swidtag
    removeAllSwidTag ibm.com_IBM_ODM_Server_for_Non-Production*.swidtag
  fi
fi
{'fraction_non_alphanumeric': 0.07535641547861507, 'fraction_numerical': 0.0027155465037338763, 'mean_word_length': 3.589563862928349, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2115750', 'n_tokens_mistral': 2110, 'n_tokens_neox': 2026, 'n_words': 372}