From 5150d5da63b6370d8e3aeb8d2d12c176d9a4051c Mon Sep 17 00:00:00 2001 From: Inigo Ramli Date: Fri, 21 May 2021 03:56:48 +0700 Subject: [PATCH 1/4] Created new load test job --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc00125..8e45b1f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,3 +101,15 @@ deploy: docker-compose -f docker-compose.yml up -d && exit " + +load-test: + image: busybox + stage: performance-test + only: + - schedules + script: + - wget --post-data 'user_count=1&spawn_rate=1&host=http://nginx:80' https://tbcare-be-staging.cs.ui.ac.id/locust/swarm + - sleep 600 + - wget https://tbcare-be-staging.cs.ui.ac.id/locust/stop + + -- GitLab From 711d9f2240a3f809da462bd262e0cd921ef53c94 Mon Sep 17 00:00:00 2001 From: Inigo Ramli Date: Fri, 21 May 2021 04:01:15 +0700 Subject: [PATCH 2/4] Make user count and spawn rate more dynamic --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e45b1f..3fe183c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -108,7 +108,7 @@ load-test: only: - schedules script: - - wget --post-data 'user_count=1&spawn_rate=1&host=http://nginx:80' https://tbcare-be-staging.cs.ui.ac.id/locust/swarm + - wget --post-data 'user_count=$USER_COUNT&spawn_rate=$SPAWN_RATE&host=http://nginx:80' https://tbcare-be-staging.cs.ui.ac.id/locust/swarm - sleep 600 - wget https://tbcare-be-staging.cs.ui.ac.id/locust/stop -- GitLab From 5633c6a2b1a50d009ecd6c10ce953008fe8a7e27 Mon Sep 17 00:00:00 2001 From: Inigo Ramli Date: Fri, 21 May 2021 04:03:06 +0700 Subject: [PATCH 3/4] Fix CI/CD attempt 1 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3fe183c..057f40c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -108,7 +108,7 @@ load-test: only: - schedules script: - - wget --post-data 'user_count=$USER_COUNT&spawn_rate=$SPAWN_RATE&host=http://nginx:80' https://tbcare-be-staging.cs.ui.ac.id/locust/swarm + - wget --post-data user_count=$USER_COUNT&spawn_rate=$SPAWN_RATE&host=http://nginx:80 https://tbcare-be-staging.cs.ui.ac.id/locust/swarm - sleep 600 - wget https://tbcare-be-staging.cs.ui.ac.id/locust/stop -- GitLab From 9f7a6648abeed13fce059bdd19658a3db8624d6e Mon Sep 17 00:00:00 2001 From: Inigo Ramli Date: Fri, 21 May 2021 04:04:30 +0700 Subject: [PATCH 4/4] Fix CI/CD attempt 2 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 057f40c..9dc952b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -108,7 +108,7 @@ load-test: only: - schedules script: - - wget --post-data user_count=$USER_COUNT&spawn_rate=$SPAWN_RATE&host=http://nginx:80 https://tbcare-be-staging.cs.ui.ac.id/locust/swarm + - wget --post-data "user_count=$USER_COUNT&spawn_rate=$SPAWN_RATE&host=http://nginx:80" https://tbcare-be-staging.cs.ui.ac.id/locust/swarm - sleep 600 - wget https://tbcare-be-staging.cs.ui.ac.id/locust/stop -- GitLab