diff options
author | Héctor Orón Martínez <zumbi@debian.org> | 2018-05-19 16:18:19 +0200 |
---|---|---|
committer | Héctor Orón Martínez <zumbi@debian.org> | 2018-05-19 16:18:19 +0200 |
commit | 8ab62bc45ed897f007493d02084538503ade6f37 (patch) | |
tree | 39aaa39328f1b3b6b346d21a15b1ff5465ec8659 /actions/ostree_deploy_action.go | |
parent | 4808cb7058c548bf76476ec2f9618d784d76bdda (diff) |
New upstream version 1.0.0+git20180328.8f2bc2a
Diffstat (limited to 'actions/ostree_deploy_action.go')
-rw-r--r-- | actions/ostree_deploy_action.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/actions/ostree_deploy_action.go b/actions/ostree_deploy_action.go index b2d373d..d69600d 100644 --- a/actions/ostree_deploy_action.go +++ b/actions/ostree_deploy_action.go @@ -13,6 +13,8 @@ Yaml syntax: remote_repository: URL branch: branch name os: os name + tls-client-cert-path: path to client certificate + tls-client-key-path: path to client certificate key setup-fstab: bool setup-kernel-cmdline: bool appendkernelcmdline: arguments @@ -38,6 +40,10 @@ Optional properties: action to the configured commandline. - append-kernel-cmdline -- additional kernel command line arguments passed to kernel. + +- tls-client-cert-path -- path to client certificate to use for the remote repository + +- tls-client-key-path -- path to client certificate key to use for the remote repository */ package actions @@ -61,6 +67,8 @@ type OstreeDeployAction struct { SetupFSTab bool `yaml:"setup-fstab"` SetupKernelCmdline bool `yaml:"setup-kernel-cmdline"` AppendKernelCmdline string `yaml:"append-kernel-cmdline"` + TlsClientCertPath string `yaml:"tls-client-cert-path"` + TlsClientKeyPath string `yaml:"tls-client-key-path"` } func NewOstreeDeployAction() *OstreeDeployAction { @@ -103,6 +111,7 @@ func (ot *OstreeDeployAction) Run(context *debos.DebosContext) error { return fmt.Errorf("rootfs deploy failed: %v", err) } context.Rootdir = context.ImageMntDir + context.Origins["filesystem"] = context.ImageMntDir } repoPath := "file://" + path.Join(context.Artifactdir, ot.Repository) @@ -128,7 +137,10 @@ func (ot *OstreeDeployAction) Run(context *debos.DebosContext) error { } /* FIXME: add support for gpg signing commits so this is no longer needed */ - opts := ostree.RemoteOptions{NoGpgVerify: true} + opts := ostree.RemoteOptions{NoGpgVerify: true, + TlsClientCertPath: ot.TlsClientCertPath, + TlsClientKeyPath: ot.TlsClientKeyPath} + err = dstRepo.RemoteAdd("origin", ot.RemoteRepository, opts, nil) if err != nil { return err |