From 5e23e24ae754a68cc722166c66d414777407e993 Mon Sep 17 00:00:00 2001 From: Allan Targino <13934447+allantargino@users.noreply.github.com> Date: Thu, 10 Sep 2020 11:40:32 -0300 Subject: [PATCH] Extra JMeter CLI commands variable (#48) * extra cli commands * Updating terraform version docs --- docs/jmeter-pipeline-settings.md | 8 ++++---- terraform/main.tf | 2 +- terraform/variables.tf | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/jmeter-pipeline-settings.md b/docs/jmeter-pipeline-settings.md index bc6e500..c6a7312 100644 --- a/docs/jmeter-pipeline-settings.md +++ b/docs/jmeter-pipeline-settings.md @@ -1,6 +1,6 @@ # JMeter Pipeline Settings -The pipeline uses Terraform 12.x to provision JMeter and its infrastructure on Azure. +The pipeline uses Terraform 0.13.x to provision JMeter and its infrastructure on Azure. All environment variables that start with the prefix `TF_VAR` can be used by Terraform to fill the template. According to the [official docs](https://www.terraform.io/docs/commands/environment-variables.html#tf_var_name): @@ -28,9 +28,9 @@ All the other variables can be set on a library group called `JMETER_TERRAFORM_S | TF_VAR_JMETER_CONTROLLER_MEMORY | JMETER_CONTROLLER_MEMORY | 8.0 | | TF_VAR_JMETER_DOCKER_IMAGE | JMETER_DOCKER_IMAGE | justb4/jmeter:5.1.1 | | TF_VAR_JMETER_DOCKER_PORT | JMETER_DOCKER_PORT | 1099 | -| TF_VAR_JMETER_IMAGE_REGISTRY_SERVER | JMETER_IMAGE_REGISTRY_SERVER | | -| TF_VAR_JMETER_IMAGE_REGISTRY_USERNAME | JMETER_IMAGE_REGISTRY_USERNAME | | -| TF_VAR_JMETER_IMAGE_REGISTRY_PASSWORD | JMETER_IMAGE_REGISTRY_PASSWORD | | +| TF_VAR_JMETER_ACR_NAME | JMETER_ACR_NAME | | +| TF_VAR_JMETER_ACR_RESOURCE_GROUP_NAME | JMETER_ACR_RESOURCE_GROUP_NAME | | | TF_VAR_JMETER_STORAGE_QUOTA_GIGABYTES | JMETER_STORAGE_QUOTA_GIGABYTES | 1 | | TF_VAR_JMETER_RESULTS_FILE | JMETER_RESULTS_FILE | results.jtl | | TF_VAR_JMETER_DASHBOARD_FOLDER | JMETER_DASHBOARD_FOLDER | dashboard | +| TF_VAR_JMETER_EXTRA_CLI_ARGUMENTS | JMETER_EXTRA_CLI_ARGUMENTS | | diff --git a/terraform/main.tf b/terraform/main.tf index 1540f69..326cfb0 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -158,7 +158,7 @@ resource "azurerm_container_group" "jmeter_controller" { commands = [ "/bin/sh", "-c", - "cd /jmeter; /entrypoint.sh -n -J server.rmi.ssl.disable=true -t ${var.JMETER_JMX_FILE} -l ${var.JMETER_RESULTS_FILE} -e -o ${var.JMETER_DASHBOARD_FOLDER} -R ${join(",", "${azurerm_container_group.jmeter_workers.*.ip_address}")}", + "cd /jmeter; /entrypoint.sh -n -J server.rmi.ssl.disable=true -t ${var.JMETER_JMX_FILE} -l ${var.JMETER_RESULTS_FILE} -e -o ${var.JMETER_DASHBOARD_FOLDER} -R ${join(",", "${azurerm_container_group.jmeter_workers.*.ip_address}")} ${var.JMETER_EXTRA_CLI_ARGUMENTS}", ] } } diff --git a/terraform/variables.tf b/terraform/variables.tf index 91a06d1..e11a79d 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -87,3 +87,8 @@ variable "JMETER_DASHBOARD_FOLDER" { type = string default = "dashboard" } + +variable "JMETER_EXTRA_CLI_ARGUMENTS" { + type = string + default = "" +}