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

Update integration tests to use 'deployment_name' #242

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
DEPLOYMENT_NAME: "{{ deployment_name }}"
NETWORK: "{{ network }}"
args:
creates: "{{ workspace }}/{{ blueprint_dir }}.tgz"
creates: "{{ workspace }}/{{ deployment_name }}.tgz"
- name: Create Infrastructure and test
block:
- name: Create Cluster with Terraform
command:
cmd: "{{ item }}"
chdir: "{{ workspace }}/{{ blueprint_dir }}/primary"
chdir: "{{ workspace }}/{{ deployment_name }}/primary"
args:
creates: "{{ workspace }}/{{ blueprint_dir }}/.terraform"
creates: "{{ workspace }}/{{ deployment_name }}/.terraform"
environment:
TF_IN_AUTOMATION: "TRUE"
with_items:
Expand Down Expand Up @@ -117,7 +117,7 @@
TF_IN_AUTOMATION: "TRUE"
command:
cmd: terraform destroy -auto-approve
chdir: "{{ workspace }}/{{ blueprint_dir }}/primary"
chdir: "{{ workspace }}/{{ deployment_name }}/primary"
- name: Fail Out
fail:
msg: "Failed while setting up test infrastructure"
Expand Down Expand Up @@ -166,4 +166,4 @@
TF_IN_AUTOMATION: "TRUE"
command:
cmd: terraform destroy -auto-approve
chdir: "{{ workspace }}/{{ blueprint_dir }}/primary"
chdir: "{{ workspace }}/{{ deployment_name }}/primary"
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
BLUEPRINT_DIR: "{{ blueprint_dir }}"
DEPLOYMENT_NAME: "{{ deployment_name }}"
args:
creates: "{{ workspace }}/{{ blueprint_dir }}.tgz"
creates: "{{ workspace }}/{{ deployment_name }}.tgz"
- name: Create Infrastructure and test
block:
- name: Create Network with Terraform
command:
cmd: "{{ item }}"
chdir: "{{ workspace }}/{{ blueprint_dir }}/builder-env"
chdir: "{{ workspace }}/{{ deployment_name }}/builder-env"
args:
creates: "{{ workspace }}/{{ blueprint_dir }}/.terraform"
creates: "{{ workspace }}/{{ deployment_name }}/.terraform"
environment:
TF_IN_AUTOMATION: "TRUE"
with_items:
Expand All @@ -47,7 +47,7 @@
- name: Create VM image with Packer
command:
cmd: "{{ item }}"
chdir: "{{ workspace }}/{{ blueprint_dir }}/packer/custom-image"
chdir: "{{ workspace }}/{{ deployment_name }}/packer/custom-image"
with_items:
- packer init .
- packer validate .
Expand All @@ -56,7 +56,7 @@
ansible.builtin.shell: |
gcloud compute images delete --project={{ project }} --quiet $(jq -r '.builds[-1].artifact_id' packer-manifest.json | cut -d ":" -f2)
args:
chdir: "{{ workspace }}/{{ blueprint_dir }}/packer/custom-image"
chdir: "{{ workspace }}/{{ deployment_name }}/packer/custom-image"
## Always cleanup network
always:
- name: Tear Down Network
Expand All @@ -66,4 +66,4 @@
TF_IN_AUTOMATION: "TRUE"
command:
cmd: terraform destroy -auto-approve -no-color
chdir: "{{ workspace }}/{{ blueprint_dir }}/builder-env"
chdir: "{{ workspace }}/{{ deployment_name }}/builder-env"
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
DEPLOYMENT_NAME: "{{ deployment_name }}"
NETWORK: "{{ network }}"
args:
creates: "{{ workspace }}/{{ blueprint_dir }}.tgz"
creates: "{{ workspace }}/{{ deployment_name }}.tgz"
- name: Create Infrastructure and test
block:
- name: Create Cluster with Terraform
command:
cmd: "{{ item }}"
chdir: "{{ workspace }}/{{ blueprint_dir }}/primary"
chdir: "{{ workspace }}/{{ deployment_name }}/primary"
args:
creates: "{{ workspace }}/{{ blueprint_dir }}/.terraform"
creates: "{{ workspace }}/{{ deployment_name }}/.terraform"
environment:
TF_IN_AUTOMATION: "TRUE"
with_items:
Expand Down Expand Up @@ -123,7 +123,7 @@
TF_IN_AUTOMATION: "TRUE"
command:
cmd: terraform destroy -auto-approve
chdir: "{{ workspace }}/{{ blueprint_dir }}/primary"
chdir: "{{ workspace }}/{{ deployment_name }}/primary"
- name: Fail Out
fail:
msg: "Failed while setting up test infrastructure"
Expand Down Expand Up @@ -187,4 +187,4 @@
TF_IN_AUTOMATION: "TRUE"
command:
cmd: terraform destroy -auto-approve
chdir: "{{ workspace }}/{{ blueprint_dir }}/primary"
chdir: "{{ workspace }}/{{ deployment_name }}/primary"
2 changes: 1 addition & 1 deletion tools/cloud-build/daily-tests/create_blueprint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ sed -i "s/max_node_count: .*/max_node_count: ${MAX_NODES}/" "${EXAMPLE_YAML}" ||
echo "could not write blueprint"
exit 1
}
tar -czf "${BLUEPRINT_DIR}.tgz" "${BLUEPRINT_DIR}" ||
tar -czf "${DEPLOYMENT_NAME}.tgz" "${DEPLOYMENT_NAME}" ||
{
echo "could not tarball blueprint"
exit 1
Expand Down