Commit 33c01f43 authored by Jørn Åne de Jong's avatar Jørn Åne de Jong

Initial build pipeline

parents
Pipeline #2814 failed with stages
in 10 seconds
image: registry.uninett.no/system/kubernetes-deploy:v0.8
variables:
HTTP_PORT: '80' # The port number of the web server.
REPLICAS: '2'
stages:
- build
- staging
- production
build:
stage: build
script:
- git submodule init
- git submodule update
- build
only:
- branches
production:
stage: production
variables:
CI_ENVIRONMENT_URL: $KUBE_PROD_URL
script:
- deploy kubernetes.yaml
environment:
name: production
url: $KUBE_PROD_URL
when: manual
only:
- master
staging:
stage: staging
variables:
CI_ENVIRONMENT_URL: $KUBE_STAGING_URL
REPLICAS: '1'
script:
- deploy kubernetes.yaml
environment:
name: staging
url: $KUBE_STAGING_URL
only:
- master
[submodule "eduroam-configurator"]
path = eduroam-configurator
url = https://github.com/UNINETT/eduroam-configurator.git
FROM php:7.1.6-apache
COPY eduroam-configurator/src/ /var/www/src/
COPY eduroam-configurator/www/ /var/www/html/
eduroam-configurator:
git submodule init
git submodule update
docker: eduroam-configurator
docker rm -f eduroam-configurator || true
docker build -t eduroam-configurator .
docker-run: docker
docker rm -f eduroam-configurator || true
docker run -d -p 8000:80 --name eduroam-configurator eduroam-configurator
sleep 1
docker logs eduroam-configurator
Subproject commit 2dec2c95d51c77f99aa945cada5a50a72677eb96
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: $CI_ENVIRONMENT_SLUG
namespace: $KUBE_NAMESPACE
labels:
app: $CI_ENVIRONMENT_SLUG
pipeline_id: "$CI_PIPELINE_ID"
build_id: "$CI_BUILD_ID"
spec:
replicas: $REPLICAS
template:
metadata:
labels:
name: $CI_ENVIRONMENT_SLUG
app: $CI_ENVIRONMENT_SLUG
spec:
containers:
- name: app
image: $CI_REGISTRY_IMAGE:$CI_REGISTRY_TAG
imagePullPolicy: Always
resources:
limits:
memory: 500Mi
requests:
memory: 300Mi
ports:
- name: web
containerPort: $HTTP_PORT
livenessProbe:
httpGet:
path: /
port: $HTTP_PORT
initialDelaySeconds: 15
timeoutSeconds: 15
readinessProbe:
httpGet:
path: /download/?idp=9;profile=10
port: $HTTP_PORT
initialDelaySeconds: 5
timeoutSeconds: 15
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