diff options
author | James E. Blair <jim@acmegating.com> | 2021-07-08 13:45:55 -0700 |
---|---|---|
committer | James E. Blair <jim@acmegating.com> | 2021-07-15 16:45:58 -0700 |
commit | 1ee99f2fb270b298ba2bfe535164ef4ffc635b0d (patch) | |
tree | 2e360075df3ffaeddf5d624d2d14f7405aa131d6 /playbooks/tutorial | |
parent | 6ea0f1a4f5a2e5686f558ec18b130da7f74e7107 (diff) | |
download | zuul-1ee99f2fb270b298ba2bfe535164ef4ffc635b0d.tar.gz |
Always report the build page
Now that the Zuul web server and database are both required, provide
a consistent user experience by always reporting the build page.
This means that success-url and failure-url are no longer useful,
so remove them.
Update the quick-start to reflect that the build page is always
reported.
Change-Id: I4ff108df3917c9b6f44e2f5b0ccc4a7adbda1677
Diffstat (limited to 'playbooks/tutorial')
-rw-r--r-- | playbooks/tutorial/quick-start.yaml | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/playbooks/tutorial/quick-start.yaml b/playbooks/tutorial/quick-start.yaml index f2f4d95c8..8f114f16f 100644 --- a/playbooks/tutorial/quick-start.yaml +++ b/playbooks/tutorial/quick-start.yaml @@ -29,12 +29,12 @@ - name: Save test1 change info set_fact: changetest1: "{{ changeinfo }}" - json_query_finger: "messages[?contains(@.message, 'testjob finger://')].message | [0]" + json_query_finger: "messages[?contains(@.message, 'testjob http://')].message | [0]" -- name: "Fetch url finger://" +- name: "Check build URL" assert: that: - - (result_json | to_json | from_json | json_query(json_query_finger) | regex_search('(finger://[^ ]*)') | length > 0) + - (result_json | to_json | from_json | json_query(json_query_finger) | regex_search('(http://[^ ]*)') | length > 0) - name: Configure a Base Job zuul-config copy: @@ -82,15 +82,26 @@ projectname: test1 check_number: 2 -- name: Find the log URL with regex +- name: Find the build URL with regex set_fact: - log_url: "{{ result_json | to_json | from_json | json_query(json_query_log_url) | regex_search('(http://[^ ]*)') }}" + build_url: "{{ result_json | to_json | from_json | json_query(json_query_log_url) | regex_search('(http://[^ ]*)') }}" vars: - json_query_log_url: "messages[?contains(@.message, 'http://')].message | [0]" + json_query_log_url: "messages[?contains(@.message, 'http://')].message | [1]" + +- name: Extract build id from build url + set_fact: + build_uuid: "{{ build_url.split('/')[-1] }}" + +- name: Find log URL via Zuul API + uri: + url: "http://localhost:9000/api/tenant/example-tenant/build/{{ build_uuid }}" + method: GET + return_content: true + register: result - name: Fetch log URL get_url: - url: "{{ log_url }}job-output.txt" + url: "{{ result.json.log_url }}job-output.txt" dest: "{{ workspace }}/job-output.txt" - name: Verify log contents |