# You can override the included template(s) by including variable overrides # SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings # Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings # Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings # Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings # Note that environment variables can be set in several places # See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence stages: - test - build sast: stage: test include: - template: Security/SAST.gitlab-ci.yml build: image: docker:latest services: - docker:dind variables: DOCKER_DRIVER: overlay stage: build script: - docker build -t "corysanin/rickognito:latest" -t "$CI_REGISTRY_IMAGE:latest" -f ./Dockerfile . - "if [ ! -z ${DOCKER_PASSWORD+x} ]; then echo \"$DOCKER_PASSWORD\" | docker login -u \"$DOCKER_USERNAME\" --password-stdin; docker push \"corysanin/rickognito:latest\"; fi" - if [ ! -z ${CI_REGISTRY_PASSWORD+x} ]; then echo "$CI_REGISTRY_PASSWORD" | docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" --password-stdin; docker push "$CI_REGISTRY_IMAGE:latest"; fi