diff --git a/examples/CONTRIBUTING.md b/examples/CONTRIBUTING.md index 27343d30..6e84e69d 100644 --- a/examples/CONTRIBUTING.md +++ b/examples/CONTRIBUTING.md @@ -42,23 +42,23 @@ For `ko`, you need to set the base url for the repository these images are going export KO_DOCKER_REPO=ghcr.io//vcenter-event-broker-appliance ``` -You also need to set two environment variables for `ko`: `KO_TAG` and `KO_COMMIT` +You also need to set two environment variables for `ko`: `KO_TAG`, `KO_DOCKER_REPO`, and `KO_COMMIT` ```bash export KO_COMMIT=$(git rev-parse --short=8 HEAD) export KO_TAG= +export KO_DOCKER_REPO=ghcr.io// ``` Now you can build and push your new version of the example using `ko build` ```bash -ko build . --image-label org.opencontainers.image.source="https://github.com//vcenter-event-broker-appliance/" --tags --tags latest -B +ko build . --image-label org.opencontainers.image.source="//" --tags --tags latest -B ``` ### Notes - On GitHub, in order to attach an image to a repository we need to set the label `org.opencontainers.image.source` of the repository the package will be associated with. - we use the flag `-B` in order to use the base path without MD5 hash after `KO_DOCKER_REPO` -- > Currently, there is a behavior I am trying to debug where the tag of the image source does not work and it does not attach the package to the repository. If you find yourself in the situation you can attach the repository on the GitHub Package webpage ## Powercli Powershell @@ -67,14 +67,14 @@ For the Powercli examples we need to build the template that is on [knative/temp These templates use Dockerfiles and can build them using `docker build`. After you built the images we need to tag the images ```bash -docker image tag ghcr.io//vcenter-event-broker-appliance/:latest -docker image tag ghcr.io//vcenter-event-broker-appliance/: +docker image tag ghcr.io///:latest +docker image tag ghcr.io///: ``` To push these images we need to run ```bash - docker image push --all-tags ghcr.io//vcenter-event-broker-appliance/ + docker image push --all-tags ``` > Notes: the PowerCLI template depends on the PowerPS image. You need to build the base before the CLI version @@ -86,19 +86,19 @@ After you build the templates, you can now build any example on `knative/powersh [Buildpacks](https://buildpacks.io) are used to create the container image. We can build any example by using: ```bash -IMAGE=/: +IMAGE=ghcr.io///: pack build -B gcr.io/buildpacks/builder:v1 ${IMAGE} ``` If you are using pack@0.30.1 or newer version you can label images like ```bash -pack buildpack package $IMAGE -l org.opencontainers.image.source="https://github.com//vcenter-event-broker-appliance" +pack buildpack package $IMAGE -l org.opencontainers.image.source="//" ``` If you are using pack with an older version, we need to use `gcr.io/paketo-buildpacks/image-labels:4.5.2` buildpack ```bash -pack build -B gcr.io/buildpacks/builder:v1 -b gcr.io/paketo-buildpacks/image-labels:4.5.2 $IMAGE -e BP_IMAGE_LABELS=org.opencontainers.image.source="https://github.com//vcenter-event-broker-appliance" +pack build -B gcr.io/buildpacks/builder:v1 -b gcr.io/paketo-buildpacks/image-labels:4.5.2 $IMAGE -e BP_IMAGE_LABELS=org.opencontainers.image.source="//" ``` and then we can push the image