Commit e85b975a authored by Simon Volpert's avatar Simon Volpert 🐧
Browse files

img platforms variable

parent e855aebe
......@@ -64,6 +64,7 @@ Builds a multi-arch container image on Kubernetes using the `img` tool
**Jobs**: `containerize`,
| Configuration Option | Default | Description |
| -------------------- | ------- | ------------------------------- |
| `IMG_BUILD_DIR` | `.` | Set the build directory to path |
| Configuration Option | Default | Description |
| -------------------- | -------------------------------------- | ------------------------------- |
| `IMG_BUILD_DIR` | `.` | Set the build directory to path |
| `IMG_PLATFORMS` | `linux/amd64,linux/arm64,linux/arm/v7` | List of platforms to build for |
variables:
variables:
IMG_BUILD_DIR: .
IMG_PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
containerize:
tags:
......@@ -9,7 +10,7 @@ containerize:
entrypoint: [""]
script:
- img login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- img build --platform linux/amd64,linux/arm64,linux/arm/v7 -t "$CI_REGISTRY_IMAGE" $IMG_BUILD_DIR
- img build --platform $IMG_PLATFORMS -t "$CI_REGISTRY_IMAGE" $IMG_BUILD_DIR
- img tag "$CI_REGISTRY_IMAGE" "$CI_REGISTRY_IMAGE":"$CI_COMMIT_REF_NAME"
- img push "$CI_REGISTRY_IMAGE"
- img push "$CI_REGISTRY_IMAGE":"$CI_COMMIT_REF_NAME"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment