---
include:
  - local: pipelines/container.yml

image:build:
  variables:
    IMAGE_CONTEXT: ${CI_PROJECT_DIR}/tests/mockup_projects/container/monorepo/image_A # Absolute path
    IMAGE_NAME: ${CI_REGISTRY_IMAGE}/image_a

image:image_B:
  extends: .image:build
  variables:
    IMAGE_CONTEXT: tests/mockup_projects/container/monorepo/image_B/ # Relative path with a slash
    IMAGE_NAME: ${CI_REGISTRY_IMAGE}/its_here/image_b

trivy:image:
  variables:
    IMAGE_NAME: ${CI_REGISTRY_IMAGE}/image_a
  allow_failure: false

trivy:image_B:
  extends: .trivy:image
  variables:
    IMAGE_NAME: ${CI_REGISTRY_IMAGE}/its_here/image_b
  needs:
    - image:image_B
  allow_failure: false
