Commit 0474f25e authored by Morten Brekkevold's avatar Morten Brekkevold
Browse files

Initial commit

parents
include:
- project: 'asm/gitlab-ci-helpers'
file: '/gitlab-ci-helpers.yml'
variables:
KUBE_TEST_ID: mist-argus
HTTP_PORT: '8000' # The port number of the web server.
REPLICAS: '1'
stages:
- build
- test
- review
- staging
- production
build:
extends: .docker-build
stage: build
only:
- branches
imagescan:
extends: .imagescan
stage: test
only:
- branches
production:
extends: .production
stage: production
variables:
REPLICAS: "2"
script:
- deploy deployment.yaml
staging:
extends: .staging
stage: staging
script:
- deploy deployment.yaml
review:
extends: .review
stage: review
script:
- deploy deployment-review.yaml
stop_review:
extends: .stop_review
stage: review
FROM python:3.8
RUN pip install gunicorn
RUN pip install gunicorn git+git@scm.uninett.no:cnaas/mist-argus-run.git@reorganize
CMD ["gunicorn", "--log-level=debug", "--bind", "0.0.0.0:8000", "mist_argus.webhook:app"]
apiVersion: apps/v1
kind: Deployment
metadata:
name: $CI_ENVIRONMENT_SLUG
namespace: $KUBE_NAMESPACE
annotations:
app.gitlab.com/env: $CI_ENVIRONMENT_SLUG
app.gitlab.com/app: $CI_PROJECT_PATH_SLUG
labels:
app: $CI_ENVIRONMENT_SLUG
pipeline_id: "$CI_PIPELINE_ID"
build_id: "$CI_BUILD_ID"
spec:
replicas: $REPLICAS
selector:
matchLabels:
app: $CI_ENVIRONMENT_SLUG
template:
metadata:
annotations:
app.gitlab.com/env: $CI_ENVIRONMENT_SLUG
app.gitlab.com/app: $CI_PROJECT_PATH_SLUG
labels:
name: $CI_ENVIRONMENT_SLUG
app: $CI_ENVIRONMENT_SLUG
spec:
containers:
- name: app
image: $CI_REGISTRY_IMAGE:$CI_REGISTRY_TAG
ports:
- containerPort: 8000
name: web
protocol: TCP
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment