1
0
mirror of https://github.com/hegerdes/gitlab-actions.git synced 2025-10-06 05:36:52 +02:00

fix: set input types in container-build

This commit is contained in:
Henrik Gerdes
2024-01-06 19:03:25 +01:00
parent 82cbd2c088
commit 4320660ec0
3 changed files with 27 additions and 14 deletions

View File

@@ -1 +0,0 @@

View File

@@ -31,7 +31,7 @@ The template should work without modifications but you can customize the templat
| ----- | ------------- | ----------- |
| `stage` | `build` | The stage where you want the job to be added |
| `build_image` | `gcr.io/kaniko-project/executor:debug` | The Docker image of kaniko |
| `force_run` | `false` | When set to `true` it always adds the job even if `$CONTAINER_SCANNING_DISABLED` is set |
| `force_run` | `false` | When set to `true` it always adds the job |
| `push` | `true` | When set to `true` the image will be pushed to the default registry. Set to `false` to only build without pushing the image. |
| `kaniko_use_cache` | `false` | When set to `true` kaniko will push build cache layers to the registry. Currently only the gitlab registry is supported. |
| `image_tag` | `$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG` | The name/path of the image to build. |

View File

@@ -1,8 +1,10 @@
spec:
inputs:
stage:
type: string
default: build
build_image:
type: string
default: gcr.io/kaniko-project/executor:debug
force_run:
type: boolean
@@ -14,29 +16,41 @@ spec:
type: boolean
default: false
image_tag:
default: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
type: string
default: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
context:
default: $CI_PROJECT_DIR
type: string
default: $CI_PROJECT_DIR
dockerfile:
default: $CI_PROJECT_DIR/Dockerfile
type: string
default: $CI_PROJECT_DIR/Dockerfile
authors:
default: $CI_COMMIT_AUTHOR
type: string
default: $CI_COMMIT_AUTHOR
source_url:
default: $CI_PROJECT_URL
type: string
default: $CI_PROJECT_URL
project_url:
default: $CI_PROJECT_URL
type: string
default: $CI_PROJECT_URL
version:
default: $CI_COMMIT_REF_NAME
type: string
default: $CI_COMMIT_REF_NAME
documentation_url:
default: $CI_PROJECT_URL
type: string
default: $CI_PROJECT_URL
description:
default: $CI_PROJECT_DESCRIPTION
type: string
default: $CI_PROJECT_DESCRIPTION
base_img_name:
default: UNKNOWN
type: string
default: UNKNOWN
vendor:
default: UNKNOWN
type: string
default: UNKNOWN
license:
default: UNKNOWN
type: string
default: UNKNOWN
---
container_build: