Spacer Title

Hidden smoketest page

Use this page to test your changes and ensure that there are not any issues, unwanted behaviors, or regression that are caused by your changes.

Below are a set of site elements that have causes issues in the past.

Lists

  • Top level:

    1. A nested list item.
      1. another level lower
    2. Nested code sample:
      Syntax: {{< readfile file="../community/samples/serving/helloworld-java-quarkus/service.yaml" code=“true” lang=“yaml” >}}
      Example:

      1. apiVersion: serving.knative.dev/v1
      2. kind:Service
      3. metadata:
      4. name: helloworld-java-quarkus
      5. spec:
      6. template:
      7. spec:
      8. containers:
      9. - image: docker.io/saturnism/helloworld-java-quarkus
      10. env:
      11. - name: TARGET
      12. value:"Quarkus Sample v1"
    3. This should be the third bullet (3.).

      1. More nested code:
        Shortcode: {{< readfile file="/serving/samples/hello-world/helloworld-go/Dockerfile" code=“true” lang=“go” >}}
        Example:

        1. # Use the official Golang image to create a build artifact.
        2. # This is based on Debian and sets the GOPATH to /go.
        3. FROM golang:1.13as builder
        4. # Create and change to the app directory.
        5. WORKDIR /app
        6. # Retrieve application dependencies using go modules.
        7. # Allows container builds to reuse downloaded dependencies.
        8. COPY go.*./
        9. RUN go mod download
        10. # Copy local code to the container image.
        11. COPY ../
        12. # Build the binary.
        13. # -mod=readonly ensures immutable go.mod and go.sum in container builds.
        14. RUN CGO_ENABLED=0 GOOS=linux go build -mod=readonly-v -o server
        15. # Use the official Alpine image for a lean production container.
        16. # https://hub.docker.com/_/alpine
        17. # https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
        18. FROM alpine:3
        19. RUN apk add --no-cache ca-certificates
        20. # Copy the binary to the production image from the builder stage.
        21. COPY --from=builder /app/server /server
        22. # Run the web service on container startup.
        23. CMD ["/server"]
      2. Another nested ordered list item (2.)

Code samples

The following use the readfile shortcode

  1. {
  2. "hideMemberFields":[
  3. "TypeMeta"
  4. ],
  5. "hideTypePatterns":[
  6. "ParseError$",
  7. "List$"
  8. ],
  9. "externalPackages":[
  10. {
  11. "typeMatchPrefix":"^k8s\\.io/apimachinery/pkg/apis/meta/v1\\.Duration$",
  12. "docsURLTemplate":"https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"
  13. },
  14. {
  15. "typeMatchPrefix":"^k8s\\.io/(api|apimachinery/pkg/apis)/",
  16. "docsURLTemplate":"https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}"
  17. },
  18. {
  19. "typeMatchPrefix":"^knative\\.dev/pkg/apis/duck",
  20. "docsURLTemplate":"https://pkg.go.dev/knative.dev/pkg/apis/duck/{{arrIndex .PackageSegments -1}}#{{.TypeIdentifier}}"
  21. },
  22. {
  23. "typeMatchPrefix":"^knative\\.dev/pkg/apis\\.URL$",
  24. "docsURLTemplate":"https://pkg.go.dev/knative.dev/pkg/apis#URL"
  25. },
  26. {
  27. "typeMatchPrefix":"^knative\\.dev/networking/pkg/apis/networking",
  28. "docsURLTemplate":"https://pkg.go.dev/knative.dev/networking/pkg/apis/networking#{{.TypeIdentifier}}"
  29. },
  30. {
  31. "typeMatchPrefix":"^time\\.Duration$",
  32. "docsURLTemplate":"https://golang.org/pkg/time/#Duration"
  33. }
  34. ],
  35. "typeDisplayNamePrefixOverrides":{
  36. "k8s.io/api/":"Kubernetes ",
  37. "k8s.io/apimachinery/pkg/apis/":"Kubernetes "
  38. },
  39. "markdownDisabled":false
  40. }

Something’s not right. The ../Gopkg.toml file was not found.

Install version numbers and Clone branch commands

Examples of how the manual and dynamic version number or branch name can be added in-line with the version shortcode (uses the define values from config/_default/params.toml)

  1. Shortcode: {{% version %}}

    Example: kubectl apply version/v0.22.0/is-the-latest/docs-version.yaml

  2. Shortcode: {{% version override=“v0.2.2” %}}

    Example: kubectl apply the-version-override/v0.2.2/is-manually-specified.yaml

  3. Shortcode: {{% version patch=".20" %}}

    Example: kubectl apply this-is-a-point-release/v0.22.20/filename.yaml

  4. Shortcode: {{% branch %}}

    Example: git clone -b "release-0.21" https://github.com/knative/docs knative-docs

  5. Shortcode: {{% branch override=“release-0.NEXT” %}}

    Example: git clone -b "release-0.NEXT" https://github.com/knative/docs knative-docs