Hello Folks,
I am facing issue while trying to import updated service to DEV to PROD. it is not getting updated version , however if i delete the old service and try to Import the same , i am getting the latest version. Business case required zero downtime while updating the service.
I am using below import and export scripts:
Import.sh to import services to higher Env.
# Change me to target a particular environment!
TARGET_ENV=PROD
#
####################
# Functions
echo
echo "Usage:"
echo
echo "./import.sh <Interface>.<Int or Ext>.<ServiceName> [--deactivate true]"
echo
echo "Examples:"
echo " ./import.sh I160502.Int.ProxyOrdersPolicy"
echo " ./import.sh I160502.Int.ProxyOrdersPolicy --deactivate true"
echo
exit 1
esac
#
####################
# Check out from Git
####################
TARGET_FILE=$TARGET_ENV/$INTEXT/Service/$SHORTN
#
git pull origin master
#
####################
# Call the GMU to import policy
####################
echo "About to import Policy into the Gateway."
echo "Press any key to continue..."
Pause
echo "Importing Service Policy from $TARGET_FILE Writing output to results.xml"
/opt/SecureSpan/gmu/GatewayMigrationUtility.sh migrateIn --argFile /opt/SecureSpan/gmu/commonargs.props --bundle $TARGET_FILE.xml --template $TARGET_FILE.properties --results results.xml --destFolder /$INTEXT $2 $3
export.sh used to export service from lower env UAT.
# Change me to target a particular environment!
TARGET_ENV=ACC
#
echo
echo "Usage:"
echo
echo "./export.sh <Interface>.<Int or Ext>.<ServiceName>"
echo
echo "Example: ./export.sh I160502.Int.ProxyOrdersPolicy"
echo
exit 1
esac
#
####################
# Call the GMU to export policy and extract the template values
####################
TARGET_FILE=$TARGET_ENV/$INTEXT/Service/$SHORTN
#
echo "Exporting Service Policy $SHORTN to $TARGET_FILE.xml"
/opt/SecureSpan/gmu/GatewayMigrationUtility.sh migrateOut --argFile /opt/SecureSpan/gmu/commonargs.props --serviceName "/$INTEXT/$SHORTN" --dest $TARGET_FILE.xml --action NewOrUpdate
#
echo "Managing Mappings for Service Policy $TARGET_FILE.xml"
/opt/SecureSpan/gmu/GatewayMigrationUtility.sh manageMappings --argFile /opt/SecureSpan/gmu/commonargs.props --bundle $TARGET_FILE.xml --type ID_PROVIDER_CONFIG -N --type service --action NewOrUpdate
#
echo "Templating Service Policy $TARGET_FILE.xml to $TARGET_FILE.properties"
/opt/SecureSpan/gmu/GatewayMigrationUtility.sh template --argFile /opt/SecureSpan/gmu/commonargs.props --bundle $TARGET_FILE.xml --template $TARGET_FILE.properties
#
####################
# Check into Git
####################
echo "About to check in to Git."
echo "Press any key to continue..."
Pause
git add $TARGET_FILE.xml
git add $TARGET_FILE.properties
git commit -m "$SHORTN"
git push origin master