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

Migrate to GitHub workflows for CI #437

Merged
merged 54 commits into from
Jan 28, 2020

Conversation

alonyb
Copy link
Contributor

@alonyb alonyb commented Jan 14, 2020

This PR contain a new CI with github workflows, logs of the pipeline you can check here
Fixes #430

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 14, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @RubenBaez!

It looks like this is your first PR to kubernetes-sigs/krew-index 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/krew-index has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 14, 2020
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@ahmetb
Copy link
Member

ahmetb commented Jan 14, 2020

Looks clean I like it!

@corneliusweig
Copy link
Contributor

Yeah, after applying the comments by @ahmetb, this looks good to go.

Let's first run this alongside travis, before we disable it.

We also need to ensure that prow does not merge before GH actions has succeeded, when the auto-approver bot was faster than the CI build.

/retitle Migrate to GitHub workflow
@RubenBaez Can you add Fixes #430 to the PR description?

@k8s-ci-robot k8s-ci-robot changed the title Migrate to GitHub workflow, fix #430 Migrate to GitHub workflow Jan 14, 2020
@ahmetb
Copy link
Member

ahmetb commented Jan 14, 2020

We also need to ensure that prow does not merge before GH actions has succeeded, when the auto-approver bot was faster than the CI build.

That's valid, but with GH actions, GH actually knows there's a "check" much faster than Travis posting back something. So I highly doubt that'll be a problem.

We can run side-by-side for a month.

@alonyb alonyb requested a review from ahmetb January 15, 2020 02:24
@alonyb
Copy link
Contributor Author

alonyb commented Jan 15, 2020

@ahmetb @corneliusweig
All suggestions were made, anyone else can tell me :)

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@corneliusweig
Copy link
Contributor

One more thing, if someone makes a change (push, PR) without changing plugins / *, it will throw an error, I imagine that this should be the behavior.

🤔 why is that? This is not ideal, because there are maintenance PRs from time to time where we don't change any manifest files.

Copy link
Contributor

@corneliusweig corneliusweig left a comment

Choose a reason for hiding this comment

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

Thanks for all the hard work you have already put into this! I have a few more thought.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
@alonyb
Copy link
Contributor Author

alonyb commented Jan 20, 2020

One more thing, if someone makes a change (push, PR) without changing plugins / *, it will throw an error, I imagine that this should be the behavior.

🤔 why is that? This is not ideal, because there are maintenance PRs from time to time where we don't change any manifest files.

@corneliusweig
Because, if git diff shows no differences between files, it throws an err because of this grep -E 'plugins/.*' | tee /dev/stderr | and set -euo pipefail
So, I could put an IF statement or something to validate it and run that step only when there are changes on settings/* and if there are no changes in settings/* I just pass that step. What do you think?

@corneliusweig
Copy link
Contributor

I wonder why this worked on travis..

Anyway, if grep is making problems, then let's get rid of it. Can you try this:

git diff --name-only --diff-filter=AM ${{ github.event.before }} ${{ github.sha }} -- plugins |
   tee /dev/stderr |
   xargs -I _ $HOME/bin/validate-krew-manifest -manifest _

plugins/whoami.yaml Outdated Show resolved Hide resolved
@corneliusweig
Copy link
Contributor

Hey @alonyb, I left some more comments, did you see them?

@alonyb
Copy link
Contributor Author

alonyb commented Jan 26, 2020

Hey @alonyb, I left some more comments, did you see them?

@corneliusweig
I did not see them, sorry, but I already made some changes. Check it :)

@ahmetb
Copy link
Member

ahmetb commented Jan 26, 2020

Looks good. I think we can merge.
Did you test and manifests and observe them fail or pass after being tested?

@alonyb
Copy link
Contributor Author

alonyb commented Jan 26, 2020

Looks good. I think we can merge.
Did you test and manifests and observe them fail or pass after being tested?

@ahmetb
Yes, just one concern, it’s about last step. I think pipeline should run if someone does not change the plugins/* folder, currently if plugins/* is not changed, the pipeline will fail because git diff
What do you think?

@alonyb
Copy link
Contributor Author

alonyb commented Jan 26, 2020

Looks good. I think we can merge.
Did you test and manifests and observe them fail or pass after being tested?

@ahmetb
Yes, just one concern, it’s about last step. I think pipeline should run if someone does not change the plugins/* folder, currently if plugins/* is not changed, the pipeline will fail because git diff
What do you think?

Should I add a new validation for that. Or that is the right way :)

@alonyb
Copy link
Contributor Author

alonyb commented Jan 28, 2020

@ahmetb @corneliusweig
We can merge this PR.

@ahmetb
Copy link
Member

ahmetb commented Jan 28, 2020

/lgtm
/approve

unnamed

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 28, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmetb, alonyb

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 Jan 28, 2020
@k8s-ci-robot k8s-ci-robot merged commit e6a5b27 into kubernetes-sigs:master Jan 28, 2020
@corneliusweig
Copy link
Contributor

Very nice! Thanks a lot for your persistence @alonyb!

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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move to Github Actions for CI
5 participants