<commit_before>#!/usr/bin/env bash

set -e

source bosh-cpi-release/ci/tasks/utils.sh

ensure_not_replace_value dns
ensure_not_replace_value v3_e2e_flavor
ensure_not_replace_value v3_e2e_connection_timeout
ensure_not_replace_value v3_e2e_read_timeout
ensure_not_replace_value v3_e2e_state_timeout
ensure_not_replace_value v3_e2e_write_timeout
ensure_not_replace_value v3_e2e_bosh_registry_port
ensure_not_replace_value v3_e2e_api_key
ensure_not_replace_value v3_e2e_auth_url
ensure_not_replace_value v3_e2e_default_key_name
ensure_not_replace_value v3_e2e_floating_ip
ensure_not_replace_value v3_e2e_manual_ip
ensure_not_replace_value v3_e2e_net_cidr
ensure_not_replace_value v3_e2e_net_gateway
ensure_not_replace_value v3_e2e_net_id
ensure_not_replace_value v3_e2e_security_group
ensure_not_replace_value v3_e2e_project
ensure_not_replace_value v3_e2e_domain
ensure_not_replace_value v3_e2e_username
ensure_not_replace_value v3_e2e_private_key_data
ensure_not_replace_value v3_e2e_blobstore_bucket
ensure_not_replace_value v3_e2e_blobstore_host
ensure_not_replace_value v3_e2e_blobstore_access_key
ensure_not_replace_value v3_e2e_blobstore_secret_key
optional_value bosh_openstack_ca_cert

source /etc/profile.d/chruby-with-ruby-2.1.2.sh

export BOSH_INIT_LOG_LEVEL=DEBUG

cpi_release_name="bosh-openstack-cpi"
deployment_dir="${PWD}/deployment"
manifest_filename="e2e-director-manifest.yml"
director_state_filename="e2e-director-manifest-state.json"
private_key=${deployment_dir}/e2e.pem

echo "setting up artifacts used in $manifest_filename"
cp ./bosh-cpi-dev-artifacts/release.tgz ${deployment_dir}/${cpi_release_name}.tgz
cp ./bosh-release/release.tgz ${deployment_dir}/bosh-release.tgz
cp ./stemcell/stemcell.tgz ${deployment_dir}/stemcell.tgz
cp ./director-state-file/${director_state_filename} ${deployment_dir}/${director_state_filename}

echo "${v3_e2e_private_key_data}" > ${private_key}
chmod go-r ${private_key}
eval $(ssh-agent)
ssh-add ${private_key}

#create director manifest as heredoc
cat > "${deployment_dir}/${manifest_filename}"<<EOF
---
name: bosh

releases:
  - name: bosh
    url: file://bosh-release.tgz
  - name: bosh-openstack-cpi
    url: file://bosh-openstack-cpi.tgz

networks:
  - name: private
    type: manual
    subnets:
      - range:    ${v3_e2e_net_cidr}
        gateway:  ${v3_e2e_net_gateway}
        dns:     ${dns}<commit_msg>Resolve versioned bosh-openstack-cpi release tgz<commit_after>#!/usr/bin/env bash

set -e

source bosh-cpi-release/ci/tasks/utils.sh

ensure_not_replace_value dns
ensure_not_replace_value v3_e2e_flavor
ensure_not_replace_value v3_e2e_connection_timeout
ensure_not_replace_value v3_e2e_read_timeout
ensure_not_replace_value v3_e2e_state_timeout
ensure_not_replace_value v3_e2e_write_timeout
ensure_not_replace_value v3_e2e_bosh_registry_port
ensure_not_replace_value v3_e2e_api_key
ensure_not_replace_value v3_e2e_auth_url
ensure_not_replace_value v3_e2e_default_key_name
ensure_not_replace_value v3_e2e_floating_ip
ensure_not_replace_value v3_e2e_manual_ip
ensure_not_replace_value v3_e2e_net_cidr
ensure_not_replace_value v3_e2e_net_gateway
ensure_not_replace_value v3_e2e_net_id
ensure_not_replace_value v3_e2e_security_group
ensure_not_replace_value v3_e2e_project
ensure_not_replace_value v3_e2e_domain
ensure_not_replace_value v3_e2e_username
ensure_not_replace_value v3_e2e_private_key_data
ensure_not_replace_value v3_e2e_blobstore_bucket
ensure_not_replace_value v3_e2e_blobstore_host
ensure_not_replace_value v3_e2e_blobstore_access_key
ensure_not_replace_value v3_e2e_blobstore_secret_key
optional_value bosh_openstack_ca_cert

source /etc/profile.d/chruby-with-ruby-2.1.2.sh

export BOSH_INIT_LOG_LEVEL=DEBUG

cpi_release_name="bosh-openstack-cpi"
deployment_dir="${PWD}/deployment"
manifest_filename="e2e-director-manifest.yml"
director_state_filename="e2e-director-manifest-state.json"
private_key=${deployment_dir}/e2e.pem

echo "setting up artifacts used in $manifest_filename"
cp ./bosh-cpi-dev-artifacts/${cpi_release_name}-*.tgz ${deployment_dir}/${cpi_release_name}.tgz
cp ./bosh-release/release.tgz ${deployment_dir}/bosh-release.tgz
cp ./stemcell/stemcell.tgz ${deployment_dir}/stemcell.tgz
cp ./director-state-file/${director_state_filename} ${deployment_dir}/${director_state_filename}

echo "${v3_e2e_private_key_data}" > ${private_key}
chmod go-r ${private_key}
eval $(ssh-agent)
ssh-add ${private_key}

#create director manifest as heredoc
cat > "${deployment_dir}/${manifest_filename}"<<EOF
---
name: bosh

releases:
  - name: bosh
    url: file://bosh-release.tgz
  - name: bosh-openstack-cpi
    url: file://bosh-openstack-cpi.tgz

networks:
  - name: private
    type: manual
    subnets:
      - range:    ${v3_e2e_net_cidr}
        gateway:  ${v3_e2e_net_gateway}
        dns:     ${dns}
{'fraction_non_alphanumeric': 0.07913969513468365, 'fraction_numerical': 0.024222175819586553, 'mean_word_length': 7.553571428571429, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1760467', 'n_tokens_mistral': 1944, 'n_tokens_neox': 1878, 'n_words': 251}