diff options
-rw-r--r-- | TODO | 5 | ||||
-rw-r--r-- | actions/debootstrap_action.go | 2 | ||||
-rw-r--r-- | actions/ostree_deploy_action.go | 14 | ||||
-rw-r--r-- | actions/run_action.go | 2 | ||||
-rw-r--r-- | cmd/debos/debos.go | 4 |
5 files changed, 19 insertions, 8 deletions
@@ -1,7 +1,4 @@ -Before 1.0 -* Rename to debos - -Potentially After 1.0 +TODO * Make logging more consistent * Have a mode to output the final yaml after templating and then exit (dry-run?) diff --git a/actions/debootstrap_action.go b/actions/debootstrap_action.go index a53d153..4f30ee6 100644 --- a/actions/debootstrap_action.go +++ b/actions/debootstrap_action.go @@ -86,7 +86,7 @@ func (d *DebootstrapAction) Run(context *debos.DebosContext) error { } if d.KeyringPackage != "" { - cmdline = append(cmdline, fmt.Sprintf("--keyring=%s", d.KeyringPackage)) + cmdline = append(cmdline, fmt.Sprintf("--include=%s", d.KeyringPackage)) } if d.Components != nil { 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 diff --git a/actions/run_action.go b/actions/run_action.go index ad374d8..90e4572 100644 --- a/actions/run_action.go +++ b/actions/run_action.go @@ -107,6 +107,8 @@ func (run *RunAction) doRun(context debos.DebosContext) error { if !run.PostProcess { if !run.Chroot { cmd.AddEnvKey("ROOTDIR", context.Rootdir) + cmd.AddEnvKey("RECIPEDIR", context.RecipeDir) + cmd.AddEnvKey("ARTIFACTDIR", context.Artifactdir) } if context.Image != "" { cmd.AddEnvKey("IMAGE", context.Image) diff --git a/cmd/debos/debos.go b/cmd/debos/debos.go index caff24b..0d1f7ff 100644 --- a/cmd/debos/debos.go +++ b/cmd/debos/debos.go @@ -82,8 +82,8 @@ func main() { } /* If fakemachine is supported the outer fake machine will never use the - * scratchdir, so just set it to /scrach as a dummy to prevent the outer - * debos createing a temporary direction */ + * scratchdir, so just set it to /scratch as a dummy to prevent the + * outer debos creating a temporary direction */ if fakemachine.InMachine() || fakemachine.Supported() { context.Scratchdir = "/scratch" } else { |