Skip to content

[patch] Adding Optimizer Rollback #1592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 66 additions & 5 deletions tekton/src/pipelines/rollback.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ spec:
- name: mas_app_iot_version
type: string

# Optimizer Rollback Version
- name: mas_app_optimizer_version
type: string

# Development Build Support
- name: artifactory_username
default: ""
Expand Down Expand Up @@ -147,7 +151,7 @@ spec:
kind: Task
name: mas-devops-suite-app-rollback

# 3. Rollback App
# 4. Rollback App
# -------------------------------------------------------------------------
# Manage App Rollback
- name: iot-rollback
Expand All @@ -173,7 +177,33 @@ spec:
kind: Task
name: mas-devops-suite-app-rollback

# 4. Verify health of the cluster after the rollback complete
# 5. Rollback App
# -------------------------------------------------------------------------
# Manage App Rollback
- name: optimizer-rollback
timeout: "0"
runAfter:
- core-rollback
params:
{% if wait_for_install == true %}
- name: mas_instance_id
value: $(params.mas_instance_id)
{% endif %}
- name: mas_app_id
value: optimizer
- name: mas_app_version
value: $(params.mas_app_optimizer_version)
- name: devops_suite_name
value: optimizer-rollback
when:
- input: "$(params.mas_app_optimizer_version)"
operator: notin
values: [""]
taskRef:
kind: Task
name: mas-devops-suite-app-rollback

# 6. Verify health of the cluster after the rollback complete
# -------------------------------------------------------------------------
{{ lookup('template', 'taskdefs/cluster-setup/ocp-verify.yml.j2', template_vars={
'name': 'post-rollback-verify-cluster',
Expand All @@ -185,9 +215,9 @@ spec:
'verify_ingress': 'False'
}) | indent(4) }}
runAfter:
- iot-rollback
- optimizer-rollback

# 5. Verify MAS core version after the rollback complete
# 7. Verify MAS core version after the rollback complete
# -------------------------------------------------------------------------
- name: post-rollback-verify-core-version
timeout: "0"
Expand All @@ -214,7 +244,7 @@ spec:
operator: notin
values: [""]

# 6. Verify MAS Manage App version after the rollback complete
# 8. Verify MAS Manage App version after the rollback complete
# -------------------------------------------------------------------------
- name: post-rollback-verify-app-version
timeout: "0"
Expand Down Expand Up @@ -243,6 +273,8 @@ spec:
operator: notin
values: [""]

# 9. Verify IoT App version after the rollback complete
# -------------------------------------------------------------------------
- name: post-rollback-verify-iot-app-version
timeout: "0"
taskRef:
Expand Down Expand Up @@ -270,6 +302,35 @@ spec:
operator: notin
values: [""]

# 10. Verify Optimizer App version after the rollback complete
# -------------------------------------------------------------------------
- name: post-rollback-verify-optimizer-app-version
timeout: "0"
taskRef:
kind: Task
name: mas-devops-suite-app-rollback
runAfter:
- post-rollback-verify-cluster
params:
{% if wait_for_install == true %}
- name: mas_instance_id
value: $(params.mas_instance_id)
{% endif %}
- name: mas_app_id
value: optimizer
- name: mas_app_version
value: $(params.mas_app_optimizer_version)
- name: rollback_mas_app
value: 'False'
- name: verify_app_version
value: 'True'
- name: devops_suite_name
value: post-rollback-verify-optimizer-app-version (MAS Optimizer)
when:
- input: "$(params.mas_app_optimizer_version)"
operator: notin
values: [""]

{% if wait_for_install == true %}
# In FVT only this is the time to take a must-gather and finalize the result
# ---------------------------------------------------------------------------
Expand Down