Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US-613462 Support adding WEB_XML_SNIPPET #224

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
94 changes: 94 additions & 0 deletions tests/pega-web-ready-testcases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<resource-env-ref-type>javax.jms.QueueConnectionFactory</resource-env-ref-type>[[:space:]]*</web-app>" /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:
Expand Down
Loading