-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add workflow to automate backstage builds #17
Conversation
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
Signed-off-by: Omri Shiv <327609+OmriShiv@users.noreply.github.com>
This is great. Thank you. @nabuskey I think you should probably take a look at this though. |
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.
What is this for? We are invoking the cnoe cli for no reason?
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.
@jessesanford this is from your work; can you clarify? I just lifted it from the other repo.
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 haven't thoroughly looked through the cli code, but does it use the same method as kubernetes to get a client? If that method is leveraged, it can use either the kubeconfig in the home directory or an in-cluster driven client using kubernetes service account and I believe we won't need this file.
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.
This allows for us to just-in-time add the auth for the local Kubernetes cluster when the cnoe cli is invoked by the cnoe plugin to do perform the "verify" step. Without it, the cnoe cli invocation dies because it can't auth to the local kube.
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.
+1 from me
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.
This allows for us to just-in-time add the auth for the local Kubernetes cluster when the cnoe cli is invoked by the cnoe plugin to do perform the "verify" step. Without it, the cnoe cli invocation dies because it can't auth to the local kube.
@nabuskey Do you mind: https://stackoverflow.com/a/72585915 |
Is there an example of building this image with Argo Workflows and pushing into Gitea OCI registry? This would aid with faster development, I think. Ref #20 |
@OneCricketeer we don't have that yet. BUT we are building an example for building and pushing to the internal gitea registry as part of a workshop we are creating. It's still in WIP but is coming soon :) If you can't wait you can probably base it off of this: https://github.com/cnoe-io/backstage-app/blob/main/.github/workflows/build-and-push.yaml |
@nabuskey I believe I am part of that workshop 😉 |
What this does
This takes the work from https://github.com/cnoe-io/backstage-image-builder and merges it into this repository with an added Workflow file to automate building, tagging, and pushing the backstage image to
ghcr
. It uses the formatghcr.io/cnoe-io/backstage-app:GITSHA
as the image name. This image will be built on every commit into thebackstage-app
repo, whether on a push to main or a PR. It also writes the image attestation to the repository for added supply chain security.Example
https://github.com/omrishiv/backstage-app/actions/runs/9067164285