Skip to content

Commit 80b8ce4

Browse files
committed
docs: Silence markdown linting violations
Signed-off-by: timflannagan <[email protected]>
1 parent 8a60f61 commit 80b8ce4

File tree

2 files changed

+29
-28
lines changed

2 files changed

+29
-28
lines changed

docs/downstream-ci.md

+23-22
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,63 @@ The CI configuration for each release branch can be found [here](https://github.
44
From `4.11` (`master` as of this writing) we've updated the configuration to able to influence CI on a PR basis. An overview of the `ci-operator` (the system used for ci)
55
can be found [here](https://docs.ci.openshift.org/docs/architecture/ci-operator/).
66

7-
### Structure
7+
## Structure
88

9-
* `.ci-operator.yaml` defines the `build_root_image`. To be ART compliant, the image should come from the [ocp-build-data](https://github.com/openshift/ocp-build-data/) repo
10-
* [openshift-operator-framework-olm-master.yaml](https://github.com/openshift/release/blob/master/ci-operator/config/openshift/operator-framework-olm/openshift-operator-framework-olm-master.yaml) defines the images that are used by ci, produced by ci, and the ci jobs the get executed.
11-
* `base.Dockerfile` defines the image used by ci to execute the ci jobs
9+
- `.ci-operator.yaml` defines the `build_root_image`. To be ART compliant, the image should come from the [ocp-build-data](https://github.com/openshift/ocp-build-data/) repo
10+
- [openshift-operator-framework-olm-master.yaml](https://github.com/openshift/release/blob/master/ci-operator/config/openshift/operator-framework-olm/openshift-operator-framework-olm-master.yaml) defines the images that are used by ci, produced by ci, and the ci jobs the get executed.
11+
- `base.Dockerfile` defines the image used by ci to execute the ci jobs
1212

1313
From [openshift-operator-framework-olm-master.yaml](https://github.com/openshift/release/blob/master/ci-operator/config/openshift/operator-framework-olm/openshift-operator-framework-olm-master.yaml), we see under the `images` stanza the `ci-image` definition.
1414
It goes from `src` (the `build_root_image`) to `ci-image` by building `base.Dockerfile` with `src` as the base image.
1515

16-
```
16+
```yaml
1717
- dockerfile_path: base.Dockerfile
1818
from: src
1919
to: ci-image
2020
```
2121
2222
The image is excluded from promotion, to never be posted up anywhere:
2323
24-
```
24+
```yaml
2525
promotion:
2626
excluded_images:
2727
- ci-image
2828
```
2929
3030
and each `test` references `ci-image` as the image to be used to the test, e.g.:
3131

32-
```
32+
```yaml
3333
tests:
3434
- as: verify
3535
commands: make verify
3636
container:
3737
from: ci-image
3838
```
3939

40-
### Updating go versions
40+
## Updating go versions
4141

42-
All we need to do is update the `build_root_image` referenced in `.ci-operator.yaml` and we may also need to update the `base_images` in [openshift-operator-framework-olm-master.yaml](https://github.com/openshift/release/blob/master/ci-operator/config/openshift/operator-framework-olm/openshift-operator-framework-olm-master.yaml).
42+
All we need to do is update the `build_root_image` referenced in `.ci-operator.yaml` and we may also need to update the `base_images` in [openshift-operator-framework-olm-master.yaml](https://github.com/openshift/release/blob/master/ci-operator/config/openshift/operator-framework-olm/openshift-operator-framework-olm-master.yaml).
4343

4444
**NOTE**: I believe there is some automation that updates the base images, though I don't know. I'll leave this as a questions to the reviewer, and if no one knows, I'll go after it.
4545

46-
### Downstream sync
46+
## Downstream sync
4747

4848
The complete information about the downstreaming process can be found [here](https://docs.google.com/document/d/139yXeOqAJbV1ndC7Q4NbaOtzbSdNpcuJan0iemORd3g/edit).
4949

5050
TL;DR;
5151

5252
We sync three upstream repositories ([api](https://github.com/operator-framework/api), [registry](https://github.com/operator-framework/operator-registry), [olm](https://github.com/operator-framework/operator-lifecycle-manager)) to the downstream [olm mono-repo](https://github.com/openshift/operator-framework-olm). Commits from the upstream repositories are cherry-picked to the appropriate `staging` directory in the downstream repository. Because this is a monorepo in the `Openshift` GitHub organization, two things need to be remembered:
53-
- we don't pull in upstream `vendor` folder changes
54-
- we don't pull in changes to `OWNERS` files
55-
- after each cherry-pick we execute: `make vendor` and `make manifests` to ensure a) the downstream dependencies are updated b) to ensure any manifest changes are picked up downstream
56-
-- Note: `make manifests` requires [GNU sed](https://www.gnu.org/software/sed/)
5753

58-
While manual changes to the `staging` directory should be avoided, there could be instances where there drift between the downstream `staging` directory and the corresponding upstream repository. This can happen due to applying commits out-of-order, e.g. due to feature freeze, etc.
54+
- we don't pull in upstream `vendor` folder changes
55+
- we don't pull in changes to `OWNERS` files
56+
- after each cherry-pick we execute: `make vendor` and `make manifests` to ensure a) the downstream dependencies are updated b) to ensure any manifest changes are picked up downstream
57+
- Note: `make manifests` requires [GNU sed](https://www.gnu.org/software/sed/)
58+
59+
While manual changes to the `staging` directory should be avoided, there could be instances where there drift between the downstream `staging` directory and the corresponding upstream repository. This can happen due to applying commits out-of-order, e.g. due to feature freeze, etc.
5960

60-
Therefore, after a sync, it is important to manually verify the diff of `staging` and the upstream. Please note, though, that some downstream changes are downstream only. These are, however, few and far between and there are comments to indicate that a block of code is downstream only.
61+
Therefore, after a sync, it is important to manually verify the diff of `staging` and the upstream. Please note, though, that some downstream changes are downstream only. These are, however, few and far between and there are comments to indicate that a block of code is downstream only.
6162

62-
The downstream sync process is facilitated by two scripts: `scripts/sync_get_candidates.sh` and `scripts/sync_pop_candidate.sh`, which compare the upstream remote with the appropriate `staging` directory and gets a stack of commits to sync, and cherry-pick those commits in reverse order. What does this look like in practice:
63+
The downstream sync process is facilitated by two scripts: `scripts/sync_get_candidates.sh` and `scripts/sync_pop_candidate.sh`, which compare the upstream remote with the appropriate `staging` directory and gets a stack of commits to sync, and cherry-pick those commits in reverse order. What does this look like in practice:
6364

6465
```bash
6566
# Clone downstream
@@ -72,8 +73,8 @@ git remote add operator-lifecycle-manager [email protected]:operator-framework/oper
7273
7374
# Get upstream commit candidates: ./scripts/sync_get_candidates.sh <api|operator-registry|operator-lifecycle-manager> <branch>
7475
# The shas will be found in ./<api|operator-registry|operator-lifecycle-manager>.cherrypick
75-
./scripts/sync_get_candidates.sh api master
76-
./scripts/sync_get_candidates.sh operator-registry master
76+
./scripts/sync_get_candidates.sh api master
77+
./scripts/sync_get_candidates.sh operator-registry master
7778
./scripts/sync_get_candidates.sh operator-lifecycle-manager master
7879
7980
# Sync upstream commits: ./scripts/sync_pop_candidate.sh <api|operator-registry|operator-lifecycle-manager> [-a]
@@ -90,7 +91,7 @@ sync_pop_candidate.sh operator-registry -a
9091
# Depending on the changes being pulled in, the order of repos you sync _could_ matter and _could_ leave a commit in an unbuildable state
9192
```
9293

93-
Example:
94+
Example:
9495

9596
```bash
9697
$ sync_pop_candidate.sh operator-lifecycle-manager -a
@@ -117,7 +118,7 @@ hint: run "git cherry-pick --abort".
117118
118119
$ rm -rf staging/operator-lifecycle-manager/vendor
119120
120-
# make sure there are no conflics in
121+
# make sure there are no conflics in
121122
# staging/operator-lifecycle-manager/go.mod and go.sum
122123
$ cd staging/operator-lifecycle-manager
123124
$ go mod tidy
@@ -131,4 +132,4 @@ $ sync_pop_candidate.sh operator-lifecycle-manager -a
131132

132133
#### Running console test locally
133134

134-
The [console](https://github.com/openshift/console) repository contains all instructions you need to execute the console tests locally. The olm console tests can be found [here](https://github.com/openshift/console/tree/master/frontend/packages/operator-lifecycle-manager)
135+
The [console](https://github.com/openshift/console) repository contains all instructions you need to execute the console tests locally. The olm console tests can be found [here](https://github.com/openshift/console/tree/master/frontend/packages/operator-lifecycle-manager)

docs/local-testing-with-crc.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Local testing with CRC
22

3-
We can use CRC as an Openshift-like environment within which to test downstream OLM. [CRC](https://developers.redhat.com/products/codeready-containers/overview)
3+
We can use CRC as an Openshift-like environment within which to test downstream OLM. [CRC](https://developers.redhat.com/products/codeready-containers/overview)
44
is a tool for deploying a local Openshift cluster on your laptop.
55

66
TL;DR
@@ -10,16 +10,16 @@ TL;DR
1010
3. `export KUBECONFIG=~/.crc/machines/crc/kubeconfig`
1111
4. Execute e2e tests as you normally would, e.g., `make e2e/olm`
1212

13-
#### Gosh darn it, how does it work?
13+
## Gosh darn it, how does it work?
1414

1515
`./scripts/crc-start.sh` is used to provision a crc cluster. `./scripts/crc-deploy.sh` pushes the `olm:test` and `opm:test` to
1616
`image-registry.openshift-image-registry.svc:5000/openshift/olm:test` and `image-registry.openshift-image-registry.svc:5000/openshift/opm:test`
1717
images to the crc image registry under the global project `openshift` (to be independent from the olm namespace). It also generates an image stream
18-
from these images. Finally, using the istag for the image. It also generates the olm manifests by applying generated helm values file (`values-crc-e2e.yaml`)
18+
from these images. Finally, using the istag for the image. It also generates the olm manifests by applying generated helm values file (`values-crc-e2e.yaml`)
1919
and other generated yaml patches (`scripts/*.crc.e2e.patch.yaml`) to make sure the manifests point to the newly pushed images. The generated manifests are
2020
then applied to the cluster using `kubectl replace` in priority order (lexical sort).
2121

22-
#### Make targets
22+
## Make targets
2323

2424
1. `make crc-start`: provision a crc cluster, if necessary
2525
1. `FORCE_CLEAN=1 make crc-start`: nuke any current installation including cache and current cluster instance
@@ -29,7 +29,7 @@ then applied to the cluster using `kubectl replace` in priority order (lexical s
2929
2. `SKIP_WAIT_READY=1 make crc-deploy`: skip waiting for olm deployments to be available at the end
3030
4. `make crc`: the same as `make crc-start crc-build crc-deploy`
3131

32-
#### Manipulating Resources
32+
## Manipulating Resources
3333

3434
If new resources are introduced that require being updated for local deployment (e.g. updating the pod spec image) follow
35-
the pattern used in `scripts/crc-deploy.sh:make_manifest_patches`
35+
the pattern used in `scripts/crc-deploy.sh:make_manifest_patches`.

0 commit comments

Comments
 (0)