From e7e4d2109a9bbc6cb9d3b76f0245a8b05f2f3458 Mon Sep 17 00:00:00 2001 From: wsiwecki <58573764+wsiwecki@users.noreply.github.com> Date: Mon, 5 Jun 2023 12:17:58 +0200 Subject: [PATCH 001/110] fill variables --- terraform/environments/test/terraform.tfvars | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 83a5d8dbc..347e8fb70 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,13 +1,13 @@ # Azure subscription vars -subscription_id = "" -client_id = "" -client_secret = "" -tenant_id = "" +subscription_id = "0ee6d06f-69ab-4b3b-9f35-003e1b6eb227" +client_id = "b1e6e530-f258-47c6-a5d0-3173516058c5" +client_secret = "NMH8Q~5D3SPPeWNA.~3Te1LYz1dYRpQay87.Wauc" +tenant_id = "f958e84a-92b8-439f-a62d-4f45996b6d07" # Resource Group/Location -location = "" -resource_group_name = "" -application_type = "" +location = "East US" +resource_group_name = "Azuredevops" +application_type = "myApplication" # Network virtual_network_name = "" From 8599c384cf21c9f9c3b37380622b6d1e56266281 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 5 Jun 2023 16:10:02 +0200 Subject: [PATCH 002/110] set up variables --- terraform/environments/test/main.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/terraform/environments/test/main.tf b/terraform/environments/test/main.tf index 5d94eaaaf..015c5ab52 100644 --- a/terraform/environments/test/main.tf +++ b/terraform/environments/test/main.tf @@ -7,10 +7,10 @@ provider "azurerm" { } terraform { backend "azurerm" { - storage_account_name = "" - container_name = "" - key = "" - access_key = "" + storage_account_name = "tfstate563623564" + container_name = "tfstate" + key = "test.terraform.tfstate" + access_key = "lA3HgucWtfvrnvSU20PMwNlGYvWVuBY4UMvTREj23CakUW5KHn/Wch0TUnPQXbNDkX0wjjo3Ndn2+AStRlhpiQ==" } } module "resource_group" { From bf93c2092e1da104a3dd5d28993978f3cc215b16 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 5 Jun 2023 16:32:24 +0200 Subject: [PATCH 003/110] update vars --- .../environments/test/.terraform.lock.hcl | 21 ++++++++++++++ .../configure-tfstate-storage-account.sh_OLD | 23 +++++++++++++++ terraform/modules/vm/input.tf | 29 +++++++++++++++++++ terraform/modules/vm/vm.tf | 20 ++++++------- 4 files changed, 83 insertions(+), 10 deletions(-) create mode 100644 terraform/environments/test/.terraform.lock.hcl create mode 100644 terraform/environments/test/configure-tfstate-storage-account.sh_OLD diff --git a/terraform/environments/test/.terraform.lock.hcl b/terraform/environments/test/.terraform.lock.hcl new file mode 100644 index 000000000..654de8e19 --- /dev/null +++ b/terraform/environments/test/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "3.59.0" + hashes = [ + "h1:2mtKoi0qwKVdZGIhbWNslorQBZEMVdih/3Gtqq6nvug=", + "zh:07a560ad97faa351fcc484badfa796a5513dd7065cd4cc125f47b1baf1183624", + "zh:40733759271d2a0f9872c68c2fa1ebdde4e9fbdc661968d94ceb7d4670f5f751", + "zh:412f7cdc0fb0128439b30d0e5b2e451ae38cda2dbe05cf143923b5d4f1f9f685", + "zh:6fa63d7ca8dcef9a493345bc38f1c8481457072e5e2b2b04ee060ea306ff8ce6", + "zh:805bfa2a0c2260cfda804138efcdd5aca3d0b18e3c526d5c040636bac2a8a2c9", + "zh:81a3a673ee92e33425bad755740521e8e29d7a6191022689a45947fbaf5b5988", + "zh:91e06ef4f91dfa176be05e6cdbc454db895d852a821868ff6b99a5e2eaa5a091", + "zh:c1d58a5c490081486fbb9130dac1b134e935c0c839fe26bebe2f6c79f552fe17", + "zh:cbb7fc281bd2f03910a01888787ec51f7182a334112c89bd876063dd3396dfd3", + "zh:e29542d422c5fb248bfddcc70ef2c9c73c8d9e9a2e21be2b45aec91d008b0953", + "zh:f0d3122be5287f48b5c4c2dc991d51b2f8dcdeedb5b88844fa8e3e6b14a7dfe9", + "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + ] +} diff --git a/terraform/environments/test/configure-tfstate-storage-account.sh_OLD b/terraform/environments/test/configure-tfstate-storage-account.sh_OLD new file mode 100644 index 000000000..ada7fa330 --- /dev/null +++ b/terraform/environments/test/configure-tfstate-storage-account.sh_OLD @@ -0,0 +1,23 @@ +#!/bin/bash +RESOURCE_GROUP_NAME="Azuredevops" +STORAGE_ACCOUNT_NAME="tfstate$RANDOM$RANDOM" +CONTAINER_NAME="tfstate" + +# This command is not needed in the Udacity provided Azure account. +# Create resource group +# az group create --name $RESOURCE_GROUP_NAME --location eastus + +# Create storage account +az storage account create --resource-group $RESOURCE_GROUP_NAME --name $STORAGE_ACCOUNT_NAME --sku Standard_LRS --encryption-services blob + +# Get storage account key +ACCOUNT_KEY=$(az storage account keys list --resource-group $RESOURCE_GROUP_NAME --account-name $STORAGE_ACCOUNT_NAME --query '[0].value' -o tsv) +export ARM_ACCESS_KEY=$ACCOUNT_KEY + +# Create blob container +az storage container create --name $CONTAINER_NAME --account-name $STORAGE_ACCOUNT_NAME --account-key $ACCOUNT_KEY +echo "RESOURCE_GROUP_NAME=$RESOURCE_GROUP_NAME" +echo "STORAGE_ACCOUNT_NAME=$STORAGE_ACCOUNT_NAME" +echo "CONTAINER_NAME=$CONTAINER_NAME" +echo "ACCOUNT_KEY=$ACCOUNT_KEY" + diff --git a/terraform/modules/vm/input.tf b/terraform/modules/vm/input.tf index 8b1378917..e30fc0e26 100644 --- a/terraform/modules/vm/input.tf +++ b/terraform/modules/vm/input.tf @@ -1 +1,30 @@ +variable "rg_name" { + default = "Azuredevops" + description = "Name of the resource group." +} + +variable "rg_location" { + default = "eastus" + description = "Location of the resource group." +} + +variable "admin_username" { + default = "adminuser" + description = "Location of the resource group." +} + +variable "vm_name" { + default = "myVM" + description = "Location of the resource group." +} + +variable "nic_name" { + default = "myNetworkInterface" + description = "Location of the resource group." +} + +variable "rg_prefix" { + default = "myRg" + description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription." +} diff --git a/terraform/modules/vm/vm.tf b/terraform/modules/vm/vm.tf index 24da93338..2bab14354 100644 --- a/terraform/modules/vm/vm.tf +++ b/terraform/modules/vm/vm.tf @@ -1,25 +1,25 @@ resource "azurerm_network_interface" "" { - name = "" - location = "" - resource_group_name = "" + name = "${var.nic_name}" + location = "${var.rg_location}" + resource_group_name = "${var.rg_name}" ip_configuration { name = "internal" - subnet_id = "" + subnet_id = "azurerm_subnet".subnet_id private_ip_address_allocation = "Dynamic" - public_ip_address_id = "" + public_ip_address_id = "".public_ip_address_id } } resource "azurerm_linux_virtual_machine" "" { - name = "" - location = "" - resource_group_name = "" + name = "${var.vm_name}" + location = "${var.rg_location}" + resource_group_name = "${var.rg_name}" size = "Standard_DS2_v2" - admin_username = "" + admin_username = "${var.admin_username}" network_interface_ids = [] admin_ssh_key { - username = "" + username = "adminuser" public_key = "file("~/.ssh/id_rsa.pub")" } os_disk { From 4e49189fc6d0643a87449370d949ce4def43a5ca Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 12 Jun 2023 16:26:50 +0200 Subject: [PATCH 004/110] correct VM definition --- terraform/environments/test/terraform.tfvars | 12 ++++--- terraform/modules/vm/input.tf | 33 ++++++-------------- 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 347e8fb70..ee691f802 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,15 +1,17 @@ # Azure subscription vars -subscription_id = "0ee6d06f-69ab-4b3b-9f35-003e1b6eb227" -client_id = "b1e6e530-f258-47c6-a5d0-3173516058c5" -client_secret = "NMH8Q~5D3SPPeWNA.~3Te1LYz1dYRpQay87.Wauc" +subscription_id = "a3a536c2-3690-4c5f-8032-998a8dc3234e" +client_id = "e5a26397-e26b-49a6-af6a-8a9501bbbb35" +client_secret = "ZVq8Q~WVCTKU~u7dLwXr1-hSlT.OZ-~6o7P9zbid" tenant_id = "f958e84a-92b8-439f-a62d-4f45996b6d07" # Resource Group/Location -location = "East US" +location = "West Europe" resource_group_name = "Azuredevops" +resource_group = "Azuredevops" application_type = "myApplication" # Network -virtual_network_name = "" +virtual_network_name = "myVNet" address_space = ["10.5.0.0/16"] +address_prefixes_test = ["10.5.1.0/24"] address_prefix_test = "10.5.1.0/24" diff --git a/terraform/modules/vm/input.tf b/terraform/modules/vm/input.tf index e30fc0e26..b3a25f35b 100644 --- a/terraform/modules/vm/input.tf +++ b/terraform/modules/vm/input.tf @@ -1,30 +1,17 @@ -variable "rg_name" { - default = "Azuredevops" - description = "Name of the resource group." +variable "location" { + default = "westeurope" } - -variable "rg_location" { - default = "eastus" - description = "Location of the resource group." +variable "application_type" { + default = "myApplication" } - -variable "admin_username" { - default = "adminuser" - description = "Location of the resource group." +variable "resource_type" { + default = "VM" } - -variable "vm_name" { - default = "myVM" - description = "Location of the resource group." -} - -variable "nic_name" { - default = "myNetworkInterface" - description = "Location of the resource group." +variable "resource_group" { + default = "Azuredevops" } -variable "rg_prefix" { - default = "myRg" - description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription." +variable "resource_group" { + default = "Azuredevops" } From 9efca381a12edefc384b3609854e0de951ca47ac Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 12 Jun 2023 16:27:10 +0200 Subject: [PATCH 005/110] correct VM definition --- terraform/environments/test/input.tf | 2 + terraform/environments/test/main.tf | 35 +++++++++++------ terraform/modules/network/input.tf | 1 + terraform/modules/network/network.tf | 4 +- terraform/modules/publicip/publicip.tf | 1 - terraform/modules/vm/vm.tf | 54 ++++++++++++++++++-------- 6 files changed, 67 insertions(+), 30 deletions(-) diff --git a/terraform/environments/test/input.tf b/terraform/environments/test/input.tf index 071bc0ea6..c0f8084e4 100644 --- a/terraform/environments/test/input.tf +++ b/terraform/environments/test/input.tf @@ -7,10 +7,12 @@ variable "tenant_id" {} # Resource Group/Location variable "location" {} variable "resource_group" {} +variable "resource_group_name" {} variable "application_type" {} # Network variable virtual_network_name {} variable address_prefix_test {} +variable address_prefixes_test {} variable address_space {} diff --git a/terraform/environments/test/main.tf b/terraform/environments/test/main.tf index 015c5ab52..9395ac568 100644 --- a/terraform/environments/test/main.tf +++ b/terraform/environments/test/main.tf @@ -7,17 +7,19 @@ provider "azurerm" { } terraform { backend "azurerm" { - storage_account_name = "tfstate563623564" + storage_account_name = "tfstate426527877" container_name = "tfstate" key = "test.terraform.tfstate" - access_key = "lA3HgucWtfvrnvSU20PMwNlGYvWVuBY4UMvTREj23CakUW5KHn/Wch0TUnPQXbNDkX0wjjo3Ndn2+AStRlhpiQ==" + access_key = "ROdCrFJnrft4qVy/IhMuRRkDtgQJMkW8NzczqKnR70AXXtONygwvrynr5FFqmYAapYCmLQsjuRBL+AStILvaKw==" } } -module "resource_group" { - source = "../../modules/resource_group" - resource_group = "${var.resource_group}" - location = "${var.location}" -} + +#module "resource_group" { +# source = "../../modules/resource_group" +# resource_group = "${var.resource_group}" +# location = "${var.location}" +#} + module "network" { source = "../../modules/network" address_space = "${var.address_space}" @@ -25,8 +27,10 @@ module "network" { virtual_network_name = "${var.virtual_network_name}" application_type = "${var.application_type}" resource_type = "NET" - resource_group = "${module.resource_group.resource_group_name}" +# resource_group = "${module.resource_group.resource_group_name}" + resource_group = "${var.resource_group}" address_prefix_test = "${var.address_prefix_test}" + address_prefixes_test = "${var.address_prefixes_test}" } module "nsg-test" { @@ -34,7 +38,8 @@ module "nsg-test" { location = "${var.location}" application_type = "${var.application_type}" resource_type = "NSG" - resource_group = "${module.resource_group.resource_group_name}" +# resource_group = "${module.resource_group.resource_group_name}" + resource_group = "${var.resource_group}" subnet_id = "${module.network.subnet_id_test}" address_prefix_test = "${var.address_prefix_test}" } @@ -43,12 +48,20 @@ module "appservice" { location = "${var.location}" application_type = "${var.application_type}" resource_type = "AppService" - resource_group = "${module.resource_group.resource_group_name}" + resource_group = "${var.resource_group}" +# resource_group = "${module.resource_group.resource_group_name}" } module "publicip" { source = "../../modules/publicip" location = "${var.location}" application_type = "${var.application_type}" resource_type = "publicip" - resource_group = "${module.resource_group.resource_group_name}" + resource_group = "${var.resource_group}" +} +module "vm" { + source = "../../modules/vm" +# location = "${var.location}" +# application_type = "${var.application_type}" +# resource_type = "VM" +# resource_group = "${var.resource_group}" } \ No newline at end of file diff --git a/terraform/modules/network/input.tf b/terraform/modules/network/input.tf index 4741f2330..edaaad113 100644 --- a/terraform/modules/network/input.tf +++ b/terraform/modules/network/input.tf @@ -7,4 +7,5 @@ variable address_space {} variable "application_type" {} variable "resource_type" {} variable "address_prefix_test" {} +variable "address_prefixes_test" {} diff --git a/terraform/modules/network/network.tf b/terraform/modules/network/network.tf index 391a92f58..04305a83d 100644 --- a/terraform/modules/network/network.tf +++ b/terraform/modules/network/network.tf @@ -8,5 +8,5 @@ resource "azurerm_subnet" "test" { name = "${var.application_type}-${var.resource_type}-sub" resource_group_name = "${var.resource_group}" virtual_network_name = "${azurerm_virtual_network.test.name}" - address_prefix = "${var.address_prefix_test}" -} + address_prefixes = "${var.address_prefixes_test}" +} \ No newline at end of file diff --git a/terraform/modules/publicip/publicip.tf b/terraform/modules/publicip/publicip.tf index 5c3a0eba3..036b429a9 100644 --- a/terraform/modules/publicip/publicip.tf +++ b/terraform/modules/publicip/publicip.tf @@ -3,5 +3,4 @@ resource "azurerm_public_ip" "test" { location = "${var.location}" resource_group_name = "${var.resource_group}" allocation_method = "Dynamic" - } \ No newline at end of file diff --git a/terraform/modules/vm/vm.tf b/terraform/modules/vm/vm.tf index 2bab14354..db9cd6b33 100644 --- a/terraform/modules/vm/vm.tf +++ b/terraform/modules/vm/vm.tf @@ -1,27 +1,49 @@ -resource "azurerm_network_interface" "" { - name = "${var.nic_name}" - location = "${var.rg_location}" - resource_group_name = "${var.rg_name}" +#data "azurerm_virtual_network" "test" { +# name = "${var.application_type}-NET" +# resource_group_name = "${var.resource_group}" +#} + +data "azurerm_subnet" "test"{ + name = "${var.application_type}-NET-sub" + virtual_network_name = "${var.application_type}-NET" + resource_group_name = "${var.resource_group}" +} + +data "azurerm_public_ip" "test"{ + name = "${var.application_type}-publicip-pubip" + resource_group_name = "${var.resource_group}" +} + +resource "azurerm_network_interface" "test" { + name = "${var.application_type}-${var.resource_type}" + location = "${var.location}" + resource_group_name = "${var.resource_group}" ip_configuration { name = "internal" - subnet_id = "azurerm_subnet".subnet_id + #subnet_id = "myApplication-NET" + subnet_id = data.azurerm_subnet.test.id private_ip_address_allocation = "Dynamic" - public_ip_address_id = "".public_ip_address_id + #public_ip_address_id = "myApplication-publicip-pubip" + public_ip_address_id = data.azurerm_public_ip.test.id } } -resource "azurerm_linux_virtual_machine" "" { - name = "${var.vm_name}" - location = "${var.rg_location}" - resource_group_name = "${var.rg_name}" +resource "azurerm_linux_virtual_machine" "test" { + name = "${var.application_type}-${var.resource_type}" + location = "${var.location}" + resource_group_name = "${var.resource_group}" size = "Standard_DS2_v2" - admin_username = "${var.admin_username}" - network_interface_ids = [] - admin_ssh_key { - username = "adminuser" - public_key = "file("~/.ssh/id_rsa.pub")" - } + admin_username = "adminuser" + admin_password = "adminuserP@55" + disable_password_authentication = "false" + network_interface_ids = [ + azurerm_network_interface.test.id, + ] +# admin_ssh_key { +# username = "adminuser" +# public_key = "file("~/.ssh/id_rsa.pub")" +# } os_disk { caching = "ReadWrite" storage_account_type = "Standard_LRS" From 6c924033b8b49aadb3e3b201db96bb32abf5f2f4 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Wed, 14 Jun 2023 14:58:11 +0200 Subject: [PATCH 006/110] update ssh vars --- terraform/modules/vm/vm.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/terraform/modules/vm/vm.tf b/terraform/modules/vm/vm.tf index db9cd6b33..5e09c4c30 100644 --- a/terraform/modules/vm/vm.tf +++ b/terraform/modules/vm/vm.tf @@ -44,6 +44,11 @@ resource "azurerm_linux_virtual_machine" "test" { # username = "adminuser" # public_key = "file("~/.ssh/id_rsa.pub")" # } +# admin_ssh_key { +# username = "adminuser" +# public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCe+85RdeEz+9UVLdmToflPtHREOLFpODV/HR1aQoyP+veU4dEYF/gdvHkHOCBNl/x9wNeitr9tzrc0AGjy2hEFGjRdOrT7XG1nZ6a6Mhjd9yTT3ghDk8p8ipYQqbmqyTQphNT9ym4qSOJ1zakCjM6a4M7HB7AyhS8ddI1xGxPH5q2XSh5HC95/1hxrgXFakjNT2Zw//D9LT2gQdIZuuBUPE/8+SjEPa97Qe8m6W9WCkulEFzLzK0TsM6cQ8y0eCrmh30lWfT7XHm2w0kLvj4POL8+2BCCb+dcbBxV/oH4Z9xemBk84psFbixHIVUNIbJuYQORPlWf9wzCD7mjti0C1HFGBjCQyTqDaYjXW91ifIotJiIGILeZ1ZA7XiC9dbiJF8pwPsi3OjT3ehcxrue19/f7mTJ07CJIqTIKF6DL0CLmfZj+ae44jmysihCdJvbia+pRgvwlH5fm9551LL3F3J4O1xRIBIKLSwbiHZqUxEzu8UtwIOyafez0HdWWFRkc= wojsiw@DESKTOP-AVL1658" +# } + os_disk { caching = "ReadWrite" storage_account_type = "Standard_LRS" From 9f1a7cffa796f850425309b7927d3ed302d250ef Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 15 Jun 2023 14:36:17 +0200 Subject: [PATCH 007/110] delete dupicate definition --- terraform/environments/test/terraform.tfvars | 4 ++-- terraform/modules/vm/input.tf | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index ee691f802..615dc833c 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,7 +1,7 @@ # Azure subscription vars subscription_id = "a3a536c2-3690-4c5f-8032-998a8dc3234e" -client_id = "e5a26397-e26b-49a6-af6a-8a9501bbbb35" -client_secret = "ZVq8Q~WVCTKU~u7dLwXr1-hSlT.OZ-~6o7P9zbid" +client_id = "d245400a-433e-47c4-9b0b-12391ae61d79" +client_secret = "2Fh8Q~oKiACin.tnkyFxLGVaXCtNcsCv.KGyhcA8" tenant_id = "f958e84a-92b8-439f-a62d-4f45996b6d07" # Resource Group/Location diff --git a/terraform/modules/vm/input.tf b/terraform/modules/vm/input.tf index b3a25f35b..aae9b340c 100644 --- a/terraform/modules/vm/input.tf +++ b/terraform/modules/vm/input.tf @@ -11,7 +11,3 @@ variable "resource_type" { variable "resource_group" { default = "Azuredevops" } - -variable "resource_group" { - default = "Azuredevops" -} From 050da69fa5a7568902e2516a1a228f02e3e35945 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 15 Jun 2023 14:44:57 +0200 Subject: [PATCH 008/110] update data --- terraform/environments/test/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/environments/test/main.tf b/terraform/environments/test/main.tf index 9395ac568..d315dbbdb 100644 --- a/terraform/environments/test/main.tf +++ b/terraform/environments/test/main.tf @@ -7,10 +7,10 @@ provider "azurerm" { } terraform { backend "azurerm" { - storage_account_name = "tfstate426527877" + storage_account_name = "tfstate452112709" container_name = "tfstate" key = "test.terraform.tfstate" - access_key = "ROdCrFJnrft4qVy/IhMuRRkDtgQJMkW8NzczqKnR70AXXtONygwvrynr5FFqmYAapYCmLQsjuRBL+AStILvaKw==" + access_key = "BMe6FEw/76SXmsytmd7nxMLaZfZQU9yh/wHG9iL/CJ6DS6vaZUqLB6laEN5X0mj46/NaPNZ0iYro+ASt3UYZPA==" } } From b7ec5c34f4e12fadc3fbad10bd1cfb50895cfbf5 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 15 Jun 2023 14:47:23 +0200 Subject: [PATCH 009/110] update location --- terraform/modules/vm/input.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/modules/vm/input.tf b/terraform/modules/vm/input.tf index aae9b340c..b1ae47aee 100644 --- a/terraform/modules/vm/input.tf +++ b/terraform/modules/vm/input.tf @@ -1,6 +1,6 @@ variable "location" { - default = "westeurope" + default = "East US" } variable "application_type" { default = "myApplication" From 59c47a87fa3944a227ec651826c3943df8fb7226 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 15 Jun 2023 14:50:57 +0200 Subject: [PATCH 010/110] update locations --- terraform/environments/test/terraform.tfvars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 615dc833c..9583a9c41 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -5,7 +5,7 @@ client_secret = "2Fh8Q~oKiACin.tnkyFxLGVaXCtNcsCv.KGyhcA8" tenant_id = "f958e84a-92b8-439f-a62d-4f45996b6d07" # Resource Group/Location -location = "West Europe" +location = "East US" resource_group_name = "Azuredevops" resource_group = "Azuredevops" application_type = "myApplication" From 38b2a936fb261d4cdb129f72b86727af75f42f1d Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 15 Jun 2023 14:56:29 +0200 Subject: [PATCH 011/110] chnange vm definition NIC --- terraform/modules/vm/vm.tf | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/terraform/modules/vm/vm.tf b/terraform/modules/vm/vm.tf index 5e09c4c30..5d4734a62 100644 --- a/terraform/modules/vm/vm.tf +++ b/terraform/modules/vm/vm.tf @@ -3,16 +3,16 @@ # resource_group_name = "${var.resource_group}" #} -data "azurerm_subnet" "test"{ - name = "${var.application_type}-NET-sub" - virtual_network_name = "${var.application_type}-NET" - resource_group_name = "${var.resource_group}" -} +#data "azurerm_subnet" "test" { +# name = "${var.application_type}-NET-sub" +# virtual_network_name = "${var.application_type}-NET" +## resource_group_name = "${var.resource_group}" +#} -data "azurerm_public_ip" "test"{ - name = "${var.application_type}-publicip-pubip" - resource_group_name = "${var.resource_group}" -} +##data "azurerm_public_ip" "test" { +# name = "${var.application_type}-publicip-pubip" +# resource_group_name = "${var.resource_group}" +#} resource "azurerm_network_interface" "test" { name = "${var.application_type}-${var.resource_type}" @@ -21,11 +21,11 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "internal" - #subnet_id = "myApplication-NET" - subnet_id = data.azurerm_subnet.test.id + subnet_id = "myApplication-NET" + #subnet_id = data.azurerm_subnet.test.id private_ip_address_allocation = "Dynamic" - #public_ip_address_id = "myApplication-publicip-pubip" - public_ip_address_id = data.azurerm_public_ip.test.id + public_ip_address_id = "myApplication-publicip-pubip" + #public_ip_address_id = data.azurerm_public_ip.test.id } } From 89ec968c07c6141d67e7f32bb60fa2796f835b90 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 15 Jun 2023 15:01:14 +0200 Subject: [PATCH 012/110] try other vars --- terraform/modules/vm/vm.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/modules/vm/vm.tf b/terraform/modules/vm/vm.tf index 5d4734a62..4231d0088 100644 --- a/terraform/modules/vm/vm.tf +++ b/terraform/modules/vm/vm.tf @@ -21,10 +21,10 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "internal" - subnet_id = "myApplication-NET" + subnet_id = "${var.application_type}-NET" #"myApplication-NET" #subnet_id = data.azurerm_subnet.test.id private_ip_address_allocation = "Dynamic" - public_ip_address_id = "myApplication-publicip-pubip" + public_ip_address_id = "${var.application_type}-publicip-pubip" #"myApplication-publicip-pubip" #public_ip_address_id = data.azurerm_public_ip.test.id } } From 3837880b6c902043438f7d5ee058bc6f823edeb6 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 15 Jun 2023 18:24:19 +0200 Subject: [PATCH 013/110] Working version --- terraform/environments/test/input.tf | 2 ++ terraform/environments/test/main.tf | 10 ++++++---- terraform/modules/vm/input.tf | 8 ++++++++ terraform/modules/vm/vm.tf | 21 ++------------------- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/terraform/environments/test/input.tf b/terraform/environments/test/input.tf index c0f8084e4..33f775a02 100644 --- a/terraform/environments/test/input.tf +++ b/terraform/environments/test/input.tf @@ -16,3 +16,5 @@ variable address_prefix_test {} variable address_prefixes_test {} variable address_space {} +# VM +variable subnet_id {} diff --git a/terraform/environments/test/main.tf b/terraform/environments/test/main.tf index d315dbbdb..40d4d68d1 100644 --- a/terraform/environments/test/main.tf +++ b/terraform/environments/test/main.tf @@ -60,8 +60,10 @@ module "publicip" { } module "vm" { source = "../../modules/vm" -# location = "${var.location}" -# application_type = "${var.application_type}" -# resource_type = "VM" -# resource_group = "${var.resource_group}" + location = "${var.location}" + application_type = "${var.application_type}" + resource_type = "VM" + resource_group = "${var.resource_group}" + subnet_id = "${module.network.subnet_id_test}" + public_ip_address_id = "${module.publicip.public_ip_address_id}" } \ No newline at end of file diff --git a/terraform/modules/vm/input.tf b/terraform/modules/vm/input.tf index b1ae47aee..b7901ea9e 100644 --- a/terraform/modules/vm/input.tf +++ b/terraform/modules/vm/input.tf @@ -11,3 +11,11 @@ variable "resource_type" { variable "resource_group" { default = "Azuredevops" } + +variable "subnet_id" { +# default = "Azuredevops" +} + +variable "public_ip_address_id" { +# default = "Azuredevops" +} diff --git a/terraform/modules/vm/vm.tf b/terraform/modules/vm/vm.tf index 4231d0088..2be53ec36 100644 --- a/terraform/modules/vm/vm.tf +++ b/terraform/modules/vm/vm.tf @@ -1,18 +1,3 @@ -#data "azurerm_virtual_network" "test" { -# name = "${var.application_type}-NET" -# resource_group_name = "${var.resource_group}" -#} - -#data "azurerm_subnet" "test" { -# name = "${var.application_type}-NET-sub" -# virtual_network_name = "${var.application_type}-NET" -## resource_group_name = "${var.resource_group}" -#} - -##data "azurerm_public_ip" "test" { -# name = "${var.application_type}-publicip-pubip" -# resource_group_name = "${var.resource_group}" -#} resource "azurerm_network_interface" "test" { name = "${var.application_type}-${var.resource_type}" @@ -21,11 +6,9 @@ resource "azurerm_network_interface" "test" { ip_configuration { name = "internal" - subnet_id = "${var.application_type}-NET" #"myApplication-NET" - #subnet_id = data.azurerm_subnet.test.id + subnet_id = "${var.subnet_id}" private_ip_address_allocation = "Dynamic" - public_ip_address_id = "${var.application_type}-publicip-pubip" #"myApplication-publicip-pubip" - #public_ip_address_id = data.azurerm_public_ip.test.id + public_ip_address_id = "${var.public_ip_address_id}" } } From b5e7007e5af934fed35d7f486b07bac55a0cbcf8 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 15 Jun 2023 19:38:32 +0200 Subject: [PATCH 014/110] add hostname --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 154906ab8..50437ca23 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -210,7 +210,7 @@ stages: - deployment: VMDeploy displayName: Selenium Tests environment: - name: # ToDo: Change/provide a name + name: linux-test # ToDo: Change/provide a name resourceType: VirtualMachine tags: selenium strategy: From d1df001f5e1873a35b2286e3fa9845df5ae8d401 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 15 Jun 2023 19:56:32 +0200 Subject: [PATCH 015/110] update PublishTestResults@2 Postman --- azure-pipelines.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 50437ca23..8f3ef2f62 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -8,7 +8,8 @@ trigger: # ToDo: Replace the agent pool name, if you are using Udacity Cloud lab. # Otherwise, comment out the line below. -pool: myAgentPool +#pool: myAgentPool +pool: "Azure Pipelines" variables: python.version: '3.7.6' @@ -121,9 +122,9 @@ stages: inputs: testResultsFormat: 'JUnit' testResultsFiles: '**/TEST-*.xml' - searchFolder: # ToDo + searchFolder: '$(System.DefaultWorkingDirectory)' # ToDo mergeTestResults: true - testRunTitle: # ToDo + testRunTitle: Test_Demo # ToDo #--------------------------------------------# # Selenium (UI) Test Suite - Archive the package From 00077f31b5fbbf378ef9e408eb88edf6b6df27a0 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 15 Jun 2023 20:01:24 +0200 Subject: [PATCH 016/110] change pool --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 8f3ef2f62..11a88978c 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -8,8 +8,8 @@ trigger: # ToDo: Replace the agent pool name, if you are using Udacity Cloud lab. # Otherwise, comment out the line below. -#pool: myAgentPool -pool: "Azure Pipelines" +pool: myAgentPool +#pool: "Azure Pipelines" variables: python.version: '3.7.6' From c7ab3d483a8a997c837a78fd5ac8c51430ba31db Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 11:18:06 +0200 Subject: [PATCH 017/110] comment ubnet --- terraform/environments/test/input.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/environments/test/input.tf b/terraform/environments/test/input.tf index 33f775a02..1d20ef4a4 100644 --- a/terraform/environments/test/input.tf +++ b/terraform/environments/test/input.tf @@ -17,4 +17,4 @@ variable address_prefixes_test {} variable address_space {} # VM -variable subnet_id {} +#variable subnet_id {} From 6bfd28c5609620b09db4ecfe48a9aed33104f157 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 12:23:17 +0200 Subject: [PATCH 018/110] update data --- .../environments/test/.terraform.lock.hcl | 21 ------------------- terraform/environments/test/main.tf | 5 +++-- terraform/environments/test/terraform.tfvars | 8 +++---- terraform/modules/vm/input.tf | 2 +- terraform/modules/vm/vm.tf | 10 ++++----- 5 files changed, 13 insertions(+), 33 deletions(-) delete mode 100644 terraform/environments/test/.terraform.lock.hcl diff --git a/terraform/environments/test/.terraform.lock.hcl b/terraform/environments/test/.terraform.lock.hcl deleted file mode 100644 index 654de8e19..000000000 --- a/terraform/environments/test/.terraform.lock.hcl +++ /dev/null @@ -1,21 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/azurerm" { - version = "3.59.0" - hashes = [ - "h1:2mtKoi0qwKVdZGIhbWNslorQBZEMVdih/3Gtqq6nvug=", - "zh:07a560ad97faa351fcc484badfa796a5513dd7065cd4cc125f47b1baf1183624", - "zh:40733759271d2a0f9872c68c2fa1ebdde4e9fbdc661968d94ceb7d4670f5f751", - "zh:412f7cdc0fb0128439b30d0e5b2e451ae38cda2dbe05cf143923b5d4f1f9f685", - "zh:6fa63d7ca8dcef9a493345bc38f1c8481457072e5e2b2b04ee060ea306ff8ce6", - "zh:805bfa2a0c2260cfda804138efcdd5aca3d0b18e3c526d5c040636bac2a8a2c9", - "zh:81a3a673ee92e33425bad755740521e8e29d7a6191022689a45947fbaf5b5988", - "zh:91e06ef4f91dfa176be05e6cdbc454db895d852a821868ff6b99a5e2eaa5a091", - "zh:c1d58a5c490081486fbb9130dac1b134e935c0c839fe26bebe2f6c79f552fe17", - "zh:cbb7fc281bd2f03910a01888787ec51f7182a334112c89bd876063dd3396dfd3", - "zh:e29542d422c5fb248bfddcc70ef2c9c73c8d9e9a2e21be2b45aec91d008b0953", - "zh:f0d3122be5287f48b5c4c2dc991d51b2f8dcdeedb5b88844fa8e3e6b14a7dfe9", - "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", - ] -} diff --git a/terraform/environments/test/main.tf b/terraform/environments/test/main.tf index 40d4d68d1..9873ddbaa 100644 --- a/terraform/environments/test/main.tf +++ b/terraform/environments/test/main.tf @@ -5,12 +5,13 @@ provider "azurerm" { client_secret = "${var.client_secret}" features {} } + terraform { backend "azurerm" { - storage_account_name = "tfstate452112709" + storage_account_name = "tfstate537924555" container_name = "tfstate" key = "test.terraform.tfstate" - access_key = "BMe6FEw/76SXmsytmd7nxMLaZfZQU9yh/wHG9iL/CJ6DS6vaZUqLB6laEN5X0mj46/NaPNZ0iYro+ASt3UYZPA==" + access_key = "Q4e1iEjb1qSzLfIXAgCbNgp2zNOkD3gYSVAuJlmDZSzysdWRBWHVLyt0Zaba/MeFC7hZzc2Trz5+ASt1MaQCQ==" } } diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 9583a9c41..210e8060d 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,11 +1,11 @@ # Azure subscription vars -subscription_id = "a3a536c2-3690-4c5f-8032-998a8dc3234e" -client_id = "d245400a-433e-47c4-9b0b-12391ae61d79" -client_secret = "2Fh8Q~oKiACin.tnkyFxLGVaXCtNcsCv.KGyhcA8" +subscription_id = "0ee6d06f-69ab-4b3b-9f35-003e1b6eb227" +client_id = "a322c8ba-b16f-4959-b92a-44e5498e0ac4" +client_secret = "q.I8Q~23pY7N6QMVHYqipy5._abAIkzMAlnm2bPl" tenant_id = "f958e84a-92b8-439f-a62d-4f45996b6d07" # Resource Group/Location -location = "East US" +location = "West Europe" resource_group_name = "Azuredevops" resource_group = "Azuredevops" application_type = "myApplication" diff --git a/terraform/modules/vm/input.tf b/terraform/modules/vm/input.tf index b7901ea9e..9ea9d27b5 100644 --- a/terraform/modules/vm/input.tf +++ b/terraform/modules/vm/input.tf @@ -1,6 +1,6 @@ variable "location" { - default = "East US" + default = "West Europe" } variable "application_type" { default = "myApplication" diff --git a/terraform/modules/vm/vm.tf b/terraform/modules/vm/vm.tf index 2be53ec36..cd974be32 100644 --- a/terraform/modules/vm/vm.tf +++ b/terraform/modules/vm/vm.tf @@ -16,7 +16,7 @@ resource "azurerm_linux_virtual_machine" "test" { name = "${var.application_type}-${var.resource_type}" location = "${var.location}" resource_group_name = "${var.resource_group}" - size = "Standard_DS2_v2" + size = "Standard_DS1_v2" admin_username = "adminuser" admin_password = "adminuserP@55" disable_password_authentication = "false" @@ -27,10 +27,10 @@ resource "azurerm_linux_virtual_machine" "test" { # username = "adminuser" # public_key = "file("~/.ssh/id_rsa.pub")" # } -# admin_ssh_key { -# username = "adminuser" -# public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCe+85RdeEz+9UVLdmToflPtHREOLFpODV/HR1aQoyP+veU4dEYF/gdvHkHOCBNl/x9wNeitr9tzrc0AGjy2hEFGjRdOrT7XG1nZ6a6Mhjd9yTT3ghDk8p8ipYQqbmqyTQphNT9ym4qSOJ1zakCjM6a4M7HB7AyhS8ddI1xGxPH5q2XSh5HC95/1hxrgXFakjNT2Zw//D9LT2gQdIZuuBUPE/8+SjEPa97Qe8m6W9WCkulEFzLzK0TsM6cQ8y0eCrmh30lWfT7XHm2w0kLvj4POL8+2BCCb+dcbBxV/oH4Z9xemBk84psFbixHIVUNIbJuYQORPlWf9wzCD7mjti0C1HFGBjCQyTqDaYjXW91ifIotJiIGILeZ1ZA7XiC9dbiJF8pwPsi3OjT3ehcxrue19/f7mTJ07CJIqTIKF6DL0CLmfZj+ae44jmysihCdJvbia+pRgvwlH5fm9551LL3F3J4O1xRIBIKLSwbiHZqUxEzu8UtwIOyafez0HdWWFRkc= wojsiw@DESKTOP-AVL1658" -# } + admin_ssh_key { + username = "adminuser" + public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCe+85RdeEz+9UVLdmToflPtHREOLFpODV/HR1aQoyP+veU4dEYF/gdvHkHOCBNl/x9wNeitr9tzrc0AGjy2hEFGjRdOrT7XG1nZ6a6Mhjd9yTT3ghDk8p8ipYQqbmqyTQphNT9ym4qSOJ1zakCjM6a4M7HB7AyhS8ddI1xGxPH5q2XSh5HC95/1hxrgXFakjNT2Zw//D9LT2gQdIZuuBUPE/8+SjEPa97Qe8m6W9WCkulEFzLzK0TsM6cQ8y0eCrmh30lWfT7XHm2w0kLvj4POL8+2BCCb+dcbBxV/oH4Z9xemBk84psFbixHIVUNIbJuYQORPlWf9wzCD7mjti0C1HFGBjCQyTqDaYjXW91ifIotJiIGILeZ1ZA7XiC9dbiJF8pwPsi3OjT3ehcxrue19/f7mTJ07CJIqTIKF6DL0CLmfZj+ae44jmysihCdJvbia+pRgvwlH5fm9551LL3F3J4O1xRIBIKLSwbiHZqUxEzu8UtwIOyafez0HdWWFRkc= wojsiw@DESKTOP-AVL1658" + } os_disk { caching = "ReadWrite" From 2c24d4a6c4a8199f90583519b35a63fe579dbd31 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:20:54 +0200 Subject: [PATCH 019/110] update task names --- azure-pipelines.yaml | 8 +++---- .../environments/test/.terraform.lock.hcl | 21 +++++++++++++++++++ terraform/environments/test/main.tf | 4 ++-- terraform/modules/appservice/appservice.tf | 2 +- 4 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 terraform/environments/test/.terraform.lock.hcl diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 11a88978c..c250e9df3 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,14 +31,14 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0 + - task: TerraformInstaller@0 displayName: 'Terrafom installation' inputs: terraformVersion: '1.2.9' # Run Terraform Init on the pipeline agent # ToDo: Replace the resource group name, storage account name, and container name below - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 + - task: TerraformTaskV3@3 displayName: 'Terrafom init' inputs: provider: 'azurerm' @@ -50,7 +50,7 @@ stages: backendAzureRmContainerName: '' backendAzureRmKey: 'test.terraform.tfstate' - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 + - task: TerraformTaskV3@3 displayName: Terraform validate inputs: provider: 'azurerm' @@ -74,7 +74,7 @@ stages: # Run Terraform Apply - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 + - task: TerraformTaskV3@3 displayName: Terraform apply inputs: provider: 'azurerm' diff --git a/terraform/environments/test/.terraform.lock.hcl b/terraform/environments/test/.terraform.lock.hcl new file mode 100644 index 000000000..9c5cb0b7a --- /dev/null +++ b/terraform/environments/test/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "3.61.0" + hashes = [ + "h1:G++oC5Nm5ch7HL0Ty7U0/roQzKDlDilkSeRYfbeAu3w=", + "zh:1441e4e9b63801bc2432b1c06e0d202e66946c57abbf553d7f88fba5986e8f59", + "zh:291f0db2808724119a079f9a30254dbeae4a450dbacdd8bbb821d9332b842b25", + "zh:3069754dece944a9a5b2b5394e09bc393a22211951a73a1fdccc5c9fa41785d2", + "zh:4c6502f93da330d4b91ff2fbf198700619566386fd92c17ad14492b78a135403", + "zh:5f0fe6ca017b30534362e2ffcab03bcad9f08b59485948ba751248ee4b7deb7d", + "zh:76cdce8bb5fc73b65a21fb7eae943096397c53acda30fbe5da2892c92dabd3f9", + "zh:8f990887703da526d71ba25dcc259797e763397f23c3c04003c0706893db474c", + "zh:90854ec0570367b0d0c29e69f7426aca6dd85e6a3f8e3ed108ab5570311e587c", + "zh:a9450a8e1e45a577a62f252b383fe6a7159ee782a16ed8142377264b86e47fa4", + "zh:cc228b766a089be615e5d8b88342670a6a4cd05d44eb535232b8613c8d23218b", + "zh:d817088f245dce195c25492f6b2c8c26f02fd863cb5da5b689733b7c6bba3559", + "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + ] +} diff --git a/terraform/environments/test/main.tf b/terraform/environments/test/main.tf index 9873ddbaa..b2ab12d66 100644 --- a/terraform/environments/test/main.tf +++ b/terraform/environments/test/main.tf @@ -8,10 +8,10 @@ provider "azurerm" { terraform { backend "azurerm" { - storage_account_name = "tfstate537924555" + storage_account_name = "tfstate185051967" container_name = "tfstate" key = "test.terraform.tfstate" - access_key = "Q4e1iEjb1qSzLfIXAgCbNgp2zNOkD3gYSVAuJlmDZSzysdWRBWHVLyt0Zaba/MeFC7hZzc2Trz5+ASt1MaQCQ==" + access_key = "tL8M2MnN89tSzdOg5xUWCfcOctxFnjW60RI4TsY0LaC/3fzY84v+FMktTgydRnDPYl+6ZRkjcVQl+AStYsOhWw==" } } diff --git a/terraform/modules/appservice/appservice.tf b/terraform/modules/appservice/appservice.tf index a2f55e3f4..75d5ee3f8 100644 --- a/terraform/modules/appservice/appservice.tf +++ b/terraform/modules/appservice/appservice.tf @@ -7,7 +7,7 @@ resource "azurerm_service_plan" "test" { } resource "azurerm_linux_web_app" "test" { - name = "${var.application_type}-${var.resource_type}" + name = "${var.application_type}-${var.resource_type}-WS" location = "${var.location}" resource_group_name = "${var.resource_group}" service_plan_id = azurerm_service_plan.test.id From 8cdf3e7fc05230b860bfebb67caea2a395fa993e Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:23:40 +0200 Subject: [PATCH 020/110] back witj full name tasks --- azure-pipelines.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index c250e9df3..11a88978c 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,14 +31,14 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: TerraformInstaller@0 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0 displayName: 'Terrafom installation' inputs: terraformVersion: '1.2.9' # Run Terraform Init on the pipeline agent # ToDo: Replace the resource group name, storage account name, and container name below - - task: TerraformTaskV3@3 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 displayName: 'Terrafom init' inputs: provider: 'azurerm' @@ -50,7 +50,7 @@ stages: backendAzureRmContainerName: '' backendAzureRmKey: 'test.terraform.tfstate' - - task: TerraformTaskV3@3 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 displayName: Terraform validate inputs: provider: 'azurerm' @@ -74,7 +74,7 @@ stages: # Run Terraform Apply - - task: TerraformTaskV3@3 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 displayName: Terraform apply inputs: provider: 'azurerm' From f322259b1c3b3f7ed93568df93010cb159be8fa0 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:32:12 +0200 Subject: [PATCH 021/110] update taks names --- azure-pipelines.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 11a88978c..c250e9df3 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,14 +31,14 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0 + - task: TerraformInstaller@0 displayName: 'Terrafom installation' inputs: terraformVersion: '1.2.9' # Run Terraform Init on the pipeline agent # ToDo: Replace the resource group name, storage account name, and container name below - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 + - task: TerraformTaskV3@3 displayName: 'Terrafom init' inputs: provider: 'azurerm' @@ -50,7 +50,7 @@ stages: backendAzureRmContainerName: '' backendAzureRmKey: 'test.terraform.tfstate' - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 + - task: TerraformTaskV3@3 displayName: Terraform validate inputs: provider: 'azurerm' @@ -74,7 +74,7 @@ stages: # Run Terraform Apply - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 + - task: TerraformTaskV3@3 displayName: Terraform apply inputs: provider: 'azurerm' From c268763c270b8832f1a045c661459f75e526898a Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:34:48 +0200 Subject: [PATCH 022/110] update Azure data --- azure-pipelines.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index c250e9df3..c9ebe9792 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -45,9 +45,9 @@ stages: command: 'init' workingDirectory: '$(System.DefaultWorkingDirectory)/terraform/environments/test' backendServiceArm: '$(azureServiceConnectionId)' - backendAzureRmResourceGroupName: '' - backendAzureRmStorageAccountName: '' - backendAzureRmContainerName: '' + backendAzureRmResourceGroupName: 'Azuredevops' + backendAzureRmStorageAccountName: 'tfstate185051967' + backendAzureRmContainerName: 'tfstate' backendAzureRmKey: 'test.terraform.tfstate' - task: TerraformTaskV3@3 From 8db05e919abc51fe4faa3c075ab0165ba1e754e6 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:35:59 +0200 Subject: [PATCH 023/110] comment FakeRestAPI --- azure-pipelines.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index c9ebe9792..61a53ed1f 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -144,16 +144,16 @@ stages: #--------------------------------------------# # FakeRestAPI - Archive # ToDo: Complete the ArchiveFiles@2 task and publish step - - task: ArchiveFiles@2 - displayName: 'Archive FakeRestAPI' - inputs: - rootFolderOrFile: - includeRootFolder: false - archiveType: 'zip' - archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' - - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip - displayName: 'Upload Package' - artifact: drop-fakerestapi +# - task: ArchiveFiles@2 +# displayName: 'Archive FakeRestAPI' +# inputs: +# rootFolderOrFile: +# includeRootFolder: false +# archiveType: 'zip' +# archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' +# - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip +# displayName: 'Upload Package' +# artifact: drop-fakerestapi #--------------------------------------------# # JMeter (Performance) Test Suite - Archive From 494e84d909de377509bb31a73c538f1aaef8bb91 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:37:35 +0200 Subject: [PATCH 024/110] def. env --- azure-pipelines.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 61a53ed1f..59447a953 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -144,16 +144,16 @@ stages: #--------------------------------------------# # FakeRestAPI - Archive # ToDo: Complete the ArchiveFiles@2 task and publish step -# - task: ArchiveFiles@2 -# displayName: 'Archive FakeRestAPI' -# inputs: -# rootFolderOrFile: -# includeRootFolder: false -# archiveType: 'zip' -# archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' -# - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip -# displayName: 'Upload Package' -# artifact: drop-fakerestapi + - task: ArchiveFiles@2 + displayName: 'Archive FakeRestAPI' + inputs: + rootFolderOrFile: + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' + - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip + displayName: 'Upload Package' + artifact: drop-fakerestapi #--------------------------------------------# # JMeter (Performance) Test Suite - Archive @@ -181,7 +181,7 @@ stages: - deployment: FakeRestAPI pool: vmImage: 'Ubuntu-18.04' - environment: # ToDo + environment: "project_demo" # ToDo strategy: runOnce: deploy: From 5158f77b29935517b2bf7453284d861cf6ca23c7 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:42:08 +0200 Subject: [PATCH 025/110] update env --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 59447a953..947274140 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -147,7 +147,7 @@ stages: - task: ArchiveFiles@2 displayName: 'Archive FakeRestAPI' inputs: - rootFolderOrFile: + rootFolderOrFile: $(Build.ArtifactStagingDirectory) includeRootFolder: false archiveType: 'zip' archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' @@ -181,7 +181,7 @@ stages: - deployment: FakeRestAPI pool: vmImage: 'Ubuntu-18.04' - environment: "project_demo" # ToDo + environment: "linux-test" # ToDo strategy: runOnce: deploy: From 940ce16fc8e6931639e5dc3d64b8bafa16ef58bd Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:47:51 +0200 Subject: [PATCH 026/110] comment FakeRestAPI --- azure-pipelines.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 947274140..57e275f73 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -144,16 +144,16 @@ stages: #--------------------------------------------# # FakeRestAPI - Archive # ToDo: Complete the ArchiveFiles@2 task and publish step - - task: ArchiveFiles@2 - displayName: 'Archive FakeRestAPI' - inputs: - rootFolderOrFile: $(Build.ArtifactStagingDirectory) - includeRootFolder: false - archiveType: 'zip' - archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' - - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip - displayName: 'Upload Package' - artifact: drop-fakerestapi +# - task: ArchiveFiles@2 +# displayName: 'Archive FakeRestAPI' +# inputs: +# rootFolderOrFile: +# includeRootFolder: false +# archiveType: 'zip' +# archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' +# - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip +# displayName: 'Upload Package' +# artifact: drop-fakerestapi #--------------------------------------------# # JMeter (Performance) Test Suite - Archive From 714790bd47c769004bfe6a644c7fa598e8992ce1 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:54:26 +0200 Subject: [PATCH 027/110] update azureServiceConncetionId --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 57e275f73..666c53dc1 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -14,7 +14,7 @@ pool: myAgentPool variables: python.version: '3.7.6' # ToDo: Replace the service connection name as used in the DevOps project settings - azureServiceConnectionId: 'myServiceConnection' + azureServiceConnectionId: 'Azure' #'myServiceConnection' # Project root folder. Point to the folder containing manage.py file. projectRoot: $(System.DefaultWorkingDirectory) # Environment name From bb297b20ae5831390f9b9269fc9bd2791bb5d8da Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:57:37 +0200 Subject: [PATCH 028/110] update once more conn --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 666c53dc1..7000fc70f 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -14,7 +14,7 @@ pool: myAgentPool variables: python.version: '3.7.6' # ToDo: Replace the service connection name as used in the DevOps project settings - azureServiceConnectionId: 'Azure' #'myServiceConnection' + azureServiceConnectionId: 'AzureRMconn' #'myServiceConnection' # Project root folder. Point to the folder containing manage.py file. projectRoot: $(System.DefaultWorkingDirectory) # Environment name From 37edc6af0f4e5b0d2c3c136e6fad8390843b2f7a Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 14:59:40 +0200 Subject: [PATCH 029/110] uncomment FakeRestAPI --- azure-pipelines.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 7000fc70f..42938cb73 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -144,16 +144,16 @@ stages: #--------------------------------------------# # FakeRestAPI - Archive # ToDo: Complete the ArchiveFiles@2 task and publish step -# - task: ArchiveFiles@2 -# displayName: 'Archive FakeRestAPI' -# inputs: -# rootFolderOrFile: -# includeRootFolder: false -# archiveType: 'zip' -# archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' -# - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip -# displayName: 'Upload Package' -# artifact: drop-fakerestapi + - task: ArchiveFiles@2 + displayName: 'Archive FakeRestAPI' + inputs: + rootFolderOrFile: + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' + - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip + displayName: 'Upload Package' + artifact: drop-fakerestapi #--------------------------------------------# # JMeter (Performance) Test Suite - Archive From 8a8ec9d6a1c5987fa55862d670dfc95ce366343a Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 18:04:59 +0200 Subject: [PATCH 030/110] update VM imgae --- azure-pipelines.yaml | 2 +- terraform/modules/vm/vm.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 42938cb73..a3b1a865b 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -180,7 +180,7 @@ stages: # ToDo: Provide you created in your DevOps project - deployment: FakeRestAPI pool: - vmImage: 'Ubuntu-18.04' + vmImage: 'Ubuntu-20.04' environment: "linux-test" # ToDo strategy: runOnce: diff --git a/terraform/modules/vm/vm.tf b/terraform/modules/vm/vm.tf index cd974be32..81ce034d6 100644 --- a/terraform/modules/vm/vm.tf +++ b/terraform/modules/vm/vm.tf @@ -38,8 +38,8 @@ resource "azurerm_linux_virtual_machine" "test" { } source_image_reference { publisher = "Canonical" - offer = "UbuntuServer" - sku = "18.04-LTS" + offer = "0001-com-ubuntu-server-focal" + sku = "20_04-lts-gen2" version = "latest" } } From b3b44a44f79ec0a5a4ad370c4c70d87f87ce5d73 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 20 Jun 2023 18:12:19 +0200 Subject: [PATCH 031/110] correct syntax --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index a3b1a865b..e2426f288 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -150,7 +150,7 @@ stages: rootFolderOrFile: includeRootFolder: false archiveType: 'zip' - archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip displayName: 'Upload Package' artifact: drop-fakerestapi From f6811bbdcc6636b1cca18ba67c5b617fb8d84d7c Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 26 Jun 2023 11:44:30 +0200 Subject: [PATCH 032/110] Update auth data --- terraform/environments/test/main.tf | 4 ++-- terraform/environments/test/terraform.tfvars | 10 +++++----- terraform/modules/appservice/appservice.tf | 2 +- terraform/modules/vm/input.tf | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/terraform/environments/test/main.tf b/terraform/environments/test/main.tf index b2ab12d66..b6038f52f 100644 --- a/terraform/environments/test/main.tf +++ b/terraform/environments/test/main.tf @@ -8,10 +8,10 @@ provider "azurerm" { terraform { backend "azurerm" { - storage_account_name = "tfstate185051967" + storage_account_name = "tfstate2968829927" container_name = "tfstate" key = "test.terraform.tfstate" - access_key = "tL8M2MnN89tSzdOg5xUWCfcOctxFnjW60RI4TsY0LaC/3fzY84v+FMktTgydRnDPYl+6ZRkjcVQl+AStYsOhWw==" + access_key = "e4MDU88XtB+lq2Nc1asI8kcxntbG32jWIV/bxjk8TdOpWXTay0qP4Q1+Qidj6AWD3VGKOwEtwrFM+ASt6FQi8g==" } } diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 210e8060d..7eab0c820 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,14 +1,14 @@ # Azure subscription vars -subscription_id = "0ee6d06f-69ab-4b3b-9f35-003e1b6eb227" -client_id = "a322c8ba-b16f-4959-b92a-44e5498e0ac4" -client_secret = "q.I8Q~23pY7N6QMVHYqipy5._abAIkzMAlnm2bPl" +subscription_id = "51003162-956a-4e6f-877b-3d0d913c7ca1" +client_id = "4752abf0-5fb0-4983-b927-77625843e362" +client_secret = "9t28Q~BoLRRe-BOo~m9kx7MgL-HUxPFYNOhqib7S" tenant_id = "f958e84a-92b8-439f-a62d-4f45996b6d07" # Resource Group/Location -location = "West Europe" +location = "South Central US" resource_group_name = "Azuredevops" resource_group = "Azuredevops" -application_type = "myApplication" +application_type = "wsApplication" # Network virtual_network_name = "myVNet" diff --git a/terraform/modules/appservice/appservice.tf b/terraform/modules/appservice/appservice.tf index 75d5ee3f8..a2f55e3f4 100644 --- a/terraform/modules/appservice/appservice.tf +++ b/terraform/modules/appservice/appservice.tf @@ -7,7 +7,7 @@ resource "azurerm_service_plan" "test" { } resource "azurerm_linux_web_app" "test" { - name = "${var.application_type}-${var.resource_type}-WS" + name = "${var.application_type}-${var.resource_type}" location = "${var.location}" resource_group_name = "${var.resource_group}" service_plan_id = azurerm_service_plan.test.id diff --git a/terraform/modules/vm/input.tf b/terraform/modules/vm/input.tf index 9ea9d27b5..9af16f48d 100644 --- a/terraform/modules/vm/input.tf +++ b/terraform/modules/vm/input.tf @@ -1,9 +1,9 @@ variable "location" { - default = "West Europe" +# default = "West Europe" } variable "application_type" { - default = "myApplication" + # default = "wsApplication" } variable "resource_type" { default = "VM" From 5831916b267854598c3b761f0b351113d15f8bae Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 26 Jun 2023 12:26:35 +0200 Subject: [PATCH 033/110] update azure pipeline tfstate --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index e2426f288..0f422d985 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -46,7 +46,7 @@ stages: workingDirectory: '$(System.DefaultWorkingDirectory)/terraform/environments/test' backendServiceArm: '$(azureServiceConnectionId)' backendAzureRmResourceGroupName: 'Azuredevops' - backendAzureRmStorageAccountName: 'tfstate185051967' + backendAzureRmStorageAccountName: 'tfstate2968829927' backendAzureRmContainerName: 'tfstate' backendAzureRmKey: 'test.terraform.tfstate' From c70a1dd3c4ce877845aeba26a394da2a94d527b4 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 26 Jun 2023 13:03:06 +0200 Subject: [PATCH 034/110] updat etasknames --- azure-pipelines.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 0f422d985..2439400a1 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,14 +31,14 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: TerraformInstaller@0 + - task: TerraformInstaller@1 displayName: 'Terrafom installation' inputs: terraformVersion: '1.2.9' # Run Terraform Init on the pipeline agent # ToDo: Replace the resource group name, storage account name, and container name below - - task: TerraformTaskV3@3 + - task: TerraformTaskV3@1 displayName: 'Terrafom init' inputs: provider: 'azurerm' @@ -50,7 +50,7 @@ stages: backendAzureRmContainerName: 'tfstate' backendAzureRmKey: 'test.terraform.tfstate' - - task: TerraformTaskV3@3 + - task: TerraformTaskV3@1 displayName: Terraform validate inputs: provider: 'azurerm' @@ -74,7 +74,7 @@ stages: # Run Terraform Apply - - task: TerraformTaskV3@3 + - task: TerraformTaskV3@1 displayName: Terraform apply inputs: provider: 'azurerm' From 26ae1cc55be8dbb3d1f7f983e3588dadee934751 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 26 Jun 2023 13:09:00 +0200 Subject: [PATCH 035/110] change path --- azure-pipelines.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 2439400a1..1f232540e 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,14 +31,14 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: TerraformInstaller@1 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@1 displayName: 'Terrafom installation' inputs: terraformVersion: '1.2.9' # Run Terraform Init on the pipeline agent # ToDo: Replace the resource group name, storage account name, and container name below - - task: TerraformTaskV3@1 + - task: TerraformTaskV3@3 displayName: 'Terrafom init' inputs: provider: 'azurerm' @@ -50,7 +50,7 @@ stages: backendAzureRmContainerName: 'tfstate' backendAzureRmKey: 'test.terraform.tfstate' - - task: TerraformTaskV3@1 + - task: TerraformTaskV3@3 displayName: Terraform validate inputs: provider: 'azurerm' @@ -74,7 +74,7 @@ stages: # Run Terraform Apply - - task: TerraformTaskV3@1 + - task: TerraformTaskV3@3 displayName: Terraform apply inputs: provider: 'azurerm' From 319b8ffa7d5a8fb45ce805903a33f1fef215fade Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 26 Jun 2023 13:10:09 +0200 Subject: [PATCH 036/110] other path Terraforminstaller --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1f232540e..1e02a5c53 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,7 +31,7 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@1 + - task: charleszipp.azure-pipelines-tasks-terraform.azure-pipelines-tasks-terraform-installerTerraformInstaller@1 displayName: 'Terrafom installation' inputs: terraformVersion: '1.2.9' From 081b8de1095e7155306e79009350f75f79d2efbd Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 26 Jun 2023 13:13:49 +0200 Subject: [PATCH 037/110] back to org --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1e02a5c53..5f3970272 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,7 +31,7 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: charleszipp.azure-pipelines-tasks-terraform.azure-pipelines-tasks-terraform-installerTerraformInstaller@1 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0 displayName: 'Terrafom installation' inputs: terraformVersion: '1.2.9' From 336d485b1aba1c9ae2e3bde39e0863bc4e7c3806 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 26 Jun 2023 13:14:27 +0200 Subject: [PATCH 038/110] change number --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 5f3970272..bb7c5a6c5 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,7 +31,7 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@2 displayName: 'Terrafom installation' inputs: terraformVersion: '1.2.9' From 039da8d152012caee4737c31fd2d0dda41ccdbd7 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 26 Jun 2023 13:15:08 +0200 Subject: [PATCH 039/110] del path --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index bb7c5a6c5..953fe6e62 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,7 +31,7 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@2 + - task: TerraformInstaller@2 displayName: 'Terrafom installation' inputs: terraformVersion: '1.2.9' From 17de8f84d0102a5ad90bd31c2a3a613d0577c9c6 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 26 Jun 2023 13:18:20 +0200 Subject: [PATCH 040/110] change ab. terraforminstaller --- azure-pipelines.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 953fe6e62..9783620f4 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,10 +31,11 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: TerraformInstaller@2 + - task: TerraformInstaller@0 displayName: 'Terrafom installation' inputs: - terraformVersion: '1.2.9' +# terraformVersion: '1.2.9' + terraformVersion: 'latest' # Run Terraform Init on the pipeline agent # ToDo: Replace the resource group name, storage account name, and container name below From c4ed4616f3c728a5aa273f5afd51d0afac99cfdf Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Wed, 28 Jun 2023 13:27:24 +0200 Subject: [PATCH 041/110] update auth data --- terraform/environments/test/main.tf | 4 ++-- terraform/environments/test/terraform.tfvars | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/terraform/environments/test/main.tf b/terraform/environments/test/main.tf index b6038f52f..62ff0cee5 100644 --- a/terraform/environments/test/main.tf +++ b/terraform/environments/test/main.tf @@ -8,10 +8,10 @@ provider "azurerm" { terraform { backend "azurerm" { - storage_account_name = "tfstate2968829927" + storage_account_name = "tfstate3268121631" container_name = "tfstate" key = "test.terraform.tfstate" - access_key = "e4MDU88XtB+lq2Nc1asI8kcxntbG32jWIV/bxjk8TdOpWXTay0qP4Q1+Qidj6AWD3VGKOwEtwrFM+ASt6FQi8g==" + access_key = "+K8Byk8qv2fqIhm6aM0UxAgNgMgyzDFHyAbkIIPT6l7bJ38jMxa6FBdzuKJJbBRJK9cMawR54zCJ+AStrGEsog==" } } diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 7eab0c820..50cc14cff 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,11 +1,11 @@ # Azure subscription vars -subscription_id = "51003162-956a-4e6f-877b-3d0d913c7ca1" -client_id = "4752abf0-5fb0-4983-b927-77625843e362" -client_secret = "9t28Q~BoLRRe-BOo~m9kx7MgL-HUxPFYNOhqib7S" +subscription_id = "82c40d1f-be09-4c9e-9295-ae70e625b7b5" +client_id = "08fc0a12-876f-4406-af6e-c6c3de04dfab" +client_secret = "9lV8Q~egb-8ZqUQwhUQn4-pr5D6vlh9u.VU9ocKr" tenant_id = "f958e84a-92b8-439f-a62d-4f45996b6d07" # Resource Group/Location -location = "South Central US" +location = "West Europe" resource_group_name = "Azuredevops" resource_group = "Azuredevops" application_type = "wsApplication" From 99656b0a4629a2c80a679a6c3f755afa25570311 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Wed, 28 Jun 2023 13:45:43 +0200 Subject: [PATCH 042/110] update paths --- azure-pipelines.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 9783620f4..bfba803a9 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,7 +31,7 @@ stages: #--------------------------------------------# # Use Terraform to create the Infrastructure # Install Terraform on the pipeline agent - - task: TerraformInstaller@0 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-installer-task.TerraformInstaller@0 displayName: 'Terrafom installation' inputs: # terraformVersion: '1.2.9' @@ -39,7 +39,7 @@ stages: # Run Terraform Init on the pipeline agent # ToDo: Replace the resource group name, storage account name, and container name below - - task: TerraformTaskV3@3 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 displayName: 'Terrafom init' inputs: provider: 'azurerm' @@ -51,7 +51,7 @@ stages: backendAzureRmContainerName: 'tfstate' backendAzureRmKey: 'test.terraform.tfstate' - - task: TerraformTaskV3@3 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 displayName: Terraform validate inputs: provider: 'azurerm' @@ -75,7 +75,7 @@ stages: # Run Terraform Apply - - task: TerraformTaskV3@3 + - task: ms-devlabs.custom-terraform-tasks.custom-terraform-release-task.TerraformTaskV3@3 displayName: Terraform apply inputs: provider: 'azurerm' From 24650d8048d777afc0669ed1fea85d84fad99fc1 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 29 Jun 2023 13:59:21 +0200 Subject: [PATCH 043/110] update auth data --- terraform/environments/test/main.tf | 4 ++-- terraform/environments/test/terraform.tfvars | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/terraform/environments/test/main.tf b/terraform/environments/test/main.tf index 62ff0cee5..b18441154 100644 --- a/terraform/environments/test/main.tf +++ b/terraform/environments/test/main.tf @@ -8,10 +8,10 @@ provider "azurerm" { terraform { backend "azurerm" { - storage_account_name = "tfstate3268121631" + storage_account_name = "tfstate2367619412" container_name = "tfstate" key = "test.terraform.tfstate" - access_key = "+K8Byk8qv2fqIhm6aM0UxAgNgMgyzDFHyAbkIIPT6l7bJ38jMxa6FBdzuKJJbBRJK9cMawR54zCJ+AStrGEsog==" + access_key = "KJNbtO/gSvfRIj0KtxeCVNmExKzvNNpT0mJGkFVKl8PdLYRPjjlgxgvChJzO+BZHad927lGyARvh+AStVBcP/w==" } } diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 50cc14cff..9d36676e9 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,8 +1,8 @@ # Azure subscription vars -subscription_id = "82c40d1f-be09-4c9e-9295-ae70e625b7b5" -client_id = "08fc0a12-876f-4406-af6e-c6c3de04dfab" -client_secret = "9lV8Q~egb-8ZqUQwhUQn4-pr5D6vlh9u.VU9ocKr" -tenant_id = "f958e84a-92b8-439f-a62d-4f45996b6d07" +subscription_id = "7205ab75-14d1-47f5-9d1b-4a6d61efe05d" +client_id = "0f73e563-d345-404b-a772-8894a20365dd" +client_secret = "859d08d7-8757-4a56-945f-bcae7e8868d7" +tenant_id = "514cd75c-be1c-45da-8ad0-46bb2c5e4502" # Resource Group/Location location = "West Europe" From cfb124b59d38a08d1de1cc4f9ffdb61f8077be3c Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 29 Jun 2023 14:05:22 +0200 Subject: [PATCH 044/110] update client data and vm --- terraform/environments/test/terraform.tfvars | 4 ++-- terraform/modules/vm/vm.tf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 9d36676e9..1ce685029 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,7 +1,7 @@ # Azure subscription vars subscription_id = "7205ab75-14d1-47f5-9d1b-4a6d61efe05d" -client_id = "0f73e563-d345-404b-a772-8894a20365dd" -client_secret = "859d08d7-8757-4a56-945f-bcae7e8868d7" +client_id = "91e9c6be-fcf4-44e3-9edb-1efbf8dffe2b" +client_secret = "vAd8Q~DjWarWseO458jToQsJBghH7S9-LPTXSbIN" tenant_id = "514cd75c-be1c-45da-8ad0-46bb2c5e4502" # Resource Group/Location diff --git a/terraform/modules/vm/vm.tf b/terraform/modules/vm/vm.tf index 81ce034d6..48d628c27 100644 --- a/terraform/modules/vm/vm.tf +++ b/terraform/modules/vm/vm.tf @@ -16,7 +16,7 @@ resource "azurerm_linux_virtual_machine" "test" { name = "${var.application_type}-${var.resource_type}" location = "${var.location}" resource_group_name = "${var.resource_group}" - size = "Standard_DS1_v2" + size = "Standard_B1s" admin_username = "adminuser" admin_password = "adminuserP@55" disable_password_authentication = "false" From 6bd052c770fc9757475ef617bd33d3ee2cd93769 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 29 Jun 2023 14:09:59 +0200 Subject: [PATCH 045/110] update auth data --- terraform/environments/test/terraform.tfvars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 1ce685029..5925198aa 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,6 +1,6 @@ # Azure subscription vars subscription_id = "7205ab75-14d1-47f5-9d1b-4a6d61efe05d" -client_id = "91e9c6be-fcf4-44e3-9edb-1efbf8dffe2b" +client_id = "0f73e563-d345-404b-a772-8894a20365dd" client_secret = "vAd8Q~DjWarWseO458jToQsJBghH7S9-LPTXSbIN" tenant_id = "514cd75c-be1c-45da-8ad0-46bb2c5e4502" From 48937aaa0f08e1e0ae0327ef6962aec483fad90a Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 29 Jun 2023 14:13:22 +0200 Subject: [PATCH 046/110] change secret --- terraform/environments/test/terraform.tfvars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 5925198aa..16ed04e04 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,7 +1,7 @@ # Azure subscription vars subscription_id = "7205ab75-14d1-47f5-9d1b-4a6d61efe05d" client_id = "0f73e563-d345-404b-a772-8894a20365dd" -client_secret = "vAd8Q~DjWarWseO458jToQsJBghH7S9-LPTXSbIN" +client_secret = "91e9c6be-fcf4-44e3-9edb-1efbf8dffe2b" tenant_id = "514cd75c-be1c-45da-8ad0-46bb2c5e4502" # Resource Group/Location From a57170e11917f5538c553a865beec3feb9d2e5d7 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 29 Jun 2023 14:16:28 +0200 Subject: [PATCH 047/110] new secret --- terraform/environments/test/terraform.tfvars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 16ed04e04..5925198aa 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,7 +1,7 @@ # Azure subscription vars subscription_id = "7205ab75-14d1-47f5-9d1b-4a6d61efe05d" client_id = "0f73e563-d345-404b-a772-8894a20365dd" -client_secret = "91e9c6be-fcf4-44e3-9edb-1efbf8dffe2b" +client_secret = "vAd8Q~DjWarWseO458jToQsJBghH7S9-LPTXSbIN" tenant_id = "514cd75c-be1c-45da-8ad0-46bb2c5e4502" # Resource Group/Location From d7bbf4c0249efbbe6b1b6caa2f09f338b0a5e093 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 29 Jun 2023 15:06:29 +0200 Subject: [PATCH 048/110] update new auth datat --- terraform/environments/test/main.tf | 4 ++-- terraform/environments/test/terraform.tfvars | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/terraform/environments/test/main.tf b/terraform/environments/test/main.tf index b18441154..4035535b2 100644 --- a/terraform/environments/test/main.tf +++ b/terraform/environments/test/main.tf @@ -8,10 +8,10 @@ provider "azurerm" { terraform { backend "azurerm" { - storage_account_name = "tfstate2367619412" + storage_account_name = "tfstate635024562" container_name = "tfstate" key = "test.terraform.tfstate" - access_key = "KJNbtO/gSvfRIj0KtxeCVNmExKzvNNpT0mJGkFVKl8PdLYRPjjlgxgvChJzO+BZHad927lGyARvh+AStVBcP/w==" + access_key = "qXly88km6RjjLdisH+W+rvJxRQCqLOjuAGVd1AdZ0SfFvNsjuYJ/mYU2UzpHe2pl6hr0Ncsbu5cg+AStAEYcag==" } } diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 5925198aa..b5b47d685 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,11 +1,11 @@ # Azure subscription vars subscription_id = "7205ab75-14d1-47f5-9d1b-4a6d61efe05d" -client_id = "0f73e563-d345-404b-a772-8894a20365dd" -client_secret = "vAd8Q~DjWarWseO458jToQsJBghH7S9-LPTXSbIN" +client_id = "33af7a93-cad9-4d2b-9ad1-5ddfe687a258" +client_secret = "BST8Q~f2kiW_a_2onR7JhPSHRCYNrkf5aG9ETalf" tenant_id = "514cd75c-be1c-45da-8ad0-46bb2c5e4502" # Resource Group/Location -location = "West Europe" +location = "Poland Central" resource_group_name = "Azuredevops" resource_group = "Azuredevops" application_type = "wsApplication" From 31dcf6f225c3ee3fd8d12b5d21586a55d6827da1 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 10:46:12 +0200 Subject: [PATCH 049/110] update auth data --- .../environments/test/.terraform.lock.hcl | 26 +++++++++---------- .../environments/test/.terraform.lock.hcl_OLD | 21 +++++++++++++++ terraform/environments/test/terraform.tfvars | 4 +-- 3 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 terraform/environments/test/.terraform.lock.hcl_OLD diff --git a/terraform/environments/test/.terraform.lock.hcl b/terraform/environments/test/.terraform.lock.hcl index 9c5cb0b7a..829d55b36 100644 --- a/terraform/environments/test/.terraform.lock.hcl +++ b/terraform/environments/test/.terraform.lock.hcl @@ -2,20 +2,20 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/azurerm" { - version = "3.61.0" + version = "3.62.1" hashes = [ - "h1:G++oC5Nm5ch7HL0Ty7U0/roQzKDlDilkSeRYfbeAu3w=", - "zh:1441e4e9b63801bc2432b1c06e0d202e66946c57abbf553d7f88fba5986e8f59", - "zh:291f0db2808724119a079f9a30254dbeae4a450dbacdd8bbb821d9332b842b25", - "zh:3069754dece944a9a5b2b5394e09bc393a22211951a73a1fdccc5c9fa41785d2", - "zh:4c6502f93da330d4b91ff2fbf198700619566386fd92c17ad14492b78a135403", - "zh:5f0fe6ca017b30534362e2ffcab03bcad9f08b59485948ba751248ee4b7deb7d", - "zh:76cdce8bb5fc73b65a21fb7eae943096397c53acda30fbe5da2892c92dabd3f9", - "zh:8f990887703da526d71ba25dcc259797e763397f23c3c04003c0706893db474c", - "zh:90854ec0570367b0d0c29e69f7426aca6dd85e6a3f8e3ed108ab5570311e587c", - "zh:a9450a8e1e45a577a62f252b383fe6a7159ee782a16ed8142377264b86e47fa4", - "zh:cc228b766a089be615e5d8b88342670a6a4cd05d44eb535232b8613c8d23218b", - "zh:d817088f245dce195c25492f6b2c8c26f02fd863cb5da5b689733b7c6bba3559", + "h1:8Heu+e/63p83nwN7d3k1O3FpHGnWxzE91r1JW5sHD2Q=", + "zh:0fa21ac98474f3a2aeab1191628735ddf1fdb0767f935e8b0f7e259a335773cd", + "zh:45ca710ffc39d194e0a29ca6983117a180302f3e1babb425257a23a1f38bb974", + "zh:481fd2ace1cf52ebae940ec8c66d025d2582af3aaf67340b6afbfa7a19b86864", + "zh:4fd32a7442f052fdf48ce6379f001581312a3ca7a10da837ee1c4e46c2f882dc", + "zh:507fff425b941a0fd53a57a4b79763183d37fac7ba3d4aa46a74dadf13ee5ced", + "zh:a09964b92e227cbceec7bf62e92bb71638b74738e465e5dafd75899a3c098eab", + "zh:a64ac7583675b0e704c6d6d1de31595e99ac7c270fd3e180d5f50d3f81f18801", + "zh:b20f4dbbd39aab6a3833541704771794790485ce62a85730f1cd671cf064ea8a", + "zh:d03b5c537e40fae12a9dd7750f0e29820b54f58efb1be1c7005ffb0ad70c6876", + "zh:ed19a03b3da4dfc000d278ffe986c5b3ab7114ccbe1d59e8bd474f065cfad377", + "zh:f53bb11e7be3d109f8763cb90910d79044693be35968c06eb31aa48f5375db31", "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", ] } diff --git a/terraform/environments/test/.terraform.lock.hcl_OLD b/terraform/environments/test/.terraform.lock.hcl_OLD new file mode 100644 index 000000000..9c5cb0b7a --- /dev/null +++ b/terraform/environments/test/.terraform.lock.hcl_OLD @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/azurerm" { + version = "3.61.0" + hashes = [ + "h1:G++oC5Nm5ch7HL0Ty7U0/roQzKDlDilkSeRYfbeAu3w=", + "zh:1441e4e9b63801bc2432b1c06e0d202e66946c57abbf553d7f88fba5986e8f59", + "zh:291f0db2808724119a079f9a30254dbeae4a450dbacdd8bbb821d9332b842b25", + "zh:3069754dece944a9a5b2b5394e09bc393a22211951a73a1fdccc5c9fa41785d2", + "zh:4c6502f93da330d4b91ff2fbf198700619566386fd92c17ad14492b78a135403", + "zh:5f0fe6ca017b30534362e2ffcab03bcad9f08b59485948ba751248ee4b7deb7d", + "zh:76cdce8bb5fc73b65a21fb7eae943096397c53acda30fbe5da2892c92dabd3f9", + "zh:8f990887703da526d71ba25dcc259797e763397f23c3c04003c0706893db474c", + "zh:90854ec0570367b0d0c29e69f7426aca6dd85e6a3f8e3ed108ab5570311e587c", + "zh:a9450a8e1e45a577a62f252b383fe6a7159ee782a16ed8142377264b86e47fa4", + "zh:cc228b766a089be615e5d8b88342670a6a4cd05d44eb535232b8613c8d23218b", + "zh:d817088f245dce195c25492f6b2c8c26f02fd863cb5da5b689733b7c6bba3559", + "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + ] +} diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index b5b47d685..e1228a033 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -1,7 +1,7 @@ # Azure subscription vars subscription_id = "7205ab75-14d1-47f5-9d1b-4a6d61efe05d" -client_id = "33af7a93-cad9-4d2b-9ad1-5ddfe687a258" -client_secret = "BST8Q~f2kiW_a_2onR7JhPSHRCYNrkf5aG9ETalf" +client_id = "fa872483-d4d2-41ce-97f1-606ef9a70b5d" +client_secret = "YNf8Q~K7icfuDFQE~gL1NJ4En~eO32nTARW.2adD" tenant_id = "514cd75c-be1c-45da-8ad0-46bb2c5e4502" # Resource Group/Location From 11817d3cbd7fb7f854ea7c4767ab1edd47ca8b17 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 10:53:02 +0200 Subject: [PATCH 050/110] update app name --- .../environments/test/.terraform.lock.hcl | 26 +++++++++---------- .../environments/test/.terraform.lock.hcl_OLD | 21 --------------- terraform/environments/test/terraform.tfvars | 2 +- 3 files changed, 14 insertions(+), 35 deletions(-) delete mode 100644 terraform/environments/test/.terraform.lock.hcl_OLD diff --git a/terraform/environments/test/.terraform.lock.hcl b/terraform/environments/test/.terraform.lock.hcl index 829d55b36..41f6c42fe 100644 --- a/terraform/environments/test/.terraform.lock.hcl +++ b/terraform/environments/test/.terraform.lock.hcl @@ -2,20 +2,20 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/azurerm" { - version = "3.62.1" + version = "3.63.0" hashes = [ - "h1:8Heu+e/63p83nwN7d3k1O3FpHGnWxzE91r1JW5sHD2Q=", - "zh:0fa21ac98474f3a2aeab1191628735ddf1fdb0767f935e8b0f7e259a335773cd", - "zh:45ca710ffc39d194e0a29ca6983117a180302f3e1babb425257a23a1f38bb974", - "zh:481fd2ace1cf52ebae940ec8c66d025d2582af3aaf67340b6afbfa7a19b86864", - "zh:4fd32a7442f052fdf48ce6379f001581312a3ca7a10da837ee1c4e46c2f882dc", - "zh:507fff425b941a0fd53a57a4b79763183d37fac7ba3d4aa46a74dadf13ee5ced", - "zh:a09964b92e227cbceec7bf62e92bb71638b74738e465e5dafd75899a3c098eab", - "zh:a64ac7583675b0e704c6d6d1de31595e99ac7c270fd3e180d5f50d3f81f18801", - "zh:b20f4dbbd39aab6a3833541704771794790485ce62a85730f1cd671cf064ea8a", - "zh:d03b5c537e40fae12a9dd7750f0e29820b54f58efb1be1c7005ffb0ad70c6876", - "zh:ed19a03b3da4dfc000d278ffe986c5b3ab7114ccbe1d59e8bd474f065cfad377", - "zh:f53bb11e7be3d109f8763cb90910d79044693be35968c06eb31aa48f5375db31", + "h1:x5r2Vg60nZa2Q92f/E7og1jNZb6eqsv0vZcWdzWnY3E=", + "zh:0bb8263de0abf1a7457168673f9fcf7e404ae59d03d0e8eda91f1e024f8d9253", + "zh:24dd5883c95801f2d4a88be22b9a3bb4e20de7b6b65e8b7cc90b12a0895d7adf", + "zh:4fe19fe81a68811d09d33aeea05f20987bef84dc7377c4b34782b94dda2c658f", + "zh:673fcd9d15b3f1307a1c41323598678b9a705751851d0f65e6abdf78c9e5361f", + "zh:6c401d348d04436ed891482c3e2151c34d6fbce0a6ee8880c6025de589e22e9a", + "zh:6f6b9909d62e9928d56b1d02c88a514d45022fae72048166e58e288759c73493", + "zh:7de2aa6636ba657166ef992a3b7a822394a2d1f8c319fdbabec69b99950990ea", + "zh:976ca97ab21708f8707c360c18dc64c03a6e497b7a157bb0ff7a8a54c03ebc55", + "zh:af220c20ce6e76c4c072fbc9aa3c02597260117ba7deaa0e0d585fb1957a775b", "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + "zh:fb4055762069cf0f58a36110853811f63e52c7077e332d8731a66fade1ba9f15", + "zh:fc95c1c80e98c317ec38fa33d16d55b5a62058dc893fbf578d100fb91401356e", ] } diff --git a/terraform/environments/test/.terraform.lock.hcl_OLD b/terraform/environments/test/.terraform.lock.hcl_OLD deleted file mode 100644 index 9c5cb0b7a..000000000 --- a/terraform/environments/test/.terraform.lock.hcl_OLD +++ /dev/null @@ -1,21 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/azurerm" { - version = "3.61.0" - hashes = [ - "h1:G++oC5Nm5ch7HL0Ty7U0/roQzKDlDilkSeRYfbeAu3w=", - "zh:1441e4e9b63801bc2432b1c06e0d202e66946c57abbf553d7f88fba5986e8f59", - "zh:291f0db2808724119a079f9a30254dbeae4a450dbacdd8bbb821d9332b842b25", - "zh:3069754dece944a9a5b2b5394e09bc393a22211951a73a1fdccc5c9fa41785d2", - "zh:4c6502f93da330d4b91ff2fbf198700619566386fd92c17ad14492b78a135403", - "zh:5f0fe6ca017b30534362e2ffcab03bcad9f08b59485948ba751248ee4b7deb7d", - "zh:76cdce8bb5fc73b65a21fb7eae943096397c53acda30fbe5da2892c92dabd3f9", - "zh:8f990887703da526d71ba25dcc259797e763397f23c3c04003c0706893db474c", - "zh:90854ec0570367b0d0c29e69f7426aca6dd85e6a3f8e3ed108ab5570311e587c", - "zh:a9450a8e1e45a577a62f252b383fe6a7159ee782a16ed8142377264b86e47fa4", - "zh:cc228b766a089be615e5d8b88342670a6a4cd05d44eb535232b8613c8d23218b", - "zh:d817088f245dce195c25492f6b2c8c26f02fd863cb5da5b689733b7c6bba3559", - "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", - ] -} diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index e1228a033..9c6a4d206 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -8,7 +8,7 @@ tenant_id = "514cd75c-be1c-45da-8ad0-46bb2c5e4502" location = "Poland Central" resource_group_name = "Azuredevops" resource_group = "Azuredevops" -application_type = "wsApplication" +application_type = "wsApplication_v1" # Network virtual_network_name = "myVNet" From 67a1a1bc1e0aa776bc9d6f942cf30be24506eb0d Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 10:54:18 +0200 Subject: [PATCH 051/110] update app name --- terraform/environments/test/terraform.tfvars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 9c6a4d206..1e949cf62 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -8,7 +8,7 @@ tenant_id = "514cd75c-be1c-45da-8ad0-46bb2c5e4502" location = "Poland Central" resource_group_name = "Azuredevops" resource_group = "Azuredevops" -application_type = "wsApplication_v1" +application_type = "wswebApplication" # Network virtual_network_name = "myVNet" From 7a88427c18273eb4d17b04de727886134ac8ca40 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 12:57:59 +0200 Subject: [PATCH 052/110] update tfstate disk --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index bfba803a9..87100b448 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -47,7 +47,7 @@ stages: workingDirectory: '$(System.DefaultWorkingDirectory)/terraform/environments/test' backendServiceArm: '$(azureServiceConnectionId)' backendAzureRmResourceGroupName: 'Azuredevops' - backendAzureRmStorageAccountName: 'tfstate2968829927' + backendAzureRmStorageAccountName: 'tfstate635024562' backendAzureRmContainerName: 'tfstate' backendAzureRmKey: 'test.terraform.tfstate' From 889e86027025f22aaca0db03bfd8c53b8f9105ec Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 13:38:06 +0200 Subject: [PATCH 053/110] add file for postman From dcbac7603ad662f3f754a5a4aced70117ea3fe0f Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 13:41:06 +0200 Subject: [PATCH 054/110] add postman file From fee46f8daec7e05f1496497827f6de71130c3f68 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 13:49:36 +0200 Subject: [PATCH 055/110] add file 2222 --- azure-pipelines.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 87100b448..9c9d582ee 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -103,6 +103,7 @@ stages: workingDirectory: $(System.DefaultWorkingDirectory) # Postman Data Validation Test Suite # ToDo: Verify the working directory + #NIE DZIAŁĄ - task: CmdLine@2 displayName: Run Data Validation Tests continueOnError: true From 2e5d1e4bf80bf31fe4fe1f53fcf40246241cc002 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 13:50:51 +0200 Subject: [PATCH 056/110] ooo --- automatedtesting/postman/StarterAPIs.json | 1 + 1 file changed, 1 insertion(+) diff --git a/automatedtesting/postman/StarterAPIs.json b/automatedtesting/postman/StarterAPIs.json index f19e4d2c1..9cbee8d1b 100644 --- a/automatedtesting/postman/StarterAPIs.json +++ b/automatedtesting/postman/StarterAPIs.json @@ -1,3 +1,4 @@ +#NIE NAPISZE { "info": { "_postman_id": "968b3a18-cc72-48a2-9b6b-e8619b4aaca8", From 30035fafa15b2a908359563a45692dc89438f255 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 13:58:02 +0200 Subject: [PATCH 057/110] add test file --- .../postman/Test.environment.json | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 automatedtesting/postman/Test.environment.json diff --git a/automatedtesting/postman/Test.environment.json b/automatedtesting/postman/Test.environment.json new file mode 100644 index 000000000..f19e4d2c1 --- /dev/null +++ b/automatedtesting/postman/Test.environment.json @@ -0,0 +1,94 @@ +{ + "info": { + "_postman_id": "968b3a18-cc72-48a2-9b6b-e8619b4aaca8", + "name": "Starter APIs", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "Create Employee", + "event": [ + { + "listen": "test", + "script": { + "id": "38b1717c-45ae-477f-8dae-8e889ba381d5", + "exec": [ + "pm.test(\"Successful response\", function () {", + " pm.expect(pm.response.text()).to.include(\"success\");", + "});", + "var json = pm.response.json();", + "pm.environment.set(\"id\", json.data.id);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"{{name}}\",\n \"salary\": \"{{salary}}\",\n \"age\": \"{{age}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://dummy.restapiexample.com/api/v1/create", + "protocol": "http", + "host": [ + "dummy", + "restapiexample", + "com" + ], + "path": [ + "api", + "v1", + "create" + ] + } + }, + "response": [] + }, + { + "name": "Get All Employees", + "event": [ + { + "listen": "test", + "script": { + "id": "af3cb111-e3ac-4174-b8ca-7f4127a0285d", + "exec": [ + "pm.test(\"Successful response\", function () {", + " pm.expect(pm.response.text()).to.include(\"success\");", + "});", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://dummy.restapiexample.com/api/v1/employees", + "protocol": "http", + "host": [ + "dummy", + "restapiexample", + "com" + ], + "path": [ + "api", + "v1", + "employees" + ] + } + }, + "response": [] + } + ], + "protocolProfileBehavior": {} +} \ No newline at end of file From 17fa9c3330fa3e9e5e61a42843e3b552c6378b4f Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 13:58:26 +0200 Subject: [PATCH 058/110] file t --- automatedtesting/postman/StarterAPIs.json | 1 - 1 file changed, 1 deletion(-) diff --git a/automatedtesting/postman/StarterAPIs.json b/automatedtesting/postman/StarterAPIs.json index 9cbee8d1b..f19e4d2c1 100644 --- a/automatedtesting/postman/StarterAPIs.json +++ b/automatedtesting/postman/StarterAPIs.json @@ -1,4 +1,3 @@ -#NIE NAPISZE { "info": { "_postman_id": "968b3a18-cc72-48a2-9b6b-e8619b4aaca8", From 4c9008e48c1a18ab85c2583f9c2eb872fe4068b7 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 14:13:36 +0200 Subject: [PATCH 059/110] ad empty files --- .../postman/TestSuite.Data-Validation.json | 37 +++++++++++++++++++ .../postman/TestSuite.regression.json | 0 2 files changed, 37 insertions(+) create mode 100644 automatedtesting/postman/TestSuite.Data-Validation.json create mode 100644 automatedtesting/postman/TestSuite.regression.json diff --git a/automatedtesting/postman/TestSuite.Data-Validation.json b/automatedtesting/postman/TestSuite.Data-Validation.json new file mode 100644 index 000000000..21e07df1a --- /dev/null +++ b/automatedtesting/postman/TestSuite.Data-Validation.json @@ -0,0 +1,37 @@ +[ + { + "postId": 1, + "id": 1, + "name": "id labore ex et quam laborum", + "email": "Eliseo@gardner.biz", + "body": "laudantium enim quasi est quidem magnam voluptate ipsam eos\ntempora quo necessitatibus\ndolor quam autem quasi\nreiciendis et nam sapiente accusantium" + }, + { + "postId": 1, + "id": 2, + "name": "quo vero reiciendis velit similique earum", + "email": "Jayne_Kuhic@sydney.com", + "body": "est natus enim nihil est dolore omnis voluptatem numquam\net omnis occaecati quod ullam at\nvoluptatem error expedita pariatur\nnihil sint nostrum voluptatem reiciendis et" + }, + { + "postId": 1, + "id": 3, + "name": "odio adipisci rerum aut animi", + "email": "Nikita@garfield.biz", + "body": "quia molestiae reprehenderit quasi aspernatur\naut expedita occaecati aliquam eveniet laudantium\nomnis quibusdam delectus saepe quia accusamus maiores nam est\ncum et ducimus et vero voluptates excepturi deleniti ratione" + }, + { + "postId": 1, + "id": 4, + "name": "alias odio sit", + "email": "Lew@alysha.tv", + "body": "non et atque\noccaecati deserunt quas accusantium unde odit nobis qui voluptatem\nquia voluptas consequuntur itaque dolor\net qui rerum deleniti ut occaecati" + }, + { + "postId": 1, + "id": 5, + "name": "vero eaque aliquid doloribus et culpa", + "email": "Hayden@althea.biz", + "body": "harum non quasi et ratione\ntempore iure ex voluptates in ratione\nharum architecto fugit inventore cupiditate\nvoluptates magni quo et" + } + ] \ No newline at end of file diff --git a/automatedtesting/postman/TestSuite.regression.json b/automatedtesting/postman/TestSuite.regression.json new file mode 100644 index 000000000..e69de29bb From 7ffe0100d5d72ec82f1e3e8e59a0b80d06f6df03 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 14:21:08 +0200 Subject: [PATCH 060/110] update postman data --- .../postman/TestSuite.Data-Validation.json | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/automatedtesting/postman/TestSuite.Data-Validation.json b/automatedtesting/postman/TestSuite.Data-Validation.json index 21e07df1a..746e86069 100644 --- a/automatedtesting/postman/TestSuite.Data-Validation.json +++ b/automatedtesting/postman/TestSuite.Data-Validation.json @@ -2,36 +2,36 @@ { "postId": 1, "id": 1, - "name": "id labore ex et quam laborum", - "email": "Eliseo@gardner.biz", - "body": "laudantium enim quasi est quidem magnam voluptate ipsam eos\ntempora quo necessitatibus\ndolor quam autem quasi\nreiciendis et nam sapiente accusantium" + "name": "Labore Laborum", + "salary": "1000", + "age": "34" }, { "postId": 1, "id": 2, - "name": "quo vero reiciendis velit similique earum", - "email": "Jayne_Kuhic@sydney.com", - "body": "est natus enim nihil est dolore omnis voluptatem numquam\net omnis occaecati quod ullam at\nvoluptatem error expedita pariatur\nnihil sint nostrum voluptatem reiciendis et" + "name": "Reiciendis Earum", + "salary": "1200", + "age": "26" }, { "postId": 1, "id": 3, - "name": "odio adipisci rerum aut animi", - "email": "Nikita@garfield.biz", - "body": "quia molestiae reprehenderit quasi aspernatur\naut expedita occaecati aliquam eveniet laudantium\nomnis quibusdam delectus saepe quia accusamus maiores nam est\ncum et ducimus et vero voluptates excepturi deleniti ratione" + "name": "Adipisci Animi", + "salary": "3500", + "age": "55" }, { "postId": 1, "id": 4, - "name": "alias odio sit", - "email": "Lew@alysha.tv", - "body": "non et atque\noccaecati deserunt quas accusantium unde odit nobis qui voluptatem\nquia voluptas consequuntur itaque dolor\net qui rerum deleniti ut occaecati" + "name": "Alias Sit", + "salary": "2100", + "age": "42" }, { "postId": 1, "id": 5, - "name": "vero eaque aliquid doloribus et culpa", - "email": "Hayden@althea.biz", - "body": "harum non quasi et ratione\ntempore iure ex voluptates in ratione\nharum architecto fugit inventore cupiditate\nvoluptates magni quo et" + "name": "Vero Eaque", + "salary": "4243", + "age": "47" } ] \ No newline at end of file From 6b967576dbd68457d1e7af337312cf025bcfa270 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 14:23:30 +0200 Subject: [PATCH 061/110] update regression data --- .../postman/TestSuite.regression.json | 37 +++++++++++++++++++ azure-pipelines.yaml | 1 - 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/automatedtesting/postman/TestSuite.regression.json b/automatedtesting/postman/TestSuite.regression.json index e69de29bb..746e86069 100644 --- a/automatedtesting/postman/TestSuite.regression.json +++ b/automatedtesting/postman/TestSuite.regression.json @@ -0,0 +1,37 @@ +[ + { + "postId": 1, + "id": 1, + "name": "Labore Laborum", + "salary": "1000", + "age": "34" + }, + { + "postId": 1, + "id": 2, + "name": "Reiciendis Earum", + "salary": "1200", + "age": "26" + }, + { + "postId": 1, + "id": 3, + "name": "Adipisci Animi", + "salary": "3500", + "age": "55" + }, + { + "postId": 1, + "id": 4, + "name": "Alias Sit", + "salary": "2100", + "age": "42" + }, + { + "postId": 1, + "id": 5, + "name": "Vero Eaque", + "salary": "4243", + "age": "47" + } + ] \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 9c9d582ee..87100b448 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -103,7 +103,6 @@ stages: workingDirectory: $(System.DefaultWorkingDirectory) # Postman Data Validation Test Suite # ToDo: Verify the working directory - #NIE DZIAŁĄ - task: CmdLine@2 displayName: Run Data Validation Tests continueOnError: true From 378ac60f8e1ad2977e30068ce22057697bd3599b Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 14:25:30 +0200 Subject: [PATCH 062/110] remove file --- .../postman/TestSuite.regression.json | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 automatedtesting/postman/TestSuite.regression.json diff --git a/automatedtesting/postman/TestSuite.regression.json b/automatedtesting/postman/TestSuite.regression.json deleted file mode 100644 index 746e86069..000000000 --- a/automatedtesting/postman/TestSuite.regression.json +++ /dev/null @@ -1,37 +0,0 @@ -[ - { - "postId": 1, - "id": 1, - "name": "Labore Laborum", - "salary": "1000", - "age": "34" - }, - { - "postId": 1, - "id": 2, - "name": "Reiciendis Earum", - "salary": "1200", - "age": "26" - }, - { - "postId": 1, - "id": 3, - "name": "Adipisci Animi", - "salary": "3500", - "age": "55" - }, - { - "postId": 1, - "id": 4, - "name": "Alias Sit", - "salary": "2100", - "age": "42" - }, - { - "postId": 1, - "id": 5, - "name": "Vero Eaque", - "salary": "4243", - "age": "47" - } - ] \ No newline at end of file From a0586195fa1f9c917d62d03d2d049a27ed4cfa7b Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 30 Jun 2023 14:26:42 +0200 Subject: [PATCH 063/110] add Regression file --- .../postman/TestSuite.Regression.json | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 automatedtesting/postman/TestSuite.Regression.json diff --git a/automatedtesting/postman/TestSuite.Regression.json b/automatedtesting/postman/TestSuite.Regression.json new file mode 100644 index 000000000..746e86069 --- /dev/null +++ b/automatedtesting/postman/TestSuite.Regression.json @@ -0,0 +1,37 @@ +[ + { + "postId": 1, + "id": 1, + "name": "Labore Laborum", + "salary": "1000", + "age": "34" + }, + { + "postId": 1, + "id": 2, + "name": "Reiciendis Earum", + "salary": "1200", + "age": "26" + }, + { + "postId": 1, + "id": 3, + "name": "Adipisci Animi", + "salary": "3500", + "age": "55" + }, + { + "postId": 1, + "id": 4, + "name": "Alias Sit", + "salary": "2100", + "age": "42" + }, + { + "postId": 1, + "id": 5, + "name": "Vero Eaque", + "salary": "4243", + "age": "47" + } + ] \ No newline at end of file From 568f342638917b9ffde171b52406767aadaa2612 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 7 Jul 2023 15:28:06 +0200 Subject: [PATCH 064/110] fill up part TO DO --- automatedtesting/postman/StarterAPIs.json | 94 ----------------------- azure-pipelines.yaml | 4 +- 2 files changed, 2 insertions(+), 96 deletions(-) delete mode 100644 automatedtesting/postman/StarterAPIs.json diff --git a/automatedtesting/postman/StarterAPIs.json b/automatedtesting/postman/StarterAPIs.json deleted file mode 100644 index f19e4d2c1..000000000 --- a/automatedtesting/postman/StarterAPIs.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "info": { - "_postman_id": "968b3a18-cc72-48a2-9b6b-e8619b4aaca8", - "name": "Starter APIs", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "Create Employee", - "event": [ - { - "listen": "test", - "script": { - "id": "38b1717c-45ae-477f-8dae-8e889ba381d5", - "exec": [ - "pm.test(\"Successful response\", function () {", - " pm.expect(pm.response.text()).to.include(\"success\");", - "});", - "var json = pm.response.json();", - "pm.environment.set(\"id\", json.data.id);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"{{name}}\",\n \"salary\": \"{{salary}}\",\n \"age\": \"{{age}}\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://dummy.restapiexample.com/api/v1/create", - "protocol": "http", - "host": [ - "dummy", - "restapiexample", - "com" - ], - "path": [ - "api", - "v1", - "create" - ] - } - }, - "response": [] - }, - { - "name": "Get All Employees", - "event": [ - { - "listen": "test", - "script": { - "id": "af3cb111-e3ac-4174-b8ca-7f4127a0285d", - "exec": [ - "pm.test(\"Successful response\", function () {", - " pm.expect(pm.response.text()).to.include(\"success\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "http://dummy.restapiexample.com/api/v1/employees", - "protocol": "http", - "host": [ - "dummy", - "restapiexample", - "com" - ], - "path": [ - "api", - "v1", - "employees" - ] - } - }, - "response": [] - } - ], - "protocolProfileBehavior": {} -} \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 87100b448..d078dcead 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -190,8 +190,8 @@ stages: - task: AzureWebApp@1 displayName: 'Deploy Azure Web App' inputs: - azureSubscription: '' # ToDo - appName: '' # ToDo + azureSubscription: 'Azure subscription 1' # ToDo + appName: 'wswebApplication-AppService' # ToDo appType: webApp package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. #--------------------------------------------# From 205fa14207ea1611a7857bb960feed1de851b056 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 7 Jul 2023 15:30:29 +0200 Subject: [PATCH 065/110] change AzSubrsription --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index d078dcead..49e359b51 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -190,7 +190,7 @@ stages: - task: AzureWebApp@1 displayName: 'Deploy Azure Web App' inputs: - azureSubscription: 'Azure subscription 1' # ToDo + azureSubscription: 'AzureRMconn' # ToDo appName: 'wswebApplication-AppService' # ToDo appType: webApp package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. From 98976a3ab393650691c92e414627c9a23a4efcef Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 7 Jul 2023 15:50:14 +0200 Subject: [PATCH 066/110] update conn auth --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 49e359b51..8828574e5 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -190,7 +190,7 @@ stages: - task: AzureWebApp@1 displayName: 'Deploy Azure Web App' inputs: - azureSubscription: 'AzureRMconn' # ToDo + azureSubscription: 'AzureRMconn3' # ToDo appName: 'wswebApplication-AppService' # ToDo appType: webApp package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. From 8bed8a876904b54f100b91e7dce2a2cc42f5fd50 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Fri, 7 Jul 2023 16:10:25 +0200 Subject: [PATCH 067/110] try this FakeRestAPI path --- azure-pipelines.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 8828574e5..21267fef1 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -193,7 +193,8 @@ stages: azureSubscription: 'AzureRMconn3' # ToDo appName: 'wswebApplication-AppService' # ToDo appType: webApp - package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. + package: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. +# package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. #--------------------------------------------# # Run JMeter test suite against the App Service - task: CmdLine@2 From c9bc3c211766006db733bb921bc3b8e99aa5cf1f Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 13:08:08 +0200 Subject: [PATCH 068/110] set up paths --- azure-pipelines.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 21267fef1..d02dc5fec 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -193,7 +193,7 @@ stages: azureSubscription: 'AzureRMconn3' # ToDo appName: 'wswebApplication-AppService' # ToDo appType: webApp - package: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. + package: $(Pipeline.Workspace)/a/27-fakerestapi.zip # ToDo: Use the published zip artifact. # package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. #--------------------------------------------# # Run JMeter test suite against the App Service @@ -205,7 +205,8 @@ stages: unzip -o $(Build.BuildId)-perftests.zip ./apache-jmeter-5.2.1/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands - workingDirectory: $(Pipeline.Workspace)/ # ToDo: Use the artifact name from the task above + workingDirectory: $(Pipeline.Workspace)/a # ToDo: Use the artifact name from the task above +# workingDirectory: $(Pipeline.Workspace)/ # ToDo: Use the artifact name from the task above #--------------------------------------------# # Selenium | Functional UI Tests From a6bd1b31a5269cb93c46e976a901f4d301b3655b Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 13:12:49 +0200 Subject: [PATCH 069/110] update fakerestapi path --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index d02dc5fec..fd3455f11 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -193,7 +193,7 @@ stages: azureSubscription: 'AzureRMconn3' # ToDo appName: 'wswebApplication-AppService' # ToDo appType: webApp - package: $(Pipeline.Workspace)/a/27-fakerestapi.zip # ToDo: Use the published zip artifact. + package: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. # package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. #--------------------------------------------# # Run JMeter test suite against the App Service From ae76cd39a4478b9f11de8d9aeb04b6907e4f0bb3 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 13:41:52 +0200 Subject: [PATCH 070/110] other paths for api --- azure-pipelines.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index fd3455f11..1f5fb742c 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -193,7 +193,8 @@ stages: azureSubscription: 'AzureRMconn3' # ToDo appName: 'wswebApplication-AppService' # ToDo appType: webApp - package: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. +# package: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. + package: $(Pipeline.Workspace)/drop-fakerestapi/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. # package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. #--------------------------------------------# # Run JMeter test suite against the App Service From f4332fb6363be90b5c69e47113fa7e828ebc1752 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 14:10:32 +0200 Subject: [PATCH 071/110] update url to jmeter --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1f5fb742c..e4175747c 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -194,14 +194,14 @@ stages: appName: 'wswebApplication-AppService' # ToDo appType: webApp # package: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. - package: $(Pipeline.Workspace)/drop-fakerestapi/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. + package: $(Pipeline.Workspace)/drop-fakerestapi/$(Build.BuildId)-fakerestapi # ToDo: Use the published zip artifact. # package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. #--------------------------------------------# # Run JMeter test suite against the App Service - task: CmdLine@2 inputs: script: | - wget "https://apache.mirrors.lucidnetworks.net//jmeter/binaries/apache-jmeter-5.2.1.tgz" + wget "https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.2.1.tgz" tar -xf apache-jmeter-5.2.1.tgz unzip -o $(Build.BuildId)-perftests.zip ./apache-jmeter-5.2.1/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f From 6c3c2c1fa1160efc97a3092a4f84c723d6158984 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 14:15:31 +0200 Subject: [PATCH 072/110] update file ext --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index e4175747c..38db92477 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -194,7 +194,7 @@ stages: appName: 'wswebApplication-AppService' # ToDo appType: webApp # package: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. - package: $(Pipeline.Workspace)/drop-fakerestapi/$(Build.BuildId)-fakerestapi # ToDo: Use the published zip artifact. + package: $(Pipeline.Workspace)/drop-fakerestapi/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. # package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. #--------------------------------------------# # Run JMeter test suite against the App Service @@ -206,7 +206,7 @@ stages: unzip -o $(Build.BuildId)-perftests.zip ./apache-jmeter-5.2.1/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands - workingDirectory: $(Pipeline.Workspace)/a # ToDo: Use the artifact name from the task above + workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/ # ToDo: Use the artifact name from the task above #--------------------------------------------# From ad147c86158c0a4908eb3a3969fec29e4855fc8a Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 14:20:16 +0200 Subject: [PATCH 073/110] update jmeter ver --- azure-pipelines.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 38db92477..b7ff632aa 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -201,10 +201,10 @@ stages: - task: CmdLine@2 inputs: script: | - wget "https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.2.1.tgz" - tar -xf apache-jmeter-5.2.1.tgz + wget "https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.6.tgz" + tar -xf apache-jmeter-5.6.tgz unzip -o $(Build.BuildId)-perftests.zip - ./apache-jmeter-5.2.1/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f + ./apache-jmeter-5.6/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/ # ToDo: Use the artifact name from the task above From 824dfdddba0125ce8beeec0fa58d3888dcb3fa93 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 14:27:43 +0200 Subject: [PATCH 074/110] change working dir --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b7ff632aa..1c509aa00 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -206,7 +206,7 @@ stages: unzip -o $(Build.BuildId)-perftests.zip ./apache-jmeter-5.6/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands - workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above + workingDirectory: $(Pipeline.Workspace)/a # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/ # ToDo: Use the artifact name from the task above #--------------------------------------------# From 19e724faa056e2625796758c39595cdeccac72bb Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 14:37:13 +0200 Subject: [PATCH 075/110] check path --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1c509aa00..66055a24c 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -203,7 +203,7 @@ stages: script: | wget "https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.6.tgz" tar -xf apache-jmeter-5.6.tgz - unzip -o $(Build.BuildId)-perftests.zip + unzip -o $(Pipeline.Workspace)/a/$(Build.BuildId)-perftests.zip ./apache-jmeter-5.6/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands workingDirectory: $(Pipeline.Workspace)/a # ToDo: Use the artifact name from the task above From 624c2ff6789d3cebd9306e135c303564627a4b3f Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 14:45:21 +0200 Subject: [PATCH 076/110] update path --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 66055a24c..1c509aa00 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -203,7 +203,7 @@ stages: script: | wget "https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.6.tgz" tar -xf apache-jmeter-5.6.tgz - unzip -o $(Pipeline.Workspace)/a/$(Build.BuildId)-perftests.zip + unzip -o $(Build.BuildId)-perftests.zip ./apache-jmeter-5.6/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands workingDirectory: $(Pipeline.Workspace)/a # ToDo: Use the artifact name from the task above From 123e1f6997e64c505872dd525c259b50b2d02461 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 15:10:51 +0200 Subject: [PATCH 077/110] change path to artigact name --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1c509aa00..b7ff632aa 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -206,7 +206,7 @@ stages: unzip -o $(Build.BuildId)-perftests.zip ./apache-jmeter-5.6/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands - workingDirectory: $(Pipeline.Workspace)/a # ToDo: Use the artifact name from the task above + workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/ # ToDo: Use the artifact name from the task above #--------------------------------------------# From 5fb4fa2eb482780a0131d038f70ea97270c05c72 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 15:54:37 +0200 Subject: [PATCH 078/110] change dirs --- azure-pipelines.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b7ff632aa..849988226 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -194,7 +194,8 @@ stages: appName: 'wswebApplication-AppService' # ToDo appType: webApp # package: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. - package: $(Pipeline.Workspace)/drop-fakerestapi/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. +# package: $(Pipeline.Workspace)/drop-fakerestapi/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. + package: $(Pipeline.Workspace)/a/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. # package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. #--------------------------------------------# # Run JMeter test suite against the App Service @@ -206,7 +207,8 @@ stages: unzip -o $(Build.BuildId)-perftests.zip ./apache-jmeter-5.6/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands - workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above + workingDirectory: $(Pipeline.Workspace)/a # ToDo: Use the artifact name from the task above +# workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/ # ToDo: Use the artifact name from the task above #--------------------------------------------# From ef1316b4a53fdbb42ed3249f9fa98dcaa6482640 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 16:00:19 +0200 Subject: [PATCH 079/110] try next 1 --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 849988226..c58f7c7d8 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -194,8 +194,8 @@ stages: appName: 'wswebApplication-AppService' # ToDo appType: webApp # package: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. -# package: $(Pipeline.Workspace)/drop-fakerestapi/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. - package: $(Pipeline.Workspace)/a/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. + package: $(Pipeline.Workspace)/drop-fakerestapi/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. +# package: $(Pipeline.Workspace)/a/$(Build.BuildId)-fakerestapi.zip # ToDo: Use the published zip artifact. # package: $(Pipeline.Workspace)// # ToDo: Use the published zip artifact. #--------------------------------------------# # Run JMeter test suite against the App Service From c4e7f85d4f654c6bc5520e4e52314454003c7d60 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 16:09:32 +0200 Subject: [PATCH 080/110] path try 2 --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index c58f7c7d8..bf70b5afc 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -207,7 +207,7 @@ stages: unzip -o $(Build.BuildId)-perftests.zip ./apache-jmeter-5.6/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands - workingDirectory: $(Pipeline.Workspace)/a # ToDo: Use the artifact name from the task above + workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/ # ToDo: Use the artifact name from the task above From 3d929885e18338be1238179888e5688db44ac6d2 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 16:20:37 +0200 Subject: [PATCH 081/110] try 3 --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index bf70b5afc..13e620de9 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -217,7 +217,7 @@ stages: - deployment: VMDeploy displayName: Selenium Tests environment: - name: linux-test # ToDo: Change/provide a name + name: "linux-test" # ToDo: Change/provide a name resourceType: VirtualMachine tags: selenium strategy: From bd8e3cda95e6f605f8ee49d00b29e8c68d0d1fff Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 16:24:57 +0200 Subject: [PATCH 082/110] change env name --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 13e620de9..896ab109f 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -217,7 +217,7 @@ stages: - deployment: VMDeploy displayName: Selenium Tests environment: - name: "linux-test" # ToDo: Change/provide a name + name: wswebApplication-VM # ToDo: Change/provide a name resourceType: VirtualMachine tags: selenium strategy: From 91a9b2645aa0b3423c3438c0259e01d1330ccd97 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 16:34:42 +0200 Subject: [PATCH 083/110] back --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 896ab109f..fda7342a0 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -136,7 +136,7 @@ stages: rootFolderOrFile: '$(System.DefaultWorkingDirectory)/automatedtesting/selenium' includeRootFolder: false archiveType: 'zip' - archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-uitests.zip' + archiveFile: '$(Buildx.ArtifactStagingDirectory)/$(Build.BuildId)-uitests.zip' # Selenium Test Suite - Publish the package - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-uitests.zip # Same as the archiveFile artifact above. displayName: 'Upload Package' @@ -217,7 +217,7 @@ stages: - deployment: VMDeploy displayName: Selenium Tests environment: - name: wswebApplication-VM # ToDo: Change/provide a name + name: linux-test # ToDo: Change/provide a name resourceType: VirtualMachine tags: selenium strategy: From e63d1f1c4e49c26d959d50bbde3678e3b899eab0 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 16:43:51 +0200 Subject: [PATCH 084/110] reapir error --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index fda7342a0..bf70b5afc 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -136,7 +136,7 @@ stages: rootFolderOrFile: '$(System.DefaultWorkingDirectory)/automatedtesting/selenium' includeRootFolder: false archiveType: 'zip' - archiveFile: '$(Buildx.ArtifactStagingDirectory)/$(Build.BuildId)-uitests.zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-uitests.zip' # Selenium Test Suite - Publish the package - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-uitests.zip # Same as the archiveFile artifact above. displayName: 'Upload Package' From 922379d261e0cd08d5423d28628766af336e2464 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 16:53:06 +0200 Subject: [PATCH 085/110] comment tags --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index bf70b5afc..a5848f004 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -219,7 +219,7 @@ stages: environment: name: linux-test # ToDo: Change/provide a name resourceType: VirtualMachine - tags: selenium + #tags: selenium strategy: runOnce: deploy: From 4a7172983a915b72809efae667ce0b362bcde4a0 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 16:57:20 +0200 Subject: [PATCH 086/110] update rName --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index a5848f004..608b1d5f0 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -217,7 +217,7 @@ stages: - deployment: VMDeploy displayName: Selenium Tests environment: - name: linux-test # ToDo: Change/provide a name + resourceName: linux-test # ToDo: Change/provide a name resourceType: VirtualMachine #tags: selenium strategy: From 05fa066294d122582b21889bc34566df7ea9f3b6 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 16:59:09 +0200 Subject: [PATCH 087/110] other name for selenium --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 608b1d5f0..3b19ab2c4 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -217,9 +217,9 @@ stages: - deployment: VMDeploy displayName: Selenium Tests environment: - resourceName: linux-test # ToDo: Change/provide a name + name: linux-test2 # ToDo: Change/provide a name resourceType: VirtualMachine - #tags: selenium + tags: selenium strategy: runOnce: deploy: From e4168bac0bf9f6cefd100c95e428dc198d51fd97 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Mon, 10 Jul 2023 17:03:30 +0200 Subject: [PATCH 088/110] back with name --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3b19ab2c4..ea7e8b216 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -217,7 +217,7 @@ stages: - deployment: VMDeploy displayName: Selenium Tests environment: - name: linux-test2 # ToDo: Change/provide a name + name: linux-test # ToDo: Change/provide a name resourceType: VirtualMachine tags: selenium strategy: From c59953c62e8d987e2cc2f25e6775d82ebc170bb2 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Sat, 15 Jul 2023 23:14:47 +0200 Subject: [PATCH 089/110] change artifact path --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index ea7e8b216..fe530264a 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -207,7 +207,7 @@ stages: unzip -o $(Build.BuildId)-perftests.zip ./apache-jmeter-5.6/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands - workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above + workingDirectory: $(Pipeline.Workspace)/drop-perftests # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/ # ToDo: Use the artifact name from the task above From 3922cfec60931e2810c48834ceeeb05add0a0156 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Sat, 15 Jul 2023 23:24:05 +0200 Subject: [PATCH 090/110] next change artifact --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index fe530264a..b8472c09d 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -225,7 +225,7 @@ stages: deploy: steps: - download: current - artifact: drop-ui-tests # ToDo: Change/provide a name + artifact: drop-uitests # ToDo: Change/provide a name - task: Bash@3 inputs: From 8ae487d1754adcff298208b3ab31569518faf038 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Sat, 15 Jul 2023 23:32:49 +0200 Subject: [PATCH 091/110] rename file jmx --- automatedtesting/jmeter/{Starter.jmx => PerformanceTestSuite.jmx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename automatedtesting/jmeter/{Starter.jmx => PerformanceTestSuite.jmx} (100%) diff --git a/automatedtesting/jmeter/Starter.jmx b/automatedtesting/jmeter/PerformanceTestSuite.jmx similarity index 100% rename from automatedtesting/jmeter/Starter.jmx rename to automatedtesting/jmeter/PerformanceTestSuite.jmx From 225ba76c84f714091db4a74b14a61bcd4327aaf5 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Sat, 15 Jul 2023 23:49:45 +0200 Subject: [PATCH 092/110] check with other path --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b8472c09d..d0cff684a 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -205,7 +205,7 @@ stages: wget "https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.6.tgz" tar -xf apache-jmeter-5.6.tgz unzip -o $(Build.BuildId)-perftests.zip - ./apache-jmeter-5.6/bin/jmeter -n -t PerformanceTestSuite.jmx -j jmeter.log -f + ./apache-jmeter-5.6/bin/jmeter -n -t Pautomatedtesting/jmeter/erformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands workingDirectory: $(Pipeline.Workspace)/drop-perftests # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above From afe8091b24b1726f7ccf2ccce88be6f5cbd20784 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Sat, 15 Jul 2023 23:57:34 +0200 Subject: [PATCH 093/110] reapir file name --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index d0cff684a..a34a05647 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -205,7 +205,7 @@ stages: wget "https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.6.tgz" tar -xf apache-jmeter-5.6.tgz unzip -o $(Build.BuildId)-perftests.zip - ./apache-jmeter-5.6/bin/jmeter -n -t Pautomatedtesting/jmeter/erformanceTestSuite.jmx -j jmeter.log -f + ./apache-jmeter-5.6/bin/jmeter -n -t automatedtesting/jmeter/PerformanceTestSuite.jmx -j jmeter.log -f cat jmeter.log # ToDo: Write your commands workingDirectory: $(Pipeline.Workspace)/drop-perftests # ToDo: Use the artifact name from the task above # workingDirectory: $(Pipeline.Workspace)/drop-fakerestapi # ToDo: Use the artifact name from the task above From 14c04b4dfb739569c41984c6e152f14c7d5f69d8 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Sun, 16 Jul 2023 00:07:49 +0200 Subject: [PATCH 094/110] change syntax --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index a34a05647..e501b806d 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -217,7 +217,7 @@ stages: - deployment: VMDeploy displayName: Selenium Tests environment: - name: linux-test # ToDo: Change/provide a name + name: "linux-test" # ToDo: Change/provide a name resourceType: VirtualMachine tags: selenium strategy: From 7ad036a86c0a13d17d725f0ef99922185e3f0db2 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 18 Jul 2023 13:25:43 +0200 Subject: [PATCH 095/110] update variables --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index e501b806d..a1ab89e2f 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -14,11 +14,11 @@ pool: myAgentPool variables: python.version: '3.7.6' # ToDo: Replace the service connection name as used in the DevOps project settings - azureServiceConnectionId: 'AzureRMconn' #'myServiceConnection' + azureServiceConnectionId: 'AzureRMconn3' #'myServiceConnection' # Project root folder. Point to the folder containing manage.py file. projectRoot: $(System.DefaultWorkingDirectory) # Environment name - environmentName: 'test' + environmentName: 'linux-test' stages: #--------------------------------------------# From 629e3c76574c6e8afac271372ac996289a90a6f7 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 18 Jul 2023 13:39:39 +0200 Subject: [PATCH 096/110] change VM name --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index a1ab89e2f..443adb81a 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -217,7 +217,7 @@ stages: - deployment: VMDeploy displayName: Selenium Tests environment: - name: "linux-test" # ToDo: Change/provide a name + name: "wswebApplication-VM" # ToDo: Change/provide a name resourceType: VirtualMachine tags: selenium strategy: From 85f8fcf40112d4f5db4bfd9cb3d9dbc846744659 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 18 Jul 2023 13:41:35 +0200 Subject: [PATCH 097/110] back env name --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 443adb81a..a1ab89e2f 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -217,7 +217,7 @@ stages: - deployment: VMDeploy displayName: Selenium Tests environment: - name: "wswebApplication-VM" # ToDo: Change/provide a name + name: "linux-test" # ToDo: Change/provide a name resourceType: VirtualMachine tags: selenium strategy: From b0c60f8cce96105d2ddff4013929361d77b2c39f Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 18 Jul 2023 15:29:10 +0200 Subject: [PATCH 098/110] remove tag --- azure-pipelines.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index a1ab89e2f..dcfa2fe95 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -19,6 +19,9 @@ variables: projectRoot: $(System.DefaultWorkingDirectory) # Environment name environmentName: 'linux-test' + parameters: + - name: envName + default: EnvironmentName stages: #--------------------------------------------# @@ -219,7 +222,7 @@ stages: environment: name: "linux-test" # ToDo: Change/provide a name resourceType: VirtualMachine - tags: selenium + # tags: selenium strategy: runOnce: deploy: From 9005593f7c3760c411fb8d6c99cab18b2b74fb1a Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Wed, 19 Jul 2023 10:03:57 +0200 Subject: [PATCH 099/110] update VMDeployment --- azure-pipelines.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index dcfa2fe95..136659c03 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -218,11 +218,13 @@ stages: # Selenium | Functional UI Tests # ToDo: - deployment: VMDeploy - displayName: Selenium Tests + displayName: Selenium UI Tests environment: - name: "linux-test" # ToDo: Change/provide a name + name: '$(environmentName)' resourceType: VirtualMachine - # tags: selenium +# name: "linux-test" # ToDo: Change/provide a name +# resourceType: VirtualMachine +# tags: selenium strategy: runOnce: deploy: From 6253db83adcb46f24979a869915fe6ed770c578b Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Wed, 19 Jul 2023 10:05:30 +0200 Subject: [PATCH 100/110] comment out parameters --- azure-pipelines.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 136659c03..627e69bf0 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -19,9 +19,10 @@ variables: projectRoot: $(System.DefaultWorkingDirectory) # Environment name environmentName: 'linux-test' - parameters: - - name: envName - default: EnvironmentName + +# parameters: +# - name: envName +# default: EnvironmentName stages: #--------------------------------------------# From 2ef11f04b7977a33455f783ae2f9e8fdcea58820 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 20 Jul 2023 14:39:33 +0200 Subject: [PATCH 101/110] change env --- azure-pipelines.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 627e69bf0..4b5eb3900 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -18,11 +18,7 @@ variables: # Project root folder. Point to the folder containing manage.py file. projectRoot: $(System.DefaultWorkingDirectory) # Environment name - environmentName: 'linux-test' - -# parameters: -# - name: envName -# default: EnvironmentName + environmentName: 'linux-test3' stages: #--------------------------------------------# @@ -186,7 +182,7 @@ stages: - deployment: FakeRestAPI pool: vmImage: 'Ubuntu-20.04' - environment: "linux-test" # ToDo + environment: '$(environmentName)' # ToDo strategy: runOnce: deploy: From 3886722f304b0b68bce2397093fd888f6561ea25 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 20 Jul 2023 14:49:32 +0200 Subject: [PATCH 102/110] add tags --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 4b5eb3900..83a02dc1e 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -221,7 +221,7 @@ stages: resourceType: VirtualMachine # name: "linux-test" # ToDo: Change/provide a name # resourceType: VirtualMachine -# tags: selenium + tags: selenium strategy: runOnce: deploy: From a334841a0af0bcd037ad89e9d0122f817f92fa04 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 20 Jul 2023 15:06:29 +0200 Subject: [PATCH 103/110] uncomment selenium --- automatedtesting/selenium/login.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/automatedtesting/selenium/login.py b/automatedtesting/selenium/login.py index aca2df148..45d1f6995 100644 --- a/automatedtesting/selenium/login.py +++ b/automatedtesting/selenium/login.py @@ -7,9 +7,9 @@ def login (user, password): print ('Starting the browser...') # --uncomment when running in Azure DevOps. - # options = ChromeOptions() - # options.add_argument("--headless") - # driver = webdriver.Chrome(options=options) + options = ChromeOptions() + options.add_argument("--headless") + driver = webdriver.Chrome(options=options) driver = webdriver.Chrome() print ('Browser started successfully. Navigating to the demo page to login.') driver.get('https://www.saucedemo.com/') From dd86688b4d7077fd2c10e485691bdffb8873373e Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 20 Jul 2023 15:21:56 +0200 Subject: [PATCH 104/110] add selenium file --- automatedtesting/selenium/add_remove_from_cart.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 automatedtesting/selenium/add_remove_from_cart.py diff --git a/automatedtesting/selenium/add_remove_from_cart.py b/automatedtesting/selenium/add_remove_from_cart.py new file mode 100644 index 000000000..ed884d2d9 --- /dev/null +++ b/automatedtesting/selenium/add_remove_from_cart.py @@ -0,0 +1,3 @@ +# #!/usr/bin/env python +from selenium import webdriver +from selenium.webdriver.chrome.options import Options as ChromeOptions From 3c04d93d8eea927ab748f4716c7f0930a738cddc Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 20 Jul 2023 18:47:59 +0200 Subject: [PATCH 105/110] change username in bash --- azure-pipelines.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 83a02dc1e..d29f9e442 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -241,21 +241,21 @@ stages: sudo apt-get install -y chromium-browser pip3 install selenium cd ~/ - DIR=/home/testuser/app + DIR=/home/adminuser/app if [ ! -d "$DIR" ]; then mkdir app fi - mv /home/testuser/azagent/_work/1/drop-uitests/$(Build.BuildId)-uitests.zip app + mv /home/adminuser/azagent/_work/1/drop-uitests/$(Build.BuildId)-uitests.zip app cd app unzip -o $(Build.BuildId)-uitests.zip - FILE=/home/testuser/app/chromedriver_linux64.zip + FILE=/home/adminuser/app/chromedriver_linux64.zip if [ ! -f "$FILE" ]; then LATEST=$(wget -q -O - http://chromedriver.storage.googleapis.com/LATEST_RELEASE) wget http://chromedriver.storage.googleapis.com/$LATEST/chromedriver_linux64.zip unzip -o chromedriver_linux64.zip sudo ln -s $PWD/chromedriver /usr/local/bin/chromedriver fi - export PATH=$PATH:/home/testuser/app + export PATH=$PATH:/home/adminuser/app echo "Starting Selenium Tests" python3 add_remove_from_cart.py >> selenium.log echo "Completed Selenium Tests. Check selenium.log for results." \ No newline at end of file From 81d76b75d84cde9300cb61307dc5dcc651220fb4 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 20 Jul 2023 22:39:48 +0200 Subject: [PATCH 106/110] fill selenium --- automatedtesting/selenium/add_remove_from_cart.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automatedtesting/selenium/add_remove_from_cart.py b/automatedtesting/selenium/add_remove_from_cart.py index ed884d2d9..ed474a590 100644 --- a/automatedtesting/selenium/add_remove_from_cart.py +++ b/automatedtesting/selenium/add_remove_from_cart.py @@ -1,3 +1,7 @@ # #!/usr/bin/env python from selenium import webdriver from selenium.webdriver.chrome.options import Options as ChromeOptions + +# Start the browser and navigate to webpage +driver = webdriver.Chrome() +driver.get('http://wswebapplication-appservice.azurewebsites.net') From 56e836ccc6016f657288fecabdf423b6c0e91426 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 20 Jul 2023 22:46:43 +0200 Subject: [PATCH 107/110] add files --- automatedtesting/selenium/selenium-output.txt | 0 automatedtesting/selenium/selenium.log | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 automatedtesting/selenium/selenium-output.txt create mode 100644 automatedtesting/selenium/selenium.log diff --git a/automatedtesting/selenium/selenium-output.txt b/automatedtesting/selenium/selenium-output.txt new file mode 100644 index 000000000..e69de29bb diff --git a/automatedtesting/selenium/selenium.log b/automatedtesting/selenium/selenium.log new file mode 100644 index 000000000..e69de29bb From cc3c5f13f9257a26cd3458baec56e9464dc6695e Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 20 Jul 2023 22:48:57 +0200 Subject: [PATCH 108/110] change url --- automatedtesting/selenium/add_remove_from_cart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automatedtesting/selenium/add_remove_from_cart.py b/automatedtesting/selenium/add_remove_from_cart.py index ed474a590..58b67f88f 100644 --- a/automatedtesting/selenium/add_remove_from_cart.py +++ b/automatedtesting/selenium/add_remove_from_cart.py @@ -4,4 +4,4 @@ # Start the browser and navigate to webpage driver = webdriver.Chrome() -driver.get('http://wswebapplication-appservice.azurewebsites.net') +driver.get(https://wswebapplication-appservice.azurewebsites.net/automatedtesting/selenium/login.py') From e92511ff6a542682a5b9a862667ecf35bbe17f72 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Thu, 20 Jul 2023 22:56:04 +0200 Subject: [PATCH 109/110] correct syntax --- automatedtesting/selenium/add_remove_from_cart.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automatedtesting/selenium/add_remove_from_cart.py b/automatedtesting/selenium/add_remove_from_cart.py index 58b67f88f..c7f62b942 100644 --- a/automatedtesting/selenium/add_remove_from_cart.py +++ b/automatedtesting/selenium/add_remove_from_cart.py @@ -4,4 +4,5 @@ # Start the browser and navigate to webpage driver = webdriver.Chrome() -driver.get(https://wswebapplication-appservice.azurewebsites.net/automatedtesting/selenium/login.py') +driver.get('https://wswebapplication-appservice.azurewebsites.net/automatedtesting/selenium/login.py') +#driver.get(https://wswebapplication-appservice.azurewebsites.net/automatedtesting/selenium/login.py') \ No newline at end of file From 34e0d2fd9fa0a2db8f94b18871b63c3406c497b1 Mon Sep 17 00:00:00 2001 From: Wojciech Siwecki Date: Tue, 1 Aug 2023 18:19:59 +0200 Subject: [PATCH 110/110] change RG to azuredevops2 --- azure-pipelines.yaml | 2 +- terraform/environments/test/terraform.tfvars | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index d29f9e442..99ee1920a 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -46,7 +46,7 @@ stages: command: 'init' workingDirectory: '$(System.DefaultWorkingDirectory)/terraform/environments/test' backendServiceArm: '$(azureServiceConnectionId)' - backendAzureRmResourceGroupName: 'Azuredevops' + backendAzureRmResourceGroupName: 'Azuredevops2' backendAzureRmStorageAccountName: 'tfstate635024562' backendAzureRmContainerName: 'tfstate' backendAzureRmKey: 'test.terraform.tfstate' diff --git a/terraform/environments/test/terraform.tfvars b/terraform/environments/test/terraform.tfvars index 1e949cf62..84970b27c 100644 --- a/terraform/environments/test/terraform.tfvars +++ b/terraform/environments/test/terraform.tfvars @@ -5,9 +5,9 @@ client_secret = "YNf8Q~K7icfuDFQE~gL1NJ4En~eO32nTARW.2adD" tenant_id = "514cd75c-be1c-45da-8ad0-46bb2c5e4502" # Resource Group/Location -location = "Poland Central" -resource_group_name = "Azuredevops" -resource_group = "Azuredevops" +location = "West Europe" +resource_group_name = "Azuredevops2" +resource_group = "Azuredevops2" application_type = "wswebApplication" # Network