2021-07-05 10:20:24 +00:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- deploy
|
2017-10-04 12:40:47 +00:00
|
|
|
|
2021-07-05 10:20:24 +00:00
|
|
|
variables:
|
|
|
|
DOCKER_TLS_CERTDIR: "/certs"
|
2022-12-07 14:08:54 +00:00
|
|
|
CONTAINER_PREFIX: 2023
|
2021-07-05 10:20:24 +00:00
|
|
|
CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/$CONTAINER_PREFIX:$CI_COMMIT_SHA
|
2020-10-05 12:13:28 +00:00
|
|
|
|
2021-07-05 10:20:24 +00:00
|
|
|
build-image:
|
2018-07-01 15:54:59 +00:00
|
|
|
image: docker:git
|
|
|
|
stage: build
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
script:
|
2021-07-05 10:20:24 +00:00
|
|
|
- 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
|
2018-06-16 09:05:37 +00:00
|
|
|
|
2021-07-05 10:20:24 +00:00
|
|
|
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
|
2021-07-05 10:20:24 +00:00
|
|
|
- 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
|
|
|
|
2021-07-05 10:20:24 +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
|
2021-07-05 10:20:24 +00:00
|
|
|
- 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
|
|
|
|
2017-10-15 06:20:36 +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
|
2017-10-15 06:20:36 +00:00
|
|
|
|
|
|
|
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
|
2018-05-26 01:43:25 +00:00
|
|
|
url: https://laconfdev.gitlab.io/symposion_app/
|
2017-10-15 06:20:36 +00:00
|
|
|
|
2021-07-05 10:25:39 +00:00
|
|
|
build-sphinx:
|
2017-10-15 06:20:36 +00:00
|
|
|
<<: *sphinx
|
2018-06-16 09:05:37 +00:00
|
|
|
stage: build
|
2021-07-05 12:05:25 +00:00
|
|
|
except:
|
|
|
|
- master
|
2022-12-07 14:08:54 +00:00
|
|
|
- conf/2023
|