Skip to content
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] Add check for local changes in obs-api package using rpm #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guxtavo
Copy link

@guxtavo guxtavo commented Dec 2, 2022

Add a playbook that will fail the deployment if there are local changes to the package obs-api. The verification is done via rpm and in my tests the changes are printed if the shell command has non zero return code.

Requires a bool (overwrite_local_changes, default to false) to switch mode in case the local changes need to be overwritten.

Since I cannot fully test, for this draft I'm adding the include just in deploy_without_migration.yml for completion.

Add a playbook that will fail the deployment if there are local changes
to the package obs-api. The verification is done via rpm and in my tests
the changes are printed if the shell command has non zero return code.

Requires a bool (overwrite_local_changes, default to false) to switch
mode in case the local changes need to be overwritten.

Since I cannot fully test, for this draft I'm adding the include just in
deploy_without_migration.yml for completion.
ignore_errors: false
become: true
when:
- not overwrite_local_changes
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand it correctly, this flag is not preventing overwrites but preventing the execution of the task, right?

Copy link
Author

Choose a reason for hiding this comment

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

Correct

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can improve the naming a bit, if this, in fact, is not overwriting the local changes :)

Copy link
Author

Choose a reason for hiding this comment

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

What about "skip_local_rpm_check"?

Copy link
Contributor

Choose a reason for hiding this comment

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

Better

Copy link
Contributor

Choose a reason for hiding this comment

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

@guxtavo Do you need some help with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants