forked from graphprotocol/graph-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BuildKite, resources: Deploy docs via a thegraph-docs deployment
- Loading branch information
Jannis Pohlmann
committed
May 9, 2018
1 parent
03f72d6
commit bad55e6
Showing
5 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
steps: | ||
- label: Build and push Docker image | ||
command: | | ||
cp resources/docker/thegraph-docs/Dockerfile . \ | ||
&& gcloud container builds submit \ | ||
--timeout=25m \ | ||
--tag gcr.io/the-graph-staging/thegraph-docs . | ||
- wait | ||
- label: Deploy the docs | ||
command: | | ||
kubectl apply \ | ||
--cluster=$BUILDKITE_TARGET_CLUSTER \ | ||
--user=$BUILDKITE_TARGET_CLUSTER \ | ||
-f resources/kubernetes/thegraph-docs/deployment.yaml \ | ||
&& kubectl apply \ | ||
--cluster=$BUILDKITE_TARGET_CLUSTER \ | ||
--user=$BUILDKITE_TARGET_CLUSTER \ | ||
-f resources/kubernetes/thegraph-docs/service.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM rust:latest | ||
|
||
# Install clang (required for dependencies) | ||
RUN apt-get update \ | ||
&& apt-get install -y clang libclang-dev | ||
|
||
# Install Python to serve the docs | ||
RUN apt-get install python | ||
|
||
# Copy, build, install and run thegraph-local-node | ||
COPY . . | ||
RUN cd thegraph-local-node && cargo doc --no-deps -p thegraph | ||
WORKDIR target/doc/ | ||
CMD ["python", "-m", "SimpleHTTPServer", "8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: apps/v1beta2 | ||
kind: Deployment | ||
metadata: | ||
name: thegraph-docs | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: thegraph-docs | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: thegraph-docs | ||
spec: | ||
containers: | ||
- name: thegraph-docs | ||
image: gcr.io/the-graph-staging/thegraph-docs:latest | ||
ports: | ||
- name: http | ||
containerPort: 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: thegraph-docs | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: thegraph-docs | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 80 | ||
targetPort: 8000 |