50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
.docker-build:
|
|
stage: build
|
|
image:
|
|
name: gcr.io/kaniko-project/executor:v1.23.2-debug
|
|
entrypoint: [""]
|
|
script:
|
|
- /kaniko/executor
|
|
--context "${CI_PROJECT_DIR}"
|
|
--build-arg "GITLAB_USER=${CI_DEPLOY_USER}"
|
|
--build-arg "GITLAB_PASSWORD=${CI_DEPLOY_PASSWORD}"
|
|
--build-arg "PHP_8_5_TAG=${PHP_8_5_TAG}"
|
|
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
|
|
--destination "${IMAGE_TAG}"
|
|
--cache=true
|
|
--cache-ttl 24h
|
|
allow_failure: false
|
|
dependencies:
|
|
- composer-security
|
|
- npm-security
|
|
needs:
|
|
- job: composer-security
|
|
optional: true
|
|
- job: npm-security
|
|
optional: true
|
|
|
|
docker-build:staging:
|
|
extends: .docker-build
|
|
variables:
|
|
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:s-${CI_COMMIT_SHA}"
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == "trunk"
|
|
allow_failure: true
|
|
|
|
|
|
docker-build:latest:
|
|
extends: .docker-build
|
|
variables:
|
|
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:p-${CI_COMMIT_SHA}"
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"
|
|
allow_failure: true
|
|
|
|
|
|
docker-build:release:
|
|
extends: .docker-build
|
|
variables:
|
|
IMAGE_TAG: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
|
|
rules:
|
|
- if: $CI_COMMIT_TAG != null
|
|
allow_failure: true
|