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

CI: Factorize ansible-playbook flags #11173

Merged

Conversation

VannTen
Copy link
Contributor

@VannTen VannTen commented May 7, 2024

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
We have inconsistent sets of options passed to the playbooks during our
CI runs.

Don't run ansible-playbook directly, instead factorize the execution in
a bash function using all the common flags.
Also remove various ENABLE_* variables and instead directly test for the
relevant conditions at execution time, as this makes it more obvious and
does not force one to go back and forth in the script.

This fix problems such as not having the logs in CI runs like in #11132

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label May 7, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 7, 2024
@VannTen VannTen force-pushed the fix/consistent_ci_settings branch 2 times, most recently from 378d1c5 to 598e73f Compare May 7, 2024 15:14
Copy link
Member

@tico88612 tico88612 left a comment

Choose a reason for hiding this comment

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

typo?

tests/scripts/testcases_run.sh Outdated Show resolved Hide resolved
@VannTen
Copy link
Contributor Author

VannTen commented May 8, 2024 via email

@VannTen VannTen force-pushed the fix/consistent_ci_settings branch from 598e73f to 7d45113 Compare May 9, 2024 12:27
We have inconsistent sets of options passed to the playbooks during our
CI runs.

Don't run ansible-playbook directly, instead factorize the execution in
a bash function using all the common flags.
Also remove various ENABLE_* variables and instead directly test for the
relevant conditions at execution time, as this makes it more obvious and
does not force one to go back and forth in the script.
@VannTen VannTen force-pushed the fix/consistent_ci_settings branch from 7d45113 to 3893871 Compare May 9, 2024 22:49
Copy link
Member

@MrFreezeex MrFreezeex left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2024
@VannTen
Copy link
Contributor Author

VannTen commented May 13, 2024

/assign @mzaian

I don't know why, but my email replies are getting lost by github. Super annoying...

Copy link
Contributor

@mzaian mzaian left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MrFreezeex, mzaian, VannTen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2024
@k8s-ci-robot k8s-ci-robot merged commit d321e42 into kubernetes-sigs:master May 13, 2024
60 checks passed
Rickkwa pushed a commit to Rickkwa/kubespray that referenced this pull request Jun 26, 2024
We have inconsistent sets of options passed to the playbooks during our
CI runs.

Don't run ansible-playbook directly, instead factorize the execution in
a bash function using all the common flags.
Also remove various ENABLE_* variables and instead directly test for the
relevant conditions at execution time, as this makes it more obvious and
does not force one to go back and forth in the script.
tmurakam added a commit to tmurakam/kubespray that referenced this pull request Aug 18, 2024
Need to checkout CI_COMMIT_SHA before running upgrade playbook (revert kubernetes-sigs#11173 partially)
tmurakam added a commit to tmurakam/kubespray that referenced this pull request Aug 18, 2024
Need to git checkout ${CI_COMMIT_SHA} before running upgrade playbook (revert kubernetes-sigs#11173 partially)
tmurakam added a commit to tmurakam/kubespray that referenced this pull request Aug 29, 2024
Need to git checkout ${CI_COMMIT_SHA} before running upgrade playbook (revert kubernetes-sigs#11173 partially)
tmurakam added a commit to tmurakam/kubespray that referenced this pull request Aug 29, 2024
Need to git checkout ${CI_COMMIT_SHA} before running upgrade playbook (revert kubernetes-sigs#11173 partially)
k8s-ci-robot pushed a commit that referenced this pull request Aug 29, 2024
…_run.sh (#11458)

* Fix: fix testcases_run.sh for upgrade tests

Need to git checkout ${CI_COMMIT_SHA} before running upgrade playbook (revert #11173 partially)

* feat: add CI job to test upgrade

Add a packet_ubuntu22-calico-all-in-one-upgrade job
davidumea pushed a commit to elastisys/kubespray that referenced this pull request Oct 25, 2024
We have inconsistent sets of options passed to the playbooks during our
CI runs.

Don't run ansible-playbook directly, instead factorize the execution in
a bash function using all the common flags.
Also remove various ENABLE_* variables and instead directly test for the
relevant conditions at execution time, as this makes it more obvious and
does not force one to go back and forth in the script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants