How to take or print start and end time of TestJob of zuul ci using ansible?

25 Views Asked by At

when i did a code push on gerrit and rechecked a zuul ci execute the corresponding testjob. so we have to fetch the start and end time of that testjob. i have tried the code, and some of portion given below

    - name: Send POST request to Gerrit to display starting and ending time of testjob
      uri:
       url: "http://{{ gerrit_ip }}:8090/a/changes/{{ change_id }}/revisions/{{ zuul.patchset }}/review"
       method: POST
       user: "{{ user }}"
       password: "{{ password }}"
       body: "{'message': 'Starting Time: ''{{ zuul.start }}' 'Ending Time: ''{{ zuul.end }}'}"
       body_format: json
       status_code: 200
       validate_certs: no
    register: response
0

There are 0 best solutions below