-
Notifications
You must be signed in to change notification settings - Fork 474
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
Move from Travis CI to github actions #698
Conversation
Signed-off-by: Akos Veres <[email protected]>
Signed-off-by: Akos Veres <[email protected]>
Additional question is: do we want to push images when tags get released? That would be new functionality and I was not sure if it's something we want to add now or as a separate PR? |
Yes definitely and that shouldn't be new behaviour as we do that now with Travis. |
Signed-off-by: Akos Veres <[email protected]>
More questions:
Actions on the repository owners side to make this PR pass:
|
Upon release tags along with the tag itself.
I think it is acceptable to only run e2e tests in a "ci-only" run (git push/PR) and to just release images in the "publish" job. This is the strategy I took with the example I shared on yesterday's call. https://github.com/alexellis/registry-creds/tree/master/.github/workflows
Will do 👍 |
@@ -1,7 +1,7 @@ | |||
faas-netes - Kubernetes controller for OpenFaaS | |||
=========== | |||
|
|||
[![Build Status](https://travis-ci.com/openfaas/faas-netes.svg?branch=master)](https://travis-ci.com/openfaas/faas-netes) | |||
[![Build Status](https://github.com/openfaas/faas-netes/workflows/build/badge.svg?branch=master)](https://github.com/openfaas/faas-netes/actions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I actually forgot about this.
.github/workflows/tag.yaml
Outdated
@@ -0,0 +1,69 @@ | |||
name: publish |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call the file publish
as per the reference examples.
.github/workflows/tag.yaml
Outdated
run: ./contrib/run_function.sh | ||
- name: stop dev cluster | ||
run: ./contrib/stop_dev.sh | ||
- name: Sleep for 10 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you do an inline GitHub script instead if a wait is needed? Third-party actions are disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.github/workflows/tag.yaml
Outdated
- name: deploy deploy | ||
run: OPERATOR=0 ./contrib/deploy.sh | ||
- name: run function | ||
run: ./contrib/run_function.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to OPERATOR=0
for consistency
.github/workflows/tag.yaml
Outdated
uses: docker/build-push-action@v2 | ||
with: | ||
outputs: "type=registry,push=true" | ||
platforms: linux/amd64,linux/arm/v6,linux/arm64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do arm/v7 for Docker images, arm/v6 for published binaries
.github/workflows/build.yaml
Outdated
- name: Push containers | ||
uses: docker/build-push-action@v2 | ||
with: | ||
outputs: "type=registry,push=true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am conflicted about filling up the storage with images upon each commit into HEAD. Let's remove this for the time being.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If people want to try out solutions before their release via a tag, this might be beneficial. We could have a separate flow for pushing in to master for just this specifically, for the time being I'll remove the publishing of the images tho, as requested.
.github/workflows/tag.yaml
Outdated
run: ./contrib/lint_chart.sh | ||
- name: create cluster | ||
run: ./contrib/create_cluster.sh | ||
- name: deploy deploy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's only run these tests during the "push" / "pr" events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good. Some comments were added for your input.
I believe I fixed most of the issues in the comments, feel free to look at it again. |
* Run function with OPERATOR=0 * Use github-script instead of custom wait-action * Remove push of container during CI run * Rename tag file to publish * Build armv7 images Signed-off-by: Akos Veres <[email protected]>
- name: stop dev cluster | ||
run: ./contrib/stop_dev.sh | ||
- name: wait 10 seconds | ||
run: sleep 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better. I was thinking of this when out walking today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This was missed in #698 Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
This was missed in #698 Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
This was missed in #698 Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
Description
The pull request has the following changes:
Motivation and Context
It fixes GitHub Actions Migration - tracking issue faas#1585
How Has This Been Tested?
The workflow has been tested on my private fork, all steps have completed successfully, except the push to github container registry.
Link to latest build https://github.com/akosveres/faas-netes/runs/1354594029?check_suite_focus=true
Types of changes
Checklist:
git commit -s