FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 825ad628 authored by Dr Rich Wareham's avatar Dr Rich Wareham
Browse files

add Auto-DevOps GitLab CI template

Bring in the Auto-DevOps template from GitLab. We do our own matrix
testing but this brings in the various security, lecence and dependency
scanning tools from Auto-DevOps.

In order to make use of these scanning tools we build a small container
but this is not intended to run the application, just to contain the
source so that the various scanners can scan it. That being said we do
"pip install" within the container so that a basic "pip install" test
must pass before we start all the rest of the test jobs.

Closes #7
parent f949ddb4
No related branches found
No related tags found
1 merge request!7add Auto-DevOps GitLab CI template
Pipeline #1173 passed
...@@ -6,6 +6,16 @@ ...@@ -6,6 +6,16 @@
# #
# See also: https://gitlab.com/gitlab-org/gitlab-ce/issues/19199 # See also: https://gitlab.com/gitlab-org/gitlab-ce/issues/19199
include:
# Bring in the AutoDevOps template from GitLab.
# It can be viewed at:
# https://gitlab.com/gitlab-org/gitlab-ee/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
- template: Auto-DevOps.gitlab-ci.yml
variables:
# We use matrix testing (below) rather than the Auto-DevOps "test" job.
TEST_DISABLED: "true"
# Test code coverage # Test code coverage
coverage: coverage:
extends: .test extends: .test
...@@ -119,6 +129,8 @@ python37-django21: ...@@ -119,6 +129,8 @@ python37-django21:
# Base test template job. # Base test template job.
.test: .test:
stage: test
image: python:${PYTHON_VERSION} image: python:${PYTHON_VERSION}
script: script:
......
# AutoDevOps-friendly Dockerfile. This Dockerfile is simply used to build a
# container containing the code so that automated container scanning processes
# can work. As such it doesn't really need to allow the code to be "run", just
# be present. Despite this we do a "pip install" so that we test the
# pip-install-ability of the library
FROM registry.gitlab.developers.cam.ac.uk/uis/devops/infra/dockerimages/python:latest
WORKDIR /usr/src/app
ADD ./ ./
RUN pip install .
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment