Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
chore(RHTAPWATCH-895): add BYO Quay docs
Browse files Browse the repository at this point in the history
Signed-off-by: Ernesto González <[email protected]>
  • Loading branch information
ernesgonzalez33 committed Apr 26, 2024
1 parent 4f3b293 commit ca3ad89
Showing 1 changed file with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,52 @@ To exchange the build task with a memory limit of 6 GB, complete the following s
.. Under `.taskRef.params`, set `name` to `buildah-6gb`.
.. Under `.taskRef.params`, set `bundle` to `quay.io/redhat-appstudio-tekton-catalog/task-buildah-6gb:0.1`.

== Bring your own Quay repository to the build pipeline

By default, all pipelines push the images to the `quay.io/redhat-user-workloads` repository. It is not mandatory to use this Quay repo, so if you want to use your own Quay repo to control user permissions, you can do this by updating the `output-image` parameter in the pipelines.

.Procedure

. You will need a secret to push the images to your Quay repo.
.. Follow Quay's link:https://docs.quay.io/glossary/robot-accounts.html[docs] to create a robot account for your repo.
.. Give push access to your repository to the robot account.
.. Retrieve the `.dockercfg` from the "Docker Configuration" menu on your robot account credentials page.
.. Follow the steps to link:proc_creating-secrets-for-your-builds.adoc[create a secret for your build] and do it as an "Image Pull Secret".

[NOTE]
====
You need to delete the `"auths": {` and one `}` at the end of the docker config file for the secret to work. Until this https://issues.redhat.com/browse/KFLUXBUGS-1160[bug] is resolved.
For example, this is how you will get the file from Quay:
[source, json]
----
{
"auths": {
"quay.io": {
"auth": "example",
"email": "example"
}
}
}
----
And this is how you should upload it to Konflux:
[source, json]
----
{
"quay.io": {
"auth": "example",
"email": "example"
}
}
----
====

[start=2]
. Go to the GitHub repo of your component.
. In each .yaml file in the .tekton directory, under params, locate the param named output-image:
.. Change it to the new repository. For example: `quay.io/my-new-quay-repo/my-app:on-pr-{\{revision}}` for the `pull-request` pipeline, and `quay.io/my-new-quay-repo/my-app:{\{revision}}` for the `push` pipeline. This is a best practice to know which images come from a Pull Request and which don't.

== Verification

When you commit changes to these `.yaml` files in your repository, {ProductName} automatically triggers a new build. Wait for {ProductName} to complete the new build, then verify your changes have been made by following these steps:
Expand Down

0 comments on commit ca3ad89

Please sign in to comment.