Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit f740f5a7 authored by Dorian Turba's avatar Dorian Turba
Browse files

feat: add specs to template

parent af7b0e5e
No related branches found
No related tags found
No related merge requests found
spec:
inputs:
stage:
description: Stage of the job.
default: build
image_id:
description: Image name and tag of the built image.
default: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
context_path:
description: Path to the build context, usually the project.
default: .
dockerfile_name:
description: Name of the dockerfile.
default: Dockerfile
docker_host:
description: Docker daemon host URL.
default: tcp://docker:2375/
docker_driver:
description: Storage driver used by Docker.
default: overlay2
kaniko_options:
description: Additional options to pass to Kaniko for image building.
default: ""
kaniko_tag:
description: Version tag of the Kaniko executor image.
default: v1.23.2-debug
---
docker_build:
stage: build
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
PROJECT_PATH: .
KANIKO_OPTIONS: ""
DOCKER_HOST: $[[ inputs.docker_host ]]
DOCKER_DRIVER: $[[ inputs.docker_driver ]]
IMAGE_ID: $[[ inputs.image_id ]]
CONTEXT_PATH: $[[ inputs.context_path ]]
DOCKERFILE_NAME: $[[ inputs.dockerfile_name ]]
KANIKO_OPTIONS: $[[ inputs.kaniko_options ]]
KANIKO_TAG: $[[ inputs.kaniko_tag ]]
image:
name: gcr.io/kaniko-project/executor:v1.14.0-debug
name: gcr.io/kaniko-project/executor:${KANIKO_TAG}
entrypoint: [ "" ]
tags:
- docker
script:
# Kaniko use $CI_REGISTRY_USER and $CI_REGISTRY_PASSWORD to connect to the
# Kaniko uses $CI_REGISTRY_USER and $CI_REGISTRY_PASSWORD to connect to the
# registry
- /kaniko/executor
--context "${PROJECT_PATH}"
--dockerfile "${PROJECT_PATH}/Dockerfile"
--destination "${TARGET_IMAGE}"
--context "${CONTEXT_PATH}"
--dockerfile "${CONTEXT_PATH}/${DOCKERFILE_NAME}"
--destination "${IMAGE_ID}"
${KANIKO_OPTIONS}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment