From 01dfc6f2977f4d24600632e461479e6a2fc2d767 Mon Sep 17 00:00:00 2001 From: Sergey Yedrikov Date: Tue, 9 Apr 2019 14:10:03 -0400 Subject: [PATCH] https://github.com/redhat-developer-demos/knative-tutorial/issues/119 --- README-DEV.adoc => README-DEV.txt | 19 +++++++------------ .../modules/ROOT/pages/02-basic-fundas.adoc | 4 ++-- 2 files changed, 9 insertions(+), 14 deletions(-) rename README-DEV.adoc => README-DEV.txt (69%) diff --git a/README-DEV.adoc b/README-DEV.txt similarity index 69% rename from README-DEV.adoc rename to README-DEV.txt index 7ddc17da..6f4dcecc 100644 --- a/README-DEV.adoc +++ b/README-DEV.txt @@ -4,16 +4,11 @@ Modifying the tutorial The tutorial is written in asciidoc and can be updated using any text editor. You can preview changes as you make them as follows: -1. Install the `antora` website generator and `gulp` build system -+ -.... -npm install @antora/cli @antora/site-generator-default gulp@^3.9.1 gulp-connect yaml-js -.... - -2. Create a `dev-site.yml` file (the `site.yml` file is for the public website) -+ -.dev-site.yml -.... +1. Install the `antora` website generator and the `gulp` build system +$ npm install @antora/cli @antora/site-generator-default gulp@^3.9.1 gulp-connect yaml-js + +2. Create a `dev-site.yml` file (the `site.yml` file is for the public website) with the following contents: + runtime: cache_dir: ./.cache/antora @@ -27,6 +22,7 @@ content: - url: . branches: HEAD start_path: documentation + asciidoc: attributes: tutorial-namespace: knativetutorial @@ -41,8 +37,7 @@ ui: output: dir: ./gh-pages -.... 3. Run `node_modules/.bin/gulp` -This will generate HTML, start a local web server at `localhost:5373`, open the server index in a browser, and automatically update the HTML when the asciidoc source changes. +This will generate HTML, start a local web server at `localhost:5373`, which you can open in your browser, and automatically update the HTML when the asciidoc source changes. If you are not seeing your source changes reflected in the browser, try cleaning browser cache. diff --git a/documentation/modules/ROOT/pages/02-basic-fundas.adoc b/documentation/modules/ROOT/pages/02-basic-fundas.adoc index c6ff5d5f..69326295 100644 --- a/documentation/modules/ROOT/pages/02-basic-fundas.adoc +++ b/documentation/modules/ROOT/pages/02-basic-fundas.adoc @@ -257,7 +257,7 @@ Let us redeploy the greeter service by pinning it to the first revision that was [#run-pinned-revision] [source,bash,subs="+macros,+attributes"] ---- -PIN_REVISION=`kubectl get rev -n knativetutorial -l serving.knative.dev/service=greeter -l serving.knative.dev/configurationGeneration=1 | awk 'NR==2{print $1}'` && \ +PIN_REVISION=`kubectl get rev -n {tutorial-namespace} -l serving.knative.dev/service=greeter -l serving.knative.dev/configurationGeneration=1 | awk 'NR==2{print $1}'` && \ cat service-pinned.yaml | yq w - "spec.release.revisions[+]" $PIN_REVISION | kubectl -n {tutorial-namespace} apply -f - ---- copyToClipboard::run-pinned-revision[] @@ -267,7 +267,7 @@ copyToClipboard::run-pinned-revision[] [#run-oc-pinned-revision] [source,bash,subs="+macros,+attributes"] ---- -PIN_REVISION=`oc get rev -l serving.knative.dev/service=greeter -l serving.knative.dev/configurationGeneration=1 | awk 'NR==2{print $1}'` && \ +PIN_REVISION=`oc get rev -n {tutorial-namespace} -l serving.knative.dev/service=greeter -l serving.knative.dev/configurationGeneration=1 | awk 'NR==2{print $1}'` && \ cat service-pinned.yaml | yq w - "spec.release.revisions[+]" $PIN_REVISION | oc -n {tutorial-namespace} apply -f - ---- copyToClipboard::run-oc-pinned-revision[]