stages: - go-test - build - test - dast build: stage: build image: name: gcr.io/kaniko-project/executor:v1.9.1-debug entrypoint: [""] except: - tags variables: IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:$CI_COMMIT_SHA UPDATER_IMAGE_TAG: $CI_REGISTRY_IMAGE/updater-$CI_COMMIT_BRANCH:$CI_COMMIT_SHA LATEST_IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:latest LATEST_UPDATER_IMAGE_TAG: $CI_REGISTRY_IMAGE/updater-$CI_COMMIT_BRANCH:latest before_script: - echo $IMAGE_TAG - echo $UPDATER_IMAGE_TAG - echo $LATEST_IMAGE_TAG - echo $LATEST_UPDATER_IMAGE_TAG script: - /kaniko/executor --cache=true --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${IMAGE_TAG}" --destination "${LATEST_IMAGE_TAG}" - /kaniko/executor --cache=true --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile.updater" --destination "${UPDATER_IMAGE_TAG}" --destination "${LATEST_UPDATER_IMAGE_TAG}" build-tag: stage: build only: - tags variables: IMAGE_TAG: $CI_REGISTRY_IMAGE/web:$CI_COMMIT_TAG UPDATER_IMAGE_TAG: $CI_REGISTRY_IMAGE/updater:$CI_COMMIT_TAG before_script: - echo $IMAGE_TAG - echo $UPDATER_IMAGE_TAG script: - /kaniko/executor --cache=true --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${IMAGE_TAG}" - /kaniko/executor --cache=true --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile.updater" --destination "${UPDATER_IMAGE_TAG}" go-test: stage: go-test image: golang:1.23.1 script: - go test -v ./pkg/models/...