diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh index 97d33d6d..d6857504 100644 --- a/scripts/docker-entrypoint.sh +++ b/scripts/docker-entrypoint.sh @@ -316,6 +316,14 @@ else echo "No web.xml was specified in ${web_xml}. Using defaults." fi +# +# Adding snippet to web.xml +# +if [ -n "$WEB_XML_SNIPPET" ]; then + echo "Inserting WEB_XML_SNIPPET into web.xml"; + awk -v var="$WEB_XML_SNIPPET" '/<\/web-app>/ {print var;} 1' ${PEGA_DEPLOYMENT_DIR}/WEB-INF/web.xml > /tmp/web.xml && mv /tmp/web.xml ${PEGA_DEPLOYMENT_DIR}/WEB-INF/web.xml +fi + # # Copying mounted catalina.properties file to conf # diff --git a/tests/pega-web-ready-testcases.yaml b/tests/pega-web-ready-testcases.yaml index 72dce883..56578e19 100755 --- a/tests/pega-web-ready-testcases.yaml +++ b/tests/pega-web-ready-testcases.yaml @@ -1231,6 +1231,100 @@ commandTests: exitCode: 0 excludedOutput: ["prweb.xml is not dockerized properly"] +# Dockerize prweb.xml check with WEB_XML_SNIPPET + - name: "Dockerize PRWEB Check with WEB_XML_SNIPPET" + envVars: + - key: "JDBC_URL" + value: "jdbc:postgresql://localhost:5432/pegadb" + - key: "JDBC_CLASS" + value: "org.postgresql.Driver" + - key: "DB_USERNAME" + value: "postgres" + - key: "DB_PASSWORD" + value: "postgres" + - key: "PEGA_SEARCH_TYPE" + value: "external" + - key: "PEGA_SEARCH_URL" + value: "http://pega-search" + - key: "PEGA_STREAM_URL" + value: "http://pega-stream" + - key: "CASSANDRA_CLUSTER" + value: "true" + - key: "HZ_CLIENT_MODE" + value: "true" + - key: "HZ_CS_AUTH_USERNAME" + value: "hzusername" + - key: "HZ_CS_AUTH_PASSWORD" + value: "hzpassword" + - key: "CASSANDRA_CLIENT_ENCRYPTION" + value: "true" + - key: "CASSANDRA_CLIENT_ENCRYPTION_STORE_TYPE" + value: "JKS" + - key: "CASSANDRA_TRUSTSTORE" + value: "/fake/path" + - key: "CASSANDRA_ASYNC_PROCESSING_ENABLED" + value: "true" + - key: "CASSANDRA_KEYSPACES_PREFIX" + value: "fake_prefix" + - key: "CASSANDRA_EXTENDED_TOKEN_AWARE_POLICY" + value: "true" + - key: "CASSANDRA_LATENCY_AWARE_POLICY" + value: "true" + - key: "CASSANDRA_CUSTOM_RETRY_POLICY" + value: "true" + - key: "CASSANDRA_CUSTOM_RETRY_POLICY_ENABLED" + value: "false" + - key: "CASSANDRA_CUSTOM_RETRY_POLICY_COUNT" + value: "2" + - key: "CASSANDRA_SPECULATIVE_EXECUTION_POLICY" + value: "true" + - key: "CASSANDRA_SPECULATIVE_EXECUTION_POLICY_ENABLED" + value: "false" + - key: "CASSANDRA_SPECULATIVE_EXECUTION_DELAY" + value: "50" + - key: "CASSANDRA_SPECULATIVE_EXECUTION_MAX_EXECUTIONS" + value: "2" + - key: "CASSANDRA_CSV_METRICS_ENABLED" + value: "true" + - key: "CASSANDRA_LOG_METRICS_ENABLED" + value: "true" + - key: "EXTERNAL_STREAM" + value: "true" + - key: "SERVICES_STREAM_PROVIDER" + value: "KafkaService" + - key: "STREAM_BOOTSTRAP_SERVERS" + value: "host:9092" + - key: "STREAM_SECURITY_PROTOCOL" + value: "PLAIN" + - key: "STREAM_SASL_MECHANISM" + value: "PLAIN" + - key: "STREAM_TRUSTSTORE" + value: "truststore.jks" + - key: "STREAM_TRUSTSTORE_TYPE" + value: "jks" + - key: "STREAM_KEYSTORE" + value: "keystore.jks" + - key: "STREAM_KEYSTORE_TYPE" + value: "jks" + - key: "STREAM_TRUSTSTORE_PASSWORD" + value: "fake password" + - key: "STREAM_KEYSTORE_PASSWORD" + value: "fake password" + - key: "STREAM_JAAS_CONFIG" + value: "fake config" + - key: "STREAM_NAME_PATTERN" + value: "pega-{stream.name}" + - key: "STREAM_REPLICATION_FACTOR" + value: "1" + command: "bash" + args: + - -c + - | + bash -c './scripts/docker-entrypoint.sh' && + grep -zoc "javax.jms.QueueConnectionFactory[[:space:]]*" /usr/local/tomcat/webapps/prweb/WEB-INF/web.xml + exitCode: 0 + excludedOutput: ["prweb.xml is not dockerized properly"] + # Dockerize prweb.xml check when SSL is enabled for Hazelcast - name: "Dockerize PRWEB Check with HZ SSL" envVars: