Skip to content

Commit 04fdfff

Browse files
doc: add Doc how to contribute and test the deploy of binaries #2747 (#2814)
1 parent f50d3f0 commit 04fdfff

File tree

2 files changed

+73
-3
lines changed

2 files changed

+73
-3
lines changed

doc/dev/developer_guide.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,39 @@ $ make lint
4747

4848
**NOTE** Note that for it is required to install `golangci-lint` locally. For more info see its [doc](https://github.com/golangci/golangci-lint#install)
4949

50+
## How the operator-sdk binaries are built
51+
52+
In the release process, the script [.release.sh][release-sh] is executed and it will call the [makefile][makefile] target [make release](https://github.com/operator-framework/operator-sdk/blob/master/Makefile#L113). To know more about the release process, see the [doc][release-doc] also see [operator-sdk releases](https://github.com/operator-framework/operator-sdk/releases).
53+
54+
**NOTE** The Deploy stage (configured in [.travis.yml ][travis]) builds also execute the same [makefile][makefile] targets. This stage is executed against the master branch when a Pull Request is merged.
55+
56+
## How to test the build of operator-sdk binaries
57+
58+
Follow these steps to execute the Travis `Deploy` stage against your branch to demonstrate that the merge build will complete as expected.
59+
60+
- Enable the Travis in your fork repository. For more info see [`To get started with Travis CI using GitHub`](https://docs.travis-ci.com/user/tutorial/#to-get-started-with-travis-ci-using-github)
61+
- Create image repos in quay (or another registry that supports multi-arch images) for ansible, helm, and scorecard proxy. For each image type, you need repos for the manifest list and one for each architecture (e.g. `ansible-operator`, `ansible-operator-amd64`, `ansible-operator-s390x`, etc.)
62+
63+
**NOTE** Be sure to make each repository public.
64+
65+
- Set the following environment variables in the Travis settings for your fork:
66+
67+
- `ANSIBLE_IMAGE` docker image name (e.g. `quay.io/joelanford/ansible-operator`)
68+
- `HELM_IMAGE` same as above, but for helm
69+
- `SCORECARD_PROXY_IMAGE` same as above, but for scorecard proxy
70+
- `DOCKER_USERNAME` credentials for your repo
71+
- `DOCKER_PASSWORD` credentials for your repo
72+
- `DOCKER_CLI_EXPERIMENTAL` set to `enabled`
73+
- `COVERALLS_TOKEN` token to integrate the project with `https://coveralls.io/`. So, enable your fork in `https://coveralls.io/` and generate a token to allow it.
74+
75+
- Make a commit with `[travis deploy]` in the commit message on the branch with the changes.
76+
- Check the travis build for your branch in your fork (not the PR build in the operator-sdk repo, since we don't allow PRs to build images in the `operator-framework` quay repo.)
77+
78+
**NOTE** Post a link in the Pull Request to the Travis build page showing successful `Deploy` and `Deploy multi-arch manifest lists` stages with your changes.
5079

5180
See the project [README][sdk-readme] for more details.
5281

82+
5383
[git-tool]:https://git-scm.com/downloads
5484
[go-tool]:https://golang.org/dl/
5585
[repo-sdk]:https://github.com/operator-framework/operator-sdk
@@ -58,4 +88,8 @@ See the project [README][sdk-readme] for more details.
5888
[kubectl-tool]:https://kubernetes.io/docs/tasks/tools/install-kubectl/
5989
[sdk-readme]:../../README.md
6090
[running-the-tests]: ./testing/running-the-tests.md
61-
[testing-changes-locally]: local-changes.md
91+
[testing-changes-locally]: local-changes.md
92+
[makefile]:../../Makefile
93+
[travis]:../../.travis.yml
94+
[release-sh]:../../release.sh
95+
[release-doc]: release.md

website/content/en/docs/contribution-guidelines/developer-guide.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This document explains how to setup your dev environment.
1212
## Download Operator SDK
1313

1414
Go to the [Operator SDK repo][repo-sdk] and follow the [fork guide][fork-guide] to fork, clone, and setup the local operator-sdk repository.
15+
1516
## Build the Operator SDK CLI
1617

1718
Build the Operator SDK CLI `operator-sdk` binary:
@@ -20,6 +21,8 @@ Build the Operator SDK CLI `operator-sdk` binary:
2021
$ make install
2122
```
2223

24+
Then, now you are able to test and use the operator-sdk build using the source code.
25+
2326
## Testing
2427

2528
The SDK includes many tests that are run as part of CI.
@@ -39,7 +42,6 @@ $ make test
3942
For more information on running testing and correctly configuring your environment,
4043
refer to the [`Running the Tests Locally`][running-the-tests] document. To incorporate code changes in your development environment see the [`Testing changes Locally`][testing-changes-locally] document.
4144

42-
4345
To run the lint checks done in the CI locally, run:
4446

4547
```sh
@@ -48,6 +50,36 @@ $ make lint
4850

4951
**NOTE** Note that for it is required to install `golangci-lint` locally. For more info see its [doc](https://github.com/golangci/golangci-lint#install)
5052

53+
## How the operator-sdk binaries are built
54+
55+
In the release process, the script [.release.sh][release-sh] is executed and it will call the [makefile][makefile] target [make release](https://github.com/operator-framework/operator-sdk/blob/master/Makefile#L113). To know more about the release process, see the [doc][release-doc] also see [operator-sdk releases](https://github.com/operator-framework/operator-sdk/releases).
56+
57+
**NOTE** The Deploy stage (configured in [.travis.yml ][travis]) builds also execute the same [makefile][makefile] targets. This stage is executed against the master branch when a Pull Request is merged.
58+
59+
## How to test the build of operator-sdk binaries
60+
61+
Follow these steps to execute the Travis `Deploy` stage against your branch to demonstrate that the merge build will complete as expected.
62+
63+
- Enable the Travis in your fork repository. For more info see [`To get started with Travis CI using GitHub`](https://docs.travis-ci.com/user/tutorial/#to-get-started-with-travis-ci-using-github)
64+
- Create image repos in quay (or another registry that supports multi-arch images) for ansible, helm, and scorecard proxy. For each image type, you need repos for the manifest list and one for each architecture (e.g. `ansible-operator`, `ansible-operator-amd64`, `ansible-operator-s390x`, etc.)
65+
66+
**NOTE** Be sure to make each repository public.
67+
68+
- Set the following environment variables in the Travis settings for your fork:
69+
70+
- `ANSIBLE_IMAGE` docker image name (e.g. `quay.io/joelanford/ansible-operator`)
71+
- `HELM_IMAGE` same as above, but for helm
72+
- `SCORECARD_PROXY_IMAGE` same as above, but for scorecard proxy
73+
- `DOCKER_USERNAME` credentials for your repo
74+
- `DOCKER_PASSWORD` credentials for your repo
75+
- `DOCKER_CLI_EXPERIMENTAL` set to `enabled`
76+
- `COVERALLS_TOKEN` token to integrate the project with `https://coveralls.io/`. So, enable your fork in `https://coveralls.io/` and generate a token to allow it.
77+
78+
- Make a commit with `[travis deploy]` in the commit message on the branch with the changes.
79+
- Check the travis build for your branch in your fork (not the PR build in the operator-sdk repo, since we don't allow PRs to build images in the `operator-framework` quay repo.)
80+
81+
**NOTE** Post a link in the Pull Request to the Travis build page showing successful `Deploy` and `Deploy multi-arch manifest lists` stages with your changes.
82+
5183
See the project [README][sdk-readme] for more details.
5284

5385
[git-tool]:https://git-scm.com/downloads
@@ -58,4 +90,8 @@ See the project [README][sdk-readme] for more details.
5890
[kubectl-tool]:https://kubernetes.io/docs/tasks/tools/install-kubectl/
5991
[sdk-readme]: https://github.com/operator-framework/operator-sdk/blob/master/README.md
6092
[running-the-tests]: ../testing/running-the-tests
61-
[testing-changes-locally]: ../testing/local-changes
93+
[testing-changes-locally]: ../testing/local-changes
94+
[makefile]: https://github.com/operator-framework/operator-sdk/blob/master/Makefile
95+
[travis]: https://github.com/operator-framework/operator-sdk/blob/master/.travis.yml
96+
[release-sh]: https://github.com/operator-framework/operator-sdk/blob/master/release.sh
97+
[release-doc]: release

0 commit comments

Comments
 (0)