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

Add signer to CI to resign artifacts #1011

Merged
merged 2 commits into from
Dec 22, 2021
Merged

Add signer to CI to resign artifacts #1011

merged 2 commits into from
Dec 22, 2021

Conversation

Itxaka
Copy link
Contributor

@Itxaka Itxaka commented Dec 22, 2021

No description provided.

Signed-off-by: Itxaka <igarcia@suse.com>
This works by getting the artifacts from the repo and checking their
signatures. If those fail, it will try to resign the artifacts
automatically and push those signatures.

Signed-off-by: Itxaka <igarcia@suse.com>
@Itxaka
Copy link
Contributor Author

Itxaka commented Dec 22, 2021

this does affect the PR workflow as it changes the build.go command to build so at least it should pass that part and compile it properly.

Copy link
Contributor

@mudler mudler left a comment

Choose a reason for hiding this comment

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

Nice! 💯

@Itxaka
Copy link
Contributor Author

Itxaka commented Dec 22, 2021

Its tested until the signing, as I dont have the keys for the repo, nor the local OIDC support to test that part, but it should work as it uses the same commands as in luet-cosign.

Yes, we could use the cosign from the luet repo to do this to make sure we use the same version, but that would mean again relaying on whatever version is on our repos and we might want to play with that. Plus this should only be temporary to sign the missing version we currently have, after we should try to include this on the elemental-cli as it can help other people resign their own artifacts, even ignore the luet-cosign plugin altogether during build and do it in a different step, or create signatures and store them in different repos, i.e. in case the repos are not available or if they want to sign to a private repository for offline access, etc...

Urls: []string{repo},
ReferenceID: referenceID,
})
ctx.Config.GetSystem().Rootfs = "/"
Copy link
Contributor

Choose a reason for hiding this comment

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

huh, actually if we bump the luet module now this is changed and much easier to work with

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dont even know what that is used for, I blindly copied it from the build.go and it didnt gave me any issues so working as intended LOL

@Itxaka
Copy link
Contributor Author

Itxaka commented Dec 22, 2021

Also this could do with some goroutines to do the signing in parallel, otherwise it can be slow as hell

@Itxaka
Copy link
Contributor Author

Itxaka commented Dec 22, 2021

It passed the critical part of building and using the build.go file, merging

@Itxaka Itxaka merged commit 15f3a8c into rancher:master Dec 22, 2021
@Itxaka Itxaka deleted the signer branch December 22, 2021 10:37
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.

2 participants