Skip to content

Commit

Permalink
ugly workaround
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
  • Loading branch information
sagikazarmark committed Apr 30, 2024
1 parent 34c3e97 commit 72f87df
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ssh-key-repro/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,19 @@ func (m *SshKeyRepro) TestFail(ctx context.Context, sshKey *Secret) *Container {
WithMountedSecret("/ssh-key", sshKey).
WithExec([]string{"ssh-keygen", "-y", "-f", "/ssh-key"})
}

func (m *SshKeyRepro) TestMaybeOk(ctx context.Context, sshKey *Secret) *Container {
// sshKeyContents, _ := dag.CurrentModule().Source().File("id_ed25519").Contents(ctx)
//
// sshKey := dag.SetSecret("ssh-key", sshKeyContents)

return dag.
Wolfi().
Container(WolfiContainerOpts{
Packages: []string{"git", "openssh"},
}).
WithMountedSecret("/ssh-key", sshKey).
WithExec([]string{"cp", "/ssh-key", "/ssh-key2"}).
WithExec([]string{"sh", "-c", "echo '' >> /ssh-key2"}).
WithExec([]string{"ssh-keygen", "-y", "-f", "/ssh-key2"})
}

0 comments on commit 72f87df

Please sign in to comment.