Fix Developer Guide
This commit is contained in:
parent
931027a4b0
commit
f9dd297710
|
|
@ -577,7 +577,7 @@
|
|||
<h2 id="prerequisites">Prerequisites</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/operator-framework/operator-sdk" target="_blank">operator_sdk</a> version v0.10.0</li>
|
||||
<li><a href="https://github.com/operator-framework/operator-sdk" target="_blank">operator_sdk</a> version v0.15.1</li>
|
||||
<li><a href="https://git-scm.com/downloads" target="_blank">git</a></li>
|
||||
<li><a href="https://golang.org/dl/" target="_blank">go</a> version v1.13+</li>
|
||||
<li><a href="https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/tools/" target="_blank">goimports, golint, checkmake and staticcheck</a></li>
|
||||
|
|
@ -586,15 +586,13 @@
|
|||
</ul>
|
||||
|
||||
<h2 id="clone-repository-and-download-dependencies">Clone repository and download dependencies</h2>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">mkdir -p <span style="color:#000">$GOPATH</span>/src/github.com/jenkinsci
|
||||
<span style="color:#204a87">cd</span> <span style="color:#000">$GOPATH</span>/src/github.com/jenkinsci/
|
||||
git clone git@github.com:jenkinsci/kubernetes-operator.git
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">git clone git@github.com:jenkinsci/kubernetes-operator.git
|
||||
<span style="color:#204a87">cd</span> kubernetes-operator
|
||||
make go-dependencies</code></pre></div>
|
||||
<h2 id="build-and-run-with-a-minikube">Build and run with a minikube</h2>
|
||||
|
||||
<p>Build and run <strong>Jenkins Operator</strong> locally:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">make build minikube-run <span style="color:#000">EXTRA_ARGS</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">'--minikube --local'</span></code></pre></div>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">make build minikube-run</code></pre></div>
|
||||
<p>Once minikube and <strong>Jenkins Operator</strong> are up and running, apply Jenkins custom resource:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f deploy/crds/jenkins_v1alpha2_jenkins_cr.yaml
|
||||
kubectl get jenkins -o yaml
|
||||
|
|
@ -603,7 +601,7 @@ kubectl get po</code></pre></div>
|
|||
|
||||
<p>You can also run the controller locally and make it listen to a remote Kubernetes server.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">make run <span style="color:#000">NAMESPACE</span><span style="color:#ce5c00;font-weight:bold">=</span>default <span style="color:#000">KUBECTL_CONTEXT</span><span style="color:#ce5c00;font-weight:bold">=</span>remote-k8s <span style="color:#000">EXTRA_ARGS</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">'--kubeconfig ~/.kube/config'</span></code></pre></div>
|
||||
<p>Once minikube and <strong>Jenkins Operator</strong> are up and running, apply Jenkins custom resource:</p>
|
||||
<p>Once <strong>Jenkins Operator</strong> are up and running, apply Jenkins custom resource:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl --context remote-k8s --namespace default apply -f deploy/crds/jenkins_v1alpha2_jenkins_cr.yaml
|
||||
kubectl --context remote-k8s --namespace default get jenkins -o yaml
|
||||
kubectl --context remote-k8s --namespace default get po</code></pre></div>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ This document explains how to setup your development environment.
|
|||
|
||||
## Prerequisites
|
||||
|
||||
- [operator_sdk][operator_sdk] version v0.10.0
|
||||
- [operator_sdk][operator_sdk] version v0.15.1
|
||||
- [git][git_tool]
|
||||
- [go][go_tool] version v1.13+
|
||||
- [goimports, golint, checkmake and staticcheck][install_dev_tools]
|
||||
|
|
@ -23,8 +23,6 @@ This document explains how to setup your development environment.
|
|||
## Clone repository and download dependencies
|
||||
|
||||
```bash
|
||||
mkdir -p $GOPATH/src/github.com/jenkinsci
|
||||
cd $GOPATH/src/github.com/jenkinsci/
|
||||
git clone git@github.com:jenkinsci/kubernetes-operator.git
|
||||
cd kubernetes-operator
|
||||
make go-dependencies
|
||||
|
|
@ -35,7 +33,7 @@ make go-dependencies
|
|||
Build and run **Jenkins Operator** locally:
|
||||
|
||||
```bash
|
||||
make build minikube-run EXTRA_ARGS='--minikube --local'
|
||||
make build minikube-run
|
||||
```
|
||||
|
||||
Once minikube and **Jenkins Operator** are up and running, apply Jenkins custom resource:
|
||||
|
|
@ -54,7 +52,7 @@ You can also run the controller locally and make it listen to a remote Kubernete
|
|||
make run NAMESPACE=default KUBECTL_CONTEXT=remote-k8s EXTRA_ARGS='--kubeconfig ~/.kube/config'
|
||||
```
|
||||
|
||||
Once minikube and **Jenkins Operator** are up and running, apply Jenkins custom resource:
|
||||
Once **Jenkins Operator** are up and running, apply Jenkins custom resource:
|
||||
|
||||
```bash
|
||||
kubectl --context remote-k8s --namespace default apply -f deploy/crds/jenkins_v1alpha2_jenkins_cr.yaml
|
||||
|
|
|
|||
Loading…
Reference in New Issue