Skip to content

Commit

Permalink
setup cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
mandeepdhiman123 committed Sep 7, 2020
1 parent 73f6a81 commit abb4eae
Showing 1 changed file with 49 additions and 51 deletions.
100 changes: 49 additions & 51 deletions mosip-security-playbook/roles/functional-test-setup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,64 +19,62 @@
register: check_for_rebuild
when: testrig_folder.stat.exists == true

block:
- name: "Deleting old build"
file:
path: "{{ testrig_dir }}"
state: absent
# when: check_for_rebuild.user_input | bool
- name: "Deleting old build"
file:
path: "{{ testrig_dir }}"
state: absent
when: check_for_rebuild.user_input | bool

- name: Downloading upgraded build version
unarchive:
src: "https://github.com/mosip/mosip-functional-tests/archive/{{ testrig_version }}.zip"
dest: "{{ tools_dir }}"
remote_src: yes
# when: check_for_rebuild.user_input | bool
- name: Downloading upgraded build version
unarchive:
src: "https://github.com/mosip/mosip-functional-tests/archive/{{ testrig_version }}.zip"
dest: "{{ tools_dir }}"
remote_src: yes
when: check_for_rebuild.user_input | bool

- name: Bulding upgraded partner demo service for dependency
shell: "cd {{ testrig_dir }}/authentication-partnerdemo-service/ && mvn clean install"
# when: check_for_rebuild.user_input | bool
- name: Bulding upgraded partner demo service for dependency
shell: "cd {{ testrig_dir }}/authentication-partnerdemo-service/ && mvn clean install"
when: check_for_rebuild.user_input | bool

- name: Bulding upgraded test-rig
shell: "cd {{ testrig_dir }}/automationtests && mvn clean install"
# when: check_for_rebuild.user_input | bool
- name: Bulding upgraded test-rig
shell: "cd {{ testrig_dir }}/automationtests && mvn clean install"
when: check_for_rebuild.user_input | bool

- name: Copy jar file to test testrig directory
shell: "mv {{ testrig_dir }}/automationtests/target/*dependencies.jar {{ testrig_dir }}/automationtests/target/automationtests.jar"
# when: check_for_rebuild.user_input | bool
- name: Copy jar file to test testrig directory
shell: "mv {{ testrig_dir }}/automationtests/target/*dependencies.jar {{ testrig_dir }}/automationtests/target/automationtests.jar"
when: check_for_rebuild.user_input | bool

- name: Sceduling upgraded Cronjob for test-rig
cron:
name: "functional-test"
minute: "00"
hour: "02"
job: "cd {{ testrig_dir }}/automationtests/target/ && java -jar -Dmodules=all -Denv.user=qa -Denv.endpoint=https://qa.mosip.net -Denv.testLevel=smokeAndRegression automationtests.jar"
when: check_for_rebuild.user_input | bool
- name: Sceduling upgraded Cronjob for test-rig
cron:
name: "functional-test"
minute: "00"
hour: "02"
job: "cd {{ testrig_dir }}/automationtests/target/ && java -jar -Dmodules=all -Denv.user=qa -Denv.endpoint=https://qa.mosip.net -Denv.testLevel=smokeAndRegression automationtests.jar"
when: check_for_rebuild.user_input | bool

block:
- name: Download new version of Functional Test
unarchive:
src: "https://github.com/mosip/mosip-functional-tests/archive/{{ testrig_version }}.zip"
dest: "{{ tools_dir }}"
remote_src: yes
# when: testrig_folder.stat.exists == false
- name: Download new version of Functional Test
unarchive:
src: "https://github.com/mosip/mosip-functional-tests/archive/{{ testrig_version }}.zip"
dest: "{{ tools_dir }}"
remote_src: yes
when: testrig_folder.stat.exists == false

- name: Bulding new version of partner demo service for dependency
shell: "cd {{ testrig_dir }}/authentication-partnerdemo-service/ && mvn clean install"
# when: testrig_folder.stat.exists == false
- name: Bulding new version of partner demo service for dependency
shell: "cd {{ testrig_dir }}/authentication-partnerdemo-service/ && mvn clean install"
when: testrig_folder.stat.exists == false

- name: Bulding new version of test-rig
shell: "cd {{ testrig_dir }}/automationtests && mvn clean install"
# when: testrig_folder.stat.exists == false
- name: Bulding new version of test-rig
shell: "cd {{ testrig_dir }}/automationtests && mvn clean install"
when: testrig_folder.stat.exists == false

- name: Copy jar file to test testrig directory
shell: "mv {{ testrig_dir }}/automationtests/target/*dependencies.jar {{ testrig_dir }}/automationtests/target/automationtests.jar"
# when: testrig_folder.stat.exists == false
- name: Copy jar file to test testrig directory
shell: "mv {{ testrig_dir }}/automationtests/target/*dependencies.jar {{ testrig_dir }}/automationtests/target/automationtests.jar"
when: testrig_folder.stat.exists == false

- name: Sceduling Cronjob for test-rig
cron:
name: "functional-test"
minute: "00"
hour: "02"
job: "cd {{ testrig_dir }}/automationtests/target/ && java -jar -Dmodules=all -Denv.user=qa -Denv.endpoint=https://qa.mosip.net -Denv.testLevel=smokeAndRegression automationtests.jar"
when: testrig_folder.stat.exists == false
- name: Sceduling Cronjob for test-rig
cron:
name: "functional-test"
minute: "00"
hour: "02"
job: "cd {{ testrig_dir }}/automationtests/target/ && java -jar -Dmodules=all -Denv.user=qa -Denv.endpoint=https://qa.mosip.net -Denv.testLevel=smokeAndRegression automationtests.jar"
when: testrig_folder.stat.exists == false

0 comments on commit abb4eae

Please sign in to comment.