зеркало из https://github.com/Azure/Avere.git
25 строки
849 B
YAML
25 строки
849 B
YAML
# Copyright (C) Microsoft Corporation. All rights reserved.
|
|
# https://aka.ms/yaml
|
|
parameters:
|
|
- name: original_node_count
|
|
type: string
|
|
- name: scale_up_node_count
|
|
type: string
|
|
- name: scale
|
|
type: string
|
|
values:
|
|
- "up"
|
|
- "down"
|
|
|
|
steps:
|
|
- script: |
|
|
set -e
|
|
cd src/terraform/examples/vfxt/${RUN_TERRAFORM_FILE}
|
|
export new_node_count=$(( ${{ parameters.original_node_count }} + ${{ parameters.scale_up_node_count }} ))
|
|
if [ "up" = "${{ parameters.scale }}" ]; then
|
|
sed -i "s/vfxt_node_count = ${{ parameters.original_node_count }}/vfxt_node_count = ${new_node_count}/" main.tf
|
|
elif [ "down" = "${{ parameters.scale }}" ]; then
|
|
sed -i "s/vfxt_node_count = ${new_node_count}/vfxt_node_count = ${{ parameters.original_node_count }}/" main.tf
|
|
fi
|
|
displayName: 'Terraform: setup scale ${{ parameters.scale }}'
|