add gitlab ci to build image
This commit is contained in:
parent
9aeab6ee3b
commit
a913a6db8e
1 changed files with 37 additions and 0 deletions
37
.gitlab-ci.yml
Normal file
37
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
variables:
|
||||||
|
REGISTRY: registry.vshn.net
|
||||||
|
NAMESPACE: vshn-servalafe-prod
|
||||||
|
OC_IMAGE: docker.io/appuio/oc:v4.16
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
.base:
|
||||||
|
stage: build
|
||||||
|
image: docker:stable
|
||||||
|
tags:
|
||||||
|
- dockerbuild_sks
|
||||||
|
services:
|
||||||
|
- name: docker:dind
|
||||||
|
command: ["--mtu=1450"]
|
||||||
|
before_script:
|
||||||
|
- until docker info; do sleep 5; done
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
|
||||||
|
docker-build-latest:
|
||||||
|
extends: .base
|
||||||
|
script:
|
||||||
|
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
|
||||||
|
- docker push "$CI_REGISTRY_IMAGE"
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
stage: deploy
|
||||||
|
image: $OC_IMAGE
|
||||||
|
script:
|
||||||
|
- echo "todo"
|
||||||
|
environment:
|
||||||
|
name: prod
|
||||||
|
url: https://poc.serva.la/
|
Loading…
Add table
Add a link
Reference in a new issue