Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually run prettier.io #880

Merged
merged 2 commits into from
Feb 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions build/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ into their respective files in `$HOME`.
# This is non-standard, but its use is encouraged to make this more secure.
known_hosts: <base64 encoded>
```

`build.knative.dev/git-0` in the example above specifies which web address
these credentials belong to. See
[Guiding Credential Selection](#guiding-credential-selection) below for
more information.
[Guiding Credential Selection](#guiding-credential-selection) below for more
information.

1. Generate the value of `ssh-privatekey` by copying the value of (for example)
`cat ~/.ssh/id_rsa | base64`.
Expand Down Expand Up @@ -103,10 +104,11 @@ to authenticate with the Git service.
username: <username>
password: <password>
```

`build.knative.dev/git-0` in the example above specifies which web address
these credentials belong to. See
[Guiding Credential Selection](#guiding-credential-selection) below for
more information.
[Guiding Credential Selection](#guiding-credential-selection) below for more
information.

1. Next, direct a `ServiceAccount` to use this `Secret`:

Expand Down Expand Up @@ -159,10 +161,11 @@ credentials are then used to authenticate with the Git repository.
username: <username>
password: <password>
```

`build.knative.dev/docker-0` in the example above specifies which web
address these credentials belong to. See
[Guiding Credential Selection](#guiding-credential-selection) below for
more information.
[Guiding Credential Selection](#guiding-credential-selection) below for more
information.

1. Direct a `ServiceAccount` to use this `Secret`:

Expand Down
14 changes: 9 additions & 5 deletions build/build-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ A set of curated and supported build templates is available in the

## What is a Build Template?

A `BuildTemplate` and `ClusterBuildTemplate` encapsulates a shareable [build](./builds.md)
process with some limited parameterization capabilities.
A `BuildTemplate` and `ClusterBuildTemplate` encapsulates a shareable
[build](./builds.md) process with some limited parameterization capabilities.

A `BuildTemplate` is available within a namespace, and `ClusterBuildTemplate` is available across entire Kubernetes cluster.
A `BuildTemplate` is available within a namespace, and `ClusterBuildTemplate` is
available across entire Kubernetes cluster.

A `BuildTemplate` functions exactly like a `ClusterBuildTemplate`, and as such all references to `BuildTemplate` below are also describing `ClusterBuildTemplate`.
A `BuildTemplate` functions exactly like a `ClusterBuildTemplate`, and as such
all references to `BuildTemplate` below are also describing
`ClusterBuildTemplate`.

### Example template

Expand Down Expand Up @@ -145,7 +148,8 @@ spec:
value: Dockerfile-17.06.1
```

The `spec.template.kind` is optional and defaults to `BuildTemplate`. Alternately it could have value `ClusterBuildTemplate`.
The `spec.template.kind` is optional and defaults to `BuildTemplate`.
Alternately it could have value `ClusterBuildTemplate`.

---

Expand Down
13 changes: 6 additions & 7 deletions community/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@ Community tutorials are stored in Markdown files on
[GitHub](./samples/README.md) where they can be reviewed and edited by the
community.

Please submit a Pull Request to the community sample directory under the
Knative component that your tutorial highlights -
[Serving](./samples/serving/), [Eventing](./samples/eventing/),
or [Build](./samples/build/). A reviewer will be assigned to review your
submission. They'll work with you to ensure your submission meets the
[style guide](DOCS-CONTRIBUTING.md), but it helps if you follow it as you
write your tutorial.
Please submit a Pull Request to the community sample directory under the Knative
component that your tutorial highlights - [Serving](./samples/serving/),
[Eventing](./samples/eventing/), or [Build](./samples/build/). A reviewer will
be assigned to review your submission. They'll work with you to ensure your
submission meets the [style guide](DOCS-CONTRIBUTING.md), but it helps if you
follow it as you write your tutorial.

## Meetings and work groups

Expand Down
7 changes: 4 additions & 3 deletions community/samples/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Knative Community Samples

This directory contains Knative sample applications submitted from the community.
This directory contains Knative sample applications submitted from the
community.

| Sample Name | Description | Language(s) |
| -------------------------- | -------------------------- | -------------------------- |
| Sample Name | Description | Language(s) |
| ----------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Hello World | A quick introduction that highlights how to deploy an app using Knative Serving. | [Clojure](./serving/helloworld-clojure/README.md), [Dart](./serving/helloworld-dart/README.md), [Elixir](./serving/helloworld-elixir/README.md), [Haskell](./serving/helloworld-haskell/README.md), [Rust](./serving/helloworld-rust/README.md), [Shell](./serving/helloworld-shell/README.md), [Swift](./serving/helloworld-swift/README.md), [Vertx](./serving/helloworld-vertx/README.md) |
36 changes: 18 additions & 18 deletions community/samples/serving/helloworld-clojure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,29 @@ recreate the source files from this folder.
see
[the clojure image documentation](https://github.com/docker-library/docs/tree/master/clojure).

```docker
# Use the official Clojure image.
# https://hub.docker.com/_/clojure
FROM clojure
```docker
# Use the official Clojure image.
# https://hub.docker.com/_/clojure
FROM clojure

# Create the project and download dependencies.
WORKDIR /usr/src/app
COPY project.clj .
RUN lein deps
# Create the project and download dependencies.
WORKDIR /usr/src/app
COPY project.clj .
RUN lein deps

# Copy local code to the container image.
COPY . .
# Copy local code to the container image.
COPY . .

# Build an uberjar release artifact.
RUN mv "$(lein uberjar | sed -n 's/^Created \(.*standalone\.jar\)/\1/p')" app-standalone.jar
# Build an uberjar release artifact.
RUN mv "$(lein uberjar | sed -n 's/^Created \(.*standalone\.jar\)/\1/p')" app-standalone.jar

# Service must listen to $PORT environment variable.
# This default value facilitates local development.
ENV PORT 8080
# Service must listen to $PORT environment variable.
# This default value facilitates local development.
ENV PORT 8080

# Run the web service on container startup.
CMD ["java", "-jar", "app-standalone.jar"]
```
# Run the web service on container startup.
CMD ["java", "-jar", "app-standalone.jar"]
```

1. Create a new file, `service.yaml` and copy the following service definition
into the file. Make sure to replace `{username}` with your Docker Hub
Expand Down
18 changes: 9 additions & 9 deletions community/samples/serving/helloworld-dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ be created using the following instructions.
4. Create a new file named `Dockerfile`, this file defines instructions for
dockerizing your applications, for dart apps this can be done as follows:

```Dockerfile
# Use Google's official Dart image.
# https://hub.docker.com/r/google/dart-runtime/
FROM google/dart-runtime

# Service must listen to $PORT environment variable.
# This default value facilitates local development.
ENV PORT 8080
```
```Dockerfile
# Use Google's official Dart image.
# https://hub.docker.com/r/google/dart-runtime/
FROM google/dart-runtime

# Service must listen to $PORT environment variable.
# This default value facilitates local development.
ENV PORT 8080
```

5. Create a new file, `service.yaml` and copy the following service definition
into the file. Make sure to replace `{username}` with your Docker Hub
Expand Down
1 change: 0 additions & 1 deletion community/samples/serving/helloworld-elixir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ above.
xxxxxxx-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
```


1. To find the URL for your service, use

```
Expand Down
56 changes: 28 additions & 28 deletions community/samples/serving/helloworld-haskell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,34 +80,34 @@ recreate the source files from this folder.
1. In your project directory, create a file named `Dockerfile` and copy the code
block below into it.

```docker
# Use the official Haskell image to create a build artifact.
# https://hub.docker.com/_/haskell/
FROM haskell:8.2.2 as builder

# Copy local code to the container image.
WORKDIR /app
COPY . .

# Build and test our code, then build the “helloworld-haskell-exe” executable.
RUN stack setup
RUN stack build --copy-bins

# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM fpco/haskell-scratch:integer-gmp

# Copy the "helloworld-haskell-exe" executable from the builder stage to the production image.
WORKDIR /root/
COPY --from=builder /root/.local/bin/helloworld-haskell-exe .

# Service must listen to $PORT environment variable.
# This default value facilitates local development.
ENV PORT 8080

# Run the web service on container startup.
CMD ["./helloworld-haskell-exe"]
```
```docker
# Use the official Haskell image to create a build artifact.
# https://hub.docker.com/_/haskell/
FROM haskell:8.2.2 as builder

# Copy local code to the container image.
WORKDIR /app
COPY . .

# Build and test our code, then build the “helloworld-haskell-exe” executable.
RUN stack setup
RUN stack build --copy-bins

# Use a Docker multi-stage build to create a lean production image.
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM fpco/haskell-scratch:integer-gmp

# Copy the "helloworld-haskell-exe" executable from the builder stage to the production image.
WORKDIR /root/
COPY --from=builder /root/.local/bin/helloworld-haskell-exe .

# Service must listen to $PORT environment variable.
# This default value facilitates local development.
ENV PORT 8080

# Run the web service on container startup.
CMD ["./helloworld-haskell-exe"]
```

1. Create a new file, `service.yaml` and copy the following service definition
into the file. Make sure to replace `{username}` with your Docker Hub
Expand Down
30 changes: 15 additions & 15 deletions community/samples/serving/helloworld-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,25 @@ recreate the source files from this folder.
1. In your project directory, create a file named `Dockerfile` and copy the code
block below into it.

```docker
# Use the official Rust image.
# https://hub.docker.com/_/rust
FROM rust:1.27.0
```docker
# Use the official Rust image.
# https://hub.docker.com/_/rust
FROM rust:1.27.0

# Copy local code to the container image.
WORKDIR /usr/src/app
COPY . .
# Copy local code to the container image.
WORKDIR /usr/src/app
COPY . .

# Install production dependencies and build a release artifact.
RUN cargo install
# Install production dependencies and build a release artifact.
RUN cargo install

# Service must listen to $PORT environment variable.
# This default value facilitates local development.
ENV PORT 8080
# Service must listen to $PORT environment variable.
# This default value facilitates local development.
ENV PORT 8080

# Run the web service on container startup.
CMD ["hellorust"]
```
# Run the web service on container startup.
CMD ["hellorust"]
```

1. Create a new file, `service.yaml` and copy the following service definition
into the file. Make sure to replace `{username}` with your Docker Hub
Expand Down
Loading