From b68d766c453ca3ade830239ce8f8ff524b502dd7 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Wed, 21 Aug 2024 09:23:50 +0100 Subject: [PATCH 1/3] chore(docs): add provider schema --- docs/index.md | 9 ++++++++- internal/provider/provider.go | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 8148773..459d863 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,12 +3,19 @@ page_title: "envbuilder Provider" subcategory: "" description: |- - + Envbuilder Provider + The Envbuilder provider can be used to check for the presence of a Docker image previously built by Envbuilder https://github.com/coder/envbuilder. + This allows re-using a previously built image pushed to a Docker registry without having to rebuild it. + An image built by Envbuilder also embeds the Envbuilder binary inside the image, allowing for the image to be used to build other images. --- # envbuilder Provider +# Envbuilder Provider +The Envbuilder provider can be used to check for the presence of a Docker image previously built by [Envbuilder](https://github.com/coder/envbuilder). +This allows re-using a previously built image pushed to a Docker registry without having to rebuild it. +An image built by Envbuilder also embeds the Envbuilder binary inside the image, allowing for the image to be used to build other images. ## Example Usage diff --git a/internal/provider/provider.go b/internal/provider/provider.go index d444c23..0b6fdad 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -36,6 +36,12 @@ func (p *EnvbuilderProvider) Metadata(ctx context.Context, req provider.Metadata func (p *EnvbuilderProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) { resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{}, + MarkdownDescription: `# Envbuilder Provider + +The Envbuilder provider can be used to check for the presence of a Docker image previously built by [Envbuilder](https://github.com/coder/envbuilder). +This allows re-using a previously built image pushed to a Docker registry without having to rebuild it. +An image built by Envbuilder also embeds the Envbuilder binary inside the image, allowing for the image to be used to build other images. +`, } } From d4b8665ff9241c22e4307ecef792df6bdee269ed Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Wed, 21 Aug 2024 09:40:02 +0100 Subject: [PATCH 2/3] apply suggestions from code review --- docs/index.md | 10 ++++------ internal/provider/provider.go | 6 ++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/index.md b/docs/index.md index 459d863..409a174 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,18 +4,16 @@ page_title: "envbuilder Provider" subcategory: "" description: |- Envbuilder Provider - The Envbuilder provider can be used to check for the presence of a Docker image previously built by Envbuilder https://github.com/coder/envbuilder. - This allows re-using a previously built image pushed to a Docker registry without having to rebuild it. - An image built by Envbuilder also embeds the Envbuilder binary inside the image, allowing for the image to be used to build other images. + The Envbuilder provider can be used to check for the presence of a container image previously built by Envbuilder https://github.com/coder/envbuilder. + This allows re-using a previously built image pushed to a container registry without having to rebuild it. --- # envbuilder Provider # Envbuilder Provider -The Envbuilder provider can be used to check for the presence of a Docker image previously built by [Envbuilder](https://github.com/coder/envbuilder). -This allows re-using a previously built image pushed to a Docker registry without having to rebuild it. -An image built by Envbuilder also embeds the Envbuilder binary inside the image, allowing for the image to be used to build other images. +The Envbuilder provider can be used to check for the presence of a container image previously built by [Envbuilder](https://github.com/coder/envbuilder). +This allows re-using a previously built image pushed to a container registry without having to rebuild it. ## Example Usage diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 0b6fdad..c8dbc78 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -38,10 +38,8 @@ func (p *EnvbuilderProvider) Schema(ctx context.Context, req provider.SchemaRequ Attributes: map[string]schema.Attribute{}, MarkdownDescription: `# Envbuilder Provider -The Envbuilder provider can be used to check for the presence of a Docker image previously built by [Envbuilder](https://github.com/coder/envbuilder). -This allows re-using a previously built image pushed to a Docker registry without having to rebuild it. -An image built by Envbuilder also embeds the Envbuilder binary inside the image, allowing for the image to be used to build other images. -`, +The Envbuilder provider can be used to check for the presence of a container image previously built by [Envbuilder](https://github.com/coder/envbuilder). +This allows re-using a previously built image pushed to a container registry without having to rebuild it.`, } } From 5a45cc543e143b5e2c89922c9dad77c17159f016 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Wed, 21 Aug 2024 09:58:00 +0100 Subject: [PATCH 3/3] rm duplicate heading --- docs/index.md | 3 --- internal/provider/provider.go | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/index.md b/docs/index.md index 409a174..8bedaaa 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,15 +3,12 @@ page_title: "envbuilder Provider" subcategory: "" description: |- - Envbuilder Provider The Envbuilder provider can be used to check for the presence of a container image previously built by Envbuilder https://github.com/coder/envbuilder. This allows re-using a previously built image pushed to a container registry without having to rebuild it. --- # envbuilder Provider -# Envbuilder Provider - The Envbuilder provider can be used to check for the presence of a container image previously built by [Envbuilder](https://github.com/coder/envbuilder). This allows re-using a previously built image pushed to a container registry without having to rebuild it. diff --git a/internal/provider/provider.go b/internal/provider/provider.go index c8dbc78..cfc0c61 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -36,8 +36,7 @@ func (p *EnvbuilderProvider) Metadata(ctx context.Context, req provider.Metadata func (p *EnvbuilderProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse) { resp.Schema = schema.Schema{ Attributes: map[string]schema.Attribute{}, - MarkdownDescription: `# Envbuilder Provider - + MarkdownDescription: ` The Envbuilder provider can be used to check for the presence of a container image previously built by [Envbuilder](https://github.com/coder/envbuilder). This allows re-using a previously built image pushed to a container registry without having to rebuild it.`, }