mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-05 23:36:37 +00:00
Stage shipped docs into Docker runtime builds
This commit is contained in:
parent
12c30da168
commit
67a194739c
3 changed files with 26 additions and 0 deletions
|
|
@ -105,6 +105,24 @@ func TestDockerAndDemoBuildsUseCanonicalReleaseLdflags(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestDockerfileStagesShippedDocsForEmbeddedFrontendBuild(t *testing.T) {
|
||||
dockerfileBytes, err := os.ReadFile(repoFile("Dockerfile"))
|
||||
if err != nil {
|
||||
t.Fatalf("read Dockerfile: %v", err)
|
||||
}
|
||||
|
||||
dockerfile := string(dockerfileBytes)
|
||||
required := []string{
|
||||
`COPY docs/ /app/docs/`,
|
||||
`COPY SECURITY.md TERMS.md /app/`,
|
||||
}
|
||||
for _, needle := range required {
|
||||
if !strings.Contains(dockerfile, needle) {
|
||||
t.Fatalf("Dockerfile missing shipped-doc build input: %s", needle)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func repoFile(parts ...string) string {
|
||||
root := filepath.Join("..", "..")
|
||||
segments := append([]string{root}, parts...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue