# 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 # Note that environment variables can be set in several places # See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence image: docker:19.03 services: - docker:19.03-dind variables: DOCKER_HOST: tcp://docker:2376 DOCKER_TLS_CERTDIR: "/certs" stages: - build - test - deploy build: stage: build before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY script: - docker pull $CI_REGISTRY_IMAGE:latest || true - docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID . - docker push $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID test: stage: test image: $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID script: - python --version - nikola --version - pip --version - pip freeze deploy: stage: deploy before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY script: - docker pull $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID - docker tag $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID $CI_REGISTRY_IMAGE:latest - docker push $CI_REGISTRY_IMAGE:latest sast: stage: test include: - template: Security/SAST.gitlab-ci.yml