<commit_before>#!/bin/bash

# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

export ENVOY_HOME=/home

export PIPELINE_TEST="true"

export APIGEE_REMOTE_SRVC_CLI_VERSION=2.0.5
export APIGEE_REMOTE_SRVC_ENVOY_VERSION=2.0.5

printf "Running edge envoy cleanup"
./aekitctl.sh --type standalone-apigee-envoy --action delete --platform edge

printf "Running edge envoy setup"
./aekitctl.sh --type standalone-apigee-envoy --action install --platform edge

printf "Running edge envoy cleanup"
./aekitctl.sh --type standalone-apigee-envoy --action delete --platform edge

export APIGEE_PROJECT_ID="$APIGEE_X_ORG"
TOKEN=$(gcloud auth print-access-token);
export TOKEN

printf "Running X envoy cleanup"
./aekitctl.sh --type standalone-apigee-envoy --action delete

printf "Running X envoy setup"
./aekitctl.sh --type standalone-apigee-envoy --action install

printf "Running X envoy cleanup"
./aekitctl.sh --type standalone-apigee-envoy --action delete
<commit_msg>checking for x hostname with protocol prefixed<commit_after>#!/bin/bash

# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

export ENVOY_HOME=/home

export PIPELINE_TEST="true"

export APIGEE_REMOTE_SRVC_CLI_VERSION=2.0.5
export APIGEE_REMOTE_SRVC_ENVOY_VERSION=2.0.5

if [[ "$APIGEE_X_HOSTNAME" == http* ]]; then
    echo "Runtime hostname value correctly set";
else
    APIGEE_X_HOSTNAME="https://$APIGEE_X_HOSTNAME";
fi

printf "Running edge envoy cleanup"
./aekitctl.sh --type standalone-apigee-envoy --action delete --platform edge

printf "Running edge envoy setup"
./aekitctl.sh --type standalone-apigee-envoy --action install --platform edge

printf "Running edge envoy cleanup"
./aekitctl.sh --type standalone-apigee-envoy --action delete --platform edge

export APIGEE_PROJECT_ID="$APIGEE_X_ORG"
TOKEN=$(gcloud auth print-access-token);
export TOKEN

printf "Running X envoy cleanup"
./aekitctl.sh --type standalone-apigee-envoy --action delete

printf "Running X envoy setup"
./aekitctl.sh --type standalone-apigee-envoy --action install

printf "Running X envoy cleanup"
./aekitctl.sh --type standalone-apigee-envoy --action delete

{'fraction_non_alphanumeric': 0.09475679090334807, 'fraction_numerical': 0.008843967150979154, 'mean_word_length': 4.367796610169491, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, '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': '5551752', 'n_tokens_mistral': 1018, 'n_tokens_neox': 982, 'n_words': 351}