Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Bug 1841140: fix getting kube node binary SHA #204

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/ansible/tasks/wsu/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Expected value of kubernetes_version in the form of 'v1.17.2'
- name: Get kubernetes version
shell: "oc version -o json | jq -r '.serverVersion.gitVersion'"
shell: "oc version -o json | jq -r '.serverVersion.gitVersion' | cut -d '+' -f1"
register: kubernetes_version
failed_when: kubernetes_version.stdout == ""

Expand All @@ -46,7 +46,7 @@
shell: |
curl -s "{{ changelog.stdout }}" | \
grep -A 1 "{{ kubernetes_version.stdout }}" | \
grep -A 1 node-windows | tail -n 1 | sed -e 's/.*<code>\(.*\)<\/code>.*/\1/'
grep -A 1 node-windows | tail -n 1 | sed -e 's/.*<code>\(.*\)<\/code>.*/\1/'| sed -e 's/.*<td>\(.*\)<\/td>.*/\1/'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If <code> is not in the curl command, we should just use grep -A 1 node-windows | tail -n 1 | sed -e 's/.*<td>\(.*\)<\/td>.*/\1/'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is to ensure this works on 4.4, the releases before 1.18.3 contain <code>

register: kube_node_sha
failed_when: kube_node_sha.stdout == ""

Expand Down