symposion_app/.gitlab-ci.yml

84 lines
2.1 KiB
YAML
Raw Normal View History

stages:
- build
- deploy
variables:
DOCKER_TLS_CERTDIR: "/certs"
2022-12-07 14:08:54 +00:00
CONTAINER_PREFIX: 2023
CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/$CONTAINER_PREFIX:$CI_COMMIT_SHA
2020-10-05 12:13:28 +00:00
build-image:
image: docker:git
stage: build
services:
- docker:dind
script:
- apk update && apk add git
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --pull -f docker/Dockerfile -t $CONTAINER_IMAGE .
- docker push $CONTAINER_IMAGE
2019-06-21 09:39:58 +00:00
only:
2022-12-07 14:08:54 +00:00
- conf/2023
k8s-deploy-staging:
2019-06-21 09:39:58 +00:00
image: google/cloud-sdk
stage: deploy
script:
- echo "${CA_CERT}" > cert.crt
- kubectl config set-cluster cluster --server="${KUBE_SERVER}" --embed-certs=true --certificate-authority=cert.crt
2022-12-07 14:08:54 +00:00
- kubectl config set-context cluster --cluster=cluster --namespace=eo2023-staging --user=gitlab-ci
2019-06-21 09:39:58 +00:00
- kubectl config use-context cluster
- kubectl --token "${KUBE_TOKEN}" set image deployment/symposion-app symposion-app=$CONTAINER_IMAGE
2019-06-21 09:39:58 +00:00
when: manual
only:
2022-12-07 14:08:54 +00:00
- dev/2023
2019-06-21 09:39:58 +00:00
environment:
2022-12-07 14:08:54 +00:00
name: 2023/staging
url: https://staging-eo2023.osaconftools.net/
2019-06-21 09:39:58 +00:00
k8s-deploy-prod:
2018-06-10 09:12:14 +00:00
image: google/cloud-sdk
stage: deploy
script:
- echo "${CA_CERT}" > cert.crt
- kubectl config set-cluster cluster --server="${KUBE_SERVER}" --embed-certs=true --certificate-authority=cert.crt
2022-12-07 14:08:54 +00:00
- kubectl config set-context cluster --cluster=cluster --namespace=eo2023-prod --user=gitlab-ci
2018-06-10 09:12:14 +00:00
- kubectl config use-context cluster
- kubectl --token "${KUBE_TOKEN}" set image deployment/symposion-app symposion-app=$CONTAINER_IMAGE
2018-06-10 09:12:14 +00:00
when: manual
only:
2022-12-07 14:08:54 +00:00
- conf/2023
2018-06-10 09:12:14 +00:00
environment:
2022-12-07 14:08:54 +00:00
name: 2023/prod
url: https://2023.everythingopen.au/
2018-06-10 09:12:14 +00:00
.docs_template: &sphinx
2017-09-20 10:47:27 +00:00
image: alpine
script:
2020-11-23 23:49:41 +00:00
- apk --no-cache add py3-pip python3-dev make
2017-09-20 10:47:27 +00:00
- pip install sphinx
- cd docs
- make html
- cd ..
- mv docs/_build/html public
artifacts:
paths:
- public
pages:
<<: *sphinx
2021-07-05 10:25:39 +00:00
stage: build
2017-09-20 10:47:27 +00:00
only:
- master
2022-12-07 14:08:54 +00:00
- conf/2023
2017-10-13 23:32:46 +00:00
environment:
name: docs
url: https://laconfdev.gitlab.io/symposion_app/
2021-07-05 10:25:39 +00:00
build-sphinx:
<<: *sphinx
stage: build
2021-07-05 12:05:25 +00:00
except:
- master
2022-12-07 14:08:54 +00:00
- conf/2023