Skip to content

Commit 2f3e671

Browse files
mike-sulkprosise
authored andcommitted
ug: custom-ci: add doc on publishing app to 3rd party registries
Signed-off-by: Mike Sul <mike.sul@foundries.io>
1 parent 278c944 commit 2f3e671

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

source/user-guide/custom-ci/custom-ci-for-apps.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,35 @@ Check the Workflow Result
107107
You can view your Factory Targets in the UI to check whether the new Targets were created, and if their content is correct.
108108
This can also be verified by running ``fioctl targets list`` and ``fioctl targets show <target-version>``.
109109

110+
Using Third-Party Container Registries
111+
--------------------------------------
112+
113+
It is possible to push the built container images and the Compose App to a third-party container registry instead of the default `FoundriesFactory Registry`_.
114+
115+
To do so, use `the sample GitHub actions workflow`_ as a starting point and:
116+
117+
1. Modify the workflow so it can authenticate and obtain **write access** to your container registry.
118+
2. Set the appropriate value for the ``IMAGE_BASE_URL`` environment variable and optionally ``IMAGE_NAMESPACE``.
119+
120+
``IMAGE_BASE_URL`` should point to the base URL of the container registry where images will be pushed.
121+
122+
Example: Using Amazon ECR
123+
~~~~~~~~~~~~~~~~~~~~~~~~~
124+
125+
This is an `example GitHub Actions workflow`_ that builds container images and pushes them,
126+
along with the Compose App, to **Amazon Elastic Container Registry (ECR)**.
127+
128+
The workflow extends the base workflow by:
129+
130+
- adding steps that authenticate the workflow to AWS
131+
- granting the workflow permission to push images to ECR
132+
- setting ``IMAGE_BASE_URL`` to the ECR registry URL
133+
134+
Authentication to AWS is performed using **OpenID Connect (OIDC)**.
135+
136+
With OIDC, a GitHub workflow requests a short-lived identity token from GitHub and exchanges it with AWS for **temporary credentials**.
137+
These credentials allow the workflow to interact with AWS services such as ECR without storing long-lived AWS access keys in GitHub.
138+
110139
.. _FoundriesFactory Registry:
111140
https://hub.foundries.io
112141

@@ -128,5 +157,8 @@ This can also be verified by running ``fioctl targets list`` and ``fioctl target
128157
.. _The sample GitHub actions workflow:
129158
https://github.com/foundriesio/custom-ci-app/blob/custom-ci-devel/.github/workflows/fio-app-ci.yml
130159

160+
.. _example GitHub Actions workflow:
161+
https://github.com/foundriesio/custom-ci-app/blob/custom-ci-devel/.github/workflows/fio-app-ci-ecr.yml
162+
131163
.. _composectl:
132164
https://github.com/foundriesio/composeapp

0 commit comments

Comments
 (0)