|
| 1 | +<!-- |
| 2 | + Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | + contributor license agreements. See the NOTICE file distributed with |
| 4 | + this work for additional information regarding copyright ownership. |
| 5 | + The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | + (the "License"); you may not use this file except in compliance with |
| 7 | + the License. You may obtain a copy of the License at |
| 8 | +
|
| 9 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +
|
| 11 | + Unless required by applicable law or agreed to in writing, software |
| 12 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + See the License for the specific language governing permissions and |
| 15 | + limitations under the License. |
| 16 | +--> |
| 17 | + |
1 | 18 | # Contributing
|
2 | 19 |
|
3 |
| -For detailed contribution guideline, please check the [contribution guideline of Apache Ozone repository](https://github.com/apache/ozone/blob/master/CONTRIBUTING.md). |
| 20 | +For general contribution guideline, please check the [Apache Ozone repository](https://github.com/apache/ozone/blob/master/CONTRIBUTING.md). |
| 21 | + |
| 22 | +Development of the `ozone-testkrb5` image happens on branch `master`. |
| 23 | + |
| 24 | +## Local Build and Test |
| 25 | + |
| 26 | +### Building |
| 27 | + |
| 28 | +The image can be built simply by running the helper script `build.sh`: |
| 29 | + |
| 30 | +```bash |
| 31 | +$ ./build.sh |
| 32 | +... |
| 33 | + => => naming to docker.io/apache/ozone-testkrb5:dev |
| 34 | +``` |
| 35 | + |
| 36 | +This will create a single-platform image for your architecture. |
| 37 | + |
| 38 | +### Testing |
| 39 | + |
| 40 | +To try the image locally with Ozone acceptance tests: |
| 41 | + |
| 42 | +1. Update `docker.ozone-testkr5b.image` to `<username>/ozone-testkrb5:<commit SHA>` in [hadoop-ozone/dist/pom.xml](https://github.com/apache/ozone/blob/bb16f66e22c44b360d42d0cae87024786e27c61b/hadoop-ozone/dist/pom.xml#L29). |
| 43 | +2. Rebuild Ozone. |
| 44 | +3. Run [acceptance tests](https://github.com/apache/ozone/blob/master/hadoop-ozone/dist/src/main/compose/README.md) as needed. |
| 45 | + |
| 46 | +## GitHub Workflows |
| 47 | + |
| 48 | +If this is your first time working on the image, please enable GitHub Actions workflows after forking the repo. |
| 49 | + |
| 50 | +### Building |
| 51 | + |
| 52 | +Whenever changes are pushed to your fork, GitHub builds a multi-platform image (for `amd64` and `arm64`), and tags it with the commit SHA. These images can be shared with other developers for feedback. Workflow runs are listed at `https://github.com/<username>/ozone-docker-testkrb5/actions`, images at `https://github.com/<username>/ozone-docker-testkrb5/pkgs/container/ozone-testkrb5`. |
| 53 | + |
| 54 | +### Testing |
| 55 | + |
| 56 | +To run complete Ozone CI with the custom image: |
| 57 | + |
| 58 | +1. Create a new branch in your clone of `apache/ozone`. |
| 59 | +2. Update `docker.ozone-testkr5b.image` as described above. |
| 60 | +3. Commit the change and push to your fork of `apache/ozone`. |
| 61 | + |
| 62 | +## Publishing Docker Tags (for committers) |
4 | 63 |
|
| 64 | +1. Fetch changes to your local clone. |
| 65 | +2. Add a Git tag for the commit following the existing pattern `<date>-<n>`, where `<n>` starts at 1, and is incremented if multiple images need to be published the same day. |
| 66 | +3. Push the Git tag to the official repo (`apache/ozone-docker-testkrb5`). This will trigger a workflow to apply the tag to the Docker image. |
0 commit comments