Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #IQ-803 fix: updated jenkins file and roles #4008

Merged
merged 7 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ansible/functional-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
- hosts: local
become: yes
gather_facts: false
vars_files:
- ['{{inventory_dir}}/secrets.yml']
Expand Down
6 changes: 4 additions & 2 deletions ansible/roles/functional-tests/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 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: . /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
6 changes: 3 additions & 3 deletions pipelines/functional-tests/JenkinsFile
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ 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
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} \" --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)
Expand Down
Loading