<commit_before>#!/bin/bash

set -eu -o pipefail

PAAS_CF_DIR=${PAAS_CF_DIR:-paas-cf}
WORKDIR=${WORKDIR:-.}

datadog_opsfile=${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/noop.yml
if [ "${ENABLE_DATADOG}" = "true" ] ; then
  datadog_opsfile="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/090-datadog-nozzle.yml"
fi

oauth_opsfile=${PAAS_CF_DIR}/manifests/cf-manifest//manifest/operations/noop.yml
if [ "${DISABLE_USER_CREATION}" = "false" ] ; then
   oauth_opsfile="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/100-oauth.yml"
fi

bosh interpolate \
  --var-file ipsec_ca.private_key="${WORKDIR}/ipsec-CA/ipsec-CA.key" \
  --var-file ipsec_ca.certificate="${WORKDIR}/ipsec-CA/ipsec-CA.crt" \
  --vars-file="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/data/000-aws-rds-combined-ca-bundle-pem.yml" \
  --vars-file="${WORKDIR}/terraform-outputs/vpc.yml" \
  --vars-file="${WORKDIR}/terraform-outputs/bosh.yml" \
  --vars-file="${WORKDIR}/terraform-outputs/concourse.yml" \
  --vars-file="${WORKDIR}/terraform-outputs/cf.yml" \
  --vars-file="${WORKDIR}/cf-secrets/cf-secrets.yml" \
  --vars-file="${PAAS_CF_DIR}/manifests/variables.yml" \
  --vars-file="${PAAS_CF_DIR}/manifests/cf-manifest/static-ips-and-ports.yml" \
  --vars-file="${CF_ENV_SPECIFIC_MANIFEST}" \
  --vars-file="${WORKDIR}/environment-variables/environment-variables.yml" \
  --ops-file="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/010-cert-rotation.yml" \
  --ops-file="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/030-legacy-stemcells.yml" \
  --ops-file="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/040-graphite.yml" \
  --ops-file="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/050-rds-broker.yml" \
  --ops-file="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/060-cdn-broker.yml" \
  --ops-file="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/070-elasticache-broker.yml" \
  --ops-file="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/080-logsearch.yml" \
  --ops-file="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/200-paas-admin-uaa-client.yml" \
  --ops-file="${WORKDIR}/grafana-dashboards-opsfile/grafana-dashboards-opsfile.yml" \
  --ops-file="${WORKDIR}/vpc-peering-opsfile/vpc-peers.yml" \
  --ops-file="${datadog_opsfile}" \
  --ops-file="${oauth_opsfile}" \
  --ops-file="${PAAS_CF_DIR}/manifests/cf-manifest/manifest/operations/999-prune.yml" \
  "$@" \
  "${PAAS_CF_DIR}/manifests/cf-manifest/manifest/000-base-cf-deployment.yml"
<commit_msg>Use cf-deployment.yml for manifest generation<commit_after>#!/bin/bash

set -eu -o pipefail

PAAS_CF_DIR=${PAAS_CF_DIR:-paas-cf}
CF_DEPLOYMENT_DIR=${PAAS_CF_DIR}/manifests/cf-deployment
WORKDIR=${WORKDIR:-.}

datadog_opsfile=${PAAS_CF_DIR}/manifests/cf-manifest/operations/noop.yml
if [ "${ENABLE_DATADOG}" = "true" ] ; then
  datadog_opsfile="${PAAS_CF_DIR}/manifests/cf-manifest/operations/datadog-add-nozzle.yml"
fi

oauth_opsfile=${PAAS_CF_DIR}/manifests/cf-manifest/operations/noop.yml
if [ "${DISABLE_USER_CREATION}" = "false" ] ; then
   oauth_opsfile="${PAAS_CF_DIR}/manifests/cf-manifest/operations/uaa-add-google-oauth.yml"
fi

opsfile_args=""
for i in ${PAAS_CF_DIR}/manifests/cf-manifest/operations.d/*.yml; do
  opsfile_args="$opsfile_args -o $i"
done

# shellcheck disable=SC2086
bosh interpolate \
  --var-file ipsec_ca.private_key="${WORKDIR}/ipsec-CA/ipsec-CA.key" \
  --var-file ipsec_ca.certificate="${WORKDIR}/ipsec-CA/ipsec-CA.crt" \
  --vars-file="${PAAS_CF_DIR}/manifests/cf-manifest/data/000-aws-rds-combined-ca-bundle-pem.yml" \
  --vars-file="${WORKDIR}/terraform-outputs/vpc.yml" \
  --vars-file="${WORKDIR}/terraform-outputs/bosh.yml" \
  --vars-file="${WORKDIR}/terraform-outputs/concourse.yml" \
  --vars-file="${WORKDIR}/terraform-outputs/cf.yml" \
  --vars-file="${WORKDIR}/cf-secrets/cf-secrets.yml" \
  --vars-file="${PAAS_CF_DIR}/manifests/variables.yml" \
  --vars-file="${PAAS_CF_DIR}/manifests/cf-manifest/static-ips-and-ports.yml" \
  --vars-file="${CF_ENV_SPECIFIC_MANIFEST}" \
  --vars-file="${WORKDIR}/environment-variables/environment-variables.yml" \
  --ops-file="${CF_DEPLOYMENT_DIR}/operations/rename-network.yml" \
  --ops-file="${CF_DEPLOYMENT_DIR}/operations/aws.yml" \
  --ops-file="${CF_DEPLOYMENT_DIR}/operations/use-s3-blobstore.yml" \
  --ops-file="${CF_DEPLOYMENT_DIR}/operations/use-external-dbs.yml" \
  --ops-file="${CF_DEPLOYMENT_DIR}/operations/stop-skipping-tls-validation.yml" \
  --ops-file="${CF_DEPLOYMENT_DIR}/operations/enable-uniq-consul-node-name.yml" \
  ${opsfile_args} \
  --ops-file="${WORKDIR}/grafana-dashboards-opsfile/grafana-dashboards-opsfile.yml" \
  --ops-file="${WORKDIR}/vpc-peering-opsfile/vpc-peers.yml" \
  --ops-file="${datadog_opsfile}" \
  --ops-file="${oauth_opsfile}" \
  "$@" \
  "${CF_DEPLOYMENT_DIR}/cf-deployment.yml"

{'fraction_non_alphanumeric': 0.2037037037037037, 'fraction_numerical': 0.009670781893004115, 'mean_word_length': 4.5873563218390805, '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': '973103', 'n_tokens_mistral': 2069, 'n_tokens_neox': 1908, 'n_words': 117}