Skip to content

Commit

Permalink
fix accidentaly committed to main
Browse files Browse the repository at this point in the history
  • Loading branch information
diegommm committed Oct 18, 2024
1 parent e695b69 commit 4bec204
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions gpg/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,7 @@ func Signer(d *dagger.Client, pubkey, privkey, passphrase string) *dagger.Contai
WithMountedSecret("/root/.rpmdb/privkeys/grafana.key", gpgPrivateKeySecret).
WithMountedSecret("/root/.rpmdb/pubkeys/grafana.key", gpgPublicKeySecret).
WithMountedSecret("/root/.rpmdb/passkeys/grafana.key", gpgPassphraseSecret).
WithExec([]string{"/bin/sh", "-c", `
if grep -q "PUBLIC KEY" "/root/.rpmdb/pubkeys/grafana.key"; then
cp "/root/.rpmdb/pubkeys/grafana.key" "/tmp/grafana.key";
else
gpg --enarmor "/root/.rpmdb/pubkeys/grafana.key" > "/tmp/grafana.key";
fi;
if [ "$(tail -n 1 "/tmp/grafana.key" | wc -l)" = 0 ]; then
echo >> "/tmp/grafana.key";
fi;
`}).
WithExec([]string{"rpm", "--import", "/tmp/grafana.key"}).
WithExec([]string{"rpm", "--import", "/root/.rpmdb/pubkeys/grafana.key"}).
WithNewFile("/root/.rpmmacros", RPMMacros, dagger.ContainerWithNewFileOpts{
Permissions: 0400,
}).
Expand Down

0 comments on commit 4bec204

Please sign in to comment.