From 80a60f091ba04024a3ee8e42b987b24913d74f48 Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Thu, 30 May 2024 13:13:32 +0530 Subject: [PATCH 1/7] Issue #IQ-803 fix: updated jenkins file --- pipelines/functional-tests/JenkinsFile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/functional-tests/JenkinsFile b/pipelines/functional-tests/JenkinsFile index a841bc21f3..814460b54c 100644 --- a/pipelines/functional-tests/JenkinsFile +++ b/pipelines/functional-tests/JenkinsFile @@ -29,7 +29,7 @@ node() { git clone ${params.test_repo} -b ${params.test_repo_branch_or_tag} test_repo """ ansiblePlaybook = "${currentWs}/ansible/functional-tests.yml" - ansibleExtraArgs = "--extra-vars \" source_name=${currentWs}/test_repo/functional-tests/${params.file_version} inquiry_api_version=${params.inquiry_api_version} file_version=${params.file_version} inquiry_host_url=${params.inquiry_host_url} inquiry_channel_id=${params.inquiry_channel_id} \" --vault-password-file /var/lib/jenkins/secrets/vault-pass" + ansibleExtraArgs = "--extra-vars \" source_name=${currentWs}/test_repo/functional-tests/${params.file_version} inquiry_api_version=${params.inquiry_api_version} file_version=${params.file_version} inquiry_host_url=${params.inquiry_host_url} inquiry_channel_id=${params.inquiry_channel_id} inquiry_framework_id=${params.inquiry_framework_id} \" --vault-password-file /var/lib/jenkins/secrets/vault-pass" values.put('currentWs', currentWs) values.put('env', envDir) values.put('module', module) From 3ec27175af02d56a5834658dcccdb748909ac9ad Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Thu, 30 May 2024 16:22:43 +0530 Subject: [PATCH 2/7] Issue #IQ-803 fix: updated role --- ansible/roles/functional-tests/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/functional-tests/tasks/main.yml b/ansible/roles/functional-tests/tasks/main.yml index eb02115389..fef3ddb0b5 100644 --- a/ansible/roles/functional-tests/tasks/main.yml +++ b/ansible/roles/functional-tests/tasks/main.yml @@ -14,5 +14,5 @@ dest: functional-tests-files/env_question_questionset_{{ file_version }}.json - name: Trigger Functional Test shell: - cmd: newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml ; chown -R jenkins:jenkins newman + cmd: newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml ; chdir: functional-tests-files From 77a9a84447031088d42a2aef3e087a45182826d9 Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Mon, 3 Jun 2024 10:57:09 +0530 Subject: [PATCH 3/7] Issue #IQ-803 fix: added node version --- ansible/roles/functional-tests/tasks/main.yml | 2 +- pipelines/functional-tests/JenkinsFile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ansible/roles/functional-tests/tasks/main.yml b/ansible/roles/functional-tests/tasks/main.yml index fef3ddb0b5..e8d82850e0 100644 --- a/ansible/roles/functional-tests/tasks/main.yml +++ b/ansible/roles/functional-tests/tasks/main.yml @@ -14,5 +14,5 @@ dest: functional-tests-files/env_question_questionset_{{ file_version }}.json - name: Trigger Functional Test shell: - cmd: newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml ; + cmd: newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml; chdir: functional-tests-files diff --git a/pipelines/functional-tests/JenkinsFile b/pipelines/functional-tests/JenkinsFile index 814460b54c..97e15275c7 100644 --- a/pipelines/functional-tests/JenkinsFile +++ b/pipelines/functional-tests/JenkinsFile @@ -25,8 +25,9 @@ node() { jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() stage('deploy artifact'){ sh """ - rm -rf test_repo - git clone ${params.test_repo} -b ${params.test_repo_branch_or_tag} test_repo + nvm use 16.19.0 + rm -rf test_repo + git clone ${params.test_repo} -b ${params.test_repo_branch_or_tag} test_repo """ ansiblePlaybook = "${currentWs}/ansible/functional-tests.yml" ansibleExtraArgs = "--extra-vars \" source_name=${currentWs}/test_repo/functional-tests/${params.file_version} inquiry_api_version=${params.inquiry_api_version} file_version=${params.file_version} inquiry_host_url=${params.inquiry_host_url} inquiry_channel_id=${params.inquiry_channel_id} inquiry_framework_id=${params.inquiry_framework_id} \" --vault-password-file /var/lib/jenkins/secrets/vault-pass" From 3ef339dd0e5b25651119558f757b219999ffec27 Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Wed, 5 Jun 2024 12:48:13 +0530 Subject: [PATCH 4/7] Issue #IQ-803 fix: updated role --- ansible/roles/functional-tests/tasks/main.yml | 2 +- pipelines/functional-tests/JenkinsFile | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible/roles/functional-tests/tasks/main.yml b/ansible/roles/functional-tests/tasks/main.yml index e8d82850e0..f85d002bb5 100644 --- a/ansible/roles/functional-tests/tasks/main.yml +++ b/ansible/roles/functional-tests/tasks/main.yml @@ -14,5 +14,5 @@ dest: functional-tests-files/env_question_questionset_{{ file_version }}.json - name: Trigger Functional Test shell: - cmd: newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml; + cmd: source /var/lib/jenkins/.nvm/nvm.sh && nvm use 16.19.0 && newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml; chdir: functional-tests-files diff --git a/pipelines/functional-tests/JenkinsFile b/pipelines/functional-tests/JenkinsFile index 97e15275c7..145e14e533 100644 --- a/pipelines/functional-tests/JenkinsFile +++ b/pipelines/functional-tests/JenkinsFile @@ -25,7 +25,6 @@ node() { jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() stage('deploy artifact'){ sh """ - nvm use 16.19.0 rm -rf test_repo git clone ${params.test_repo} -b ${params.test_repo_branch_or_tag} test_repo """ From 01df0483590c536e5e4de7f44ed28f6f31402858 Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Wed, 5 Jun 2024 13:19:34 +0530 Subject: [PATCH 5/7] Issue #IQ-803 fix: updated role --- ansible/roles/functional-tests/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/functional-tests/tasks/main.yml b/ansible/roles/functional-tests/tasks/main.yml index f85d002bb5..058ee0bc09 100644 --- a/ansible/roles/functional-tests/tasks/main.yml +++ b/ansible/roles/functional-tests/tasks/main.yml @@ -14,5 +14,5 @@ dest: functional-tests-files/env_question_questionset_{{ file_version }}.json - name: Trigger Functional Test shell: - cmd: source /var/lib/jenkins/.nvm/nvm.sh && nvm use 16.19.0 && newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml; + cmd: . /var/lib/jenkins/.nvm/nvm.sh && nvm use 16.19.0 && newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml; chdir: functional-tests-files From 035e660eed2626b6e06c7ccbd30776d3cf0bd6a9 Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Thu, 6 Jun 2024 17:45:26 +0530 Subject: [PATCH 6/7] Issue #IQ-803 fix: updated ansible role --- ansible/functional-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/functional-tests.yml b/ansible/functional-tests.yml index 2bcf45bfa3..35d318d125 100644 --- a/ansible/functional-tests.yml +++ b/ansible/functional-tests.yml @@ -1,5 +1,4 @@ - hosts: local - become: yes gather_facts: false vars_files: - ['{{inventory_dir}}/secrets.yml'] From 7eef990dd230c45a932525feafea0e59192e5b0d Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Fri, 7 Jun 2024 10:13:34 +0530 Subject: [PATCH 7/7] Issue #IQ-803 fix: updated role --- ansible/roles/functional-tests/tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/functional-tests/tasks/main.yml b/ansible/roles/functional-tests/tasks/main.yml index 058ee0bc09..112c621dfb 100644 --- a/ansible/roles/functional-tests/tasks/main.yml +++ b/ansible/roles/functional-tests/tasks/main.yml @@ -12,7 +12,9 @@ template: src: "{{ source_name }}/env_question_questionset_{{ file_version }}.json" dest: functional-tests-files/env_question_questionset_{{ file_version }}.json -- name: Trigger Functional Test +- name: Trigger Functional Test + environment: + NVM_DIR: "/var/lib/jenkins/.nvm" shell: cmd: . /var/lib/jenkins/.nvm/nvm.sh && nvm use 16.19.0 && newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml; chdir: functional-tests-files