@@ -135,55 +135,3 @@ edit existing content or create assemblies and modules.
135
135
some basic guidelines to keep things consistent across our content.
136
136
* link:create_or_edit_content.adoc[Create a local working branch] on your
137
137
workstation to edit existing content or create content.
138
-
139
- === How to deploy to your own OpenShift cluster for testing
140
-
141
- You can deploy to your own OpenShift cluster for development. This process will use your github repo to launch the website,
142
- and therefore your github repo must have all of the upstream branches. `main` is used for site changes,
143
- so assuming all your work is in `main`, you can remove all remote branches and then push the upstream branches.
144
-
145
-
146
- Removing remote branches and updating with upstream branches (this assumes remote repos called `origin` and `upstream`)
147
- [WARNING]
148
- ====
149
- This is a destructive process, make sure that this is purely a development repo, as all local and remote branches will be deleted
150
- by performing the below commands.
151
- ====
152
- ----
153
- $ git fetch --all
154
- $ for branch in $(git branch -r | grep -v "main" | grep "^ origin"); do git push origin --delete $(echo $branch | cut -d '/' -f 2); done
155
- $ git branch -D $(git branch | grep -v 'main' | xargs)
156
- $ for branch in $(git branch -r | grep -v "main" | grep "^ upstream"); do git branch --track $(echo $branch | cut -d '/' -f 2) $(echo $branch | tr -d '[:space:]'); done
157
- $ for branch in $(git branch | grep -v "main"); do git push origin $(echo $branch | tr -d '[:space:]'); done
158
- ----
159
-
160
- Deploying the docs site to an OpenShift cluster
161
- ----
162
- $ oc process -f asciibinder-template.yml -p NAME=community-docs \
163
- -p SOURCE_REPOSITORY_URL=$(git remote get-url origin) \
164
- -p SOURCE_REPOSITORY_REF=$(git rev-parse --abbrev-ref HEAD) \
165
- -p DOC_TYPE=community \
166
- | oc create -f -
167
- $ oc process -f asciibinder-template.yml -p NAME=commercial-docs \
168
- -p SOURCE_REPOSITORY_URL=$(git remote get-url origin) \
169
- -p SOURCE_REPOSITORY_REF=$(git rev-parse --abbrev-ref HEAD) \
170
- -p DOC_TYPE=commercial \
171
- | oc create -f -
172
- ----
173
-
174
- [NOTE]
175
- ====
176
- If the build fails with "Fetch source failed" status, you can
177
- delete all the created objects and re-run above with an HTTP uri
178
- as the `SOURCE_REPOSITORY_URL`, or you can
179
- link:https://docs.okd.io/latest/dev_guide/builds/build_inputs.html#source-secrets-combinations[create a source secret]
180
- and add it to the stg1 build, `oc set build-secret --source bc/stg1-docs <secret name>`.
181
- ====
182
-
183
-
184
- You can delete all created objects by running
185
-
186
- ----
187
- $ oc delete all -l app=community-docs
188
- $ oc delete all -l app=commercial-docs
189
- ----
0 commit comments