diff options
author | Zuul <zuul@review.opendev.org> | 2022-09-27 20:34:51 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-09-27 20:34:51 +0000 |
commit | 9f459dd6f75f763d2c0c4c0e842478dbb233088c (patch) | |
tree | a9c18d9e17dbfc1c6727c74231ebd01d782fe0f8 /playbooks | |
parent | a30b6fc8aac8e8f8d8424b40443a98b046a84122 (diff) | |
parent | c1845b02a441b8533c3e9a2ebac070cdc073f1f9 (diff) | |
download | zuul-9f459dd6f75f763d2c0c4c0e842478dbb233088c.tar.gz |
Merge "Add tracing tutorial"
Diffstat (limited to 'playbooks')
-rw-r--r-- | playbooks/tutorial/run-tutorial.yaml | 3 | ||||
-rw-r--r-- | playbooks/tutorial/tracing.yaml | 100 |
2 files changed, 103 insertions, 0 deletions
diff --git a/playbooks/tutorial/run-tutorial.yaml b/playbooks/tutorial/run-tutorial.yaml index abcbbba72..1d065aa82 100644 --- a/playbooks/tutorial/run-tutorial.yaml +++ b/playbooks/tutorial/run-tutorial.yaml @@ -13,3 +13,6 @@ - name: Run admin tutorial include_tasks: admin.yaml + +- name: Run tracing tutorial + include_tasks: tracing.yaml diff --git a/playbooks/tutorial/tracing.yaml b/playbooks/tutorial/tracing.yaml new file mode 100644 index 000000000..3b01f1047 --- /dev/null +++ b/playbooks/tutorial/tracing.yaml @@ -0,0 +1,100 @@ +# Stop the basic tutorial +- name: Run docker-compose down + when: not local + shell: + cmd: docker-compose -p zuul-tutorial stop + chdir: src/opendev.org/zuul/zuul/doc/source/examples + +- name: Run docker-compose down + when: local + shell: + cmd: docker-compose -p zuul-tutorial stop + chdir: ../../doc/source/examples + +# Restart with the new config +- name: Run docker-compose up + when: not local + shell: + cmd: docker-compose -p zuul-tutorial up -d + chdir: src/opendev.org/zuul/zuul/doc/source/examples + environment: + ZUUL_TUTORIAL_CONFIG: "./tracing/etc_zuul/" + +- name: Run docker-compose up + when: local + shell: + cmd: docker-compose -p zuul-tutorial up -d + chdir: ../../doc/source/examples + environment: + ZUUL_TUTORIAL_CONFIG: "./tracing/etc_zuul/" + +# Start Jaeger +- name: Run docker-compose up + when: not local + shell: + cmd: docker-compose -p zuul-tutorial-tracing up -d + chdir: src/opendev.org/zuul/zuul/doc/source/examples/tracing + +- name: Run docker-compose up + when: local + shell: + cmd: docker-compose -p zuul-tutorial-tracing up -d + chdir: ../../doc/source/examples/tracing + +# Verify that Zuul runs with the new config +- name: Wait for Zuul + uri: + url: http://localhost:9000/api/tenant/example-tenant/status + method: GET + return_content: true + status_code: 200 + body_format: json + register: result + retries: 30 + delay: 10 + until: result.status == 200 and result.json["zuul_version"] is defined + changed_when: false + +- name: Verify that old builds are available + uri: + url: "http://localhost:9000/api/tenant/example-tenant/builds" + method: GET + return_content: true + status_code: 200 + body_format: json + register: result + failed_when: "result.json | length < 4" + changed_when: false + +# Remove the label so Zuul will post again Verified+1 which is what +# check-pipeline is looking for +- include_role: + name: remove-verified + vars: + change_id: "{{ changetest1.id }}" + +# Recheck the change to issue a trace +- include_role: + name: recheck-change + vars: + change_id: "{{ changetest1.id }}" + +- include_role: + name: check-pipeline + vars: + title: "test job test1" + projectname: test1 + check_number: 3 + +- name: Verify tracing information is available + uri: + url: http://localhost:16686/api/traces?lookback=1h&service=zuul + method: GET + return_content: true + status_code: 200 + body_format: json + register: result + retries: 30 + delay: 10 + until: result.status == 200 and result.json["data"] | length > 0 + changed_when: false |