File diff 4f0871b0322a → 630bf4086135
.gitlab-ci.yml
Show inline comments
 
stages:
 
  - build
 
  - deploy
 

	
 
variables:
 
  DOCKER_TLS_CERTDIR: "/certs"
 
  CONTAINER_PREFIX: 2022
 
  CONTAINER_PREFIX: 2023
 
  CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/$CONTAINER_PREFIX:$CI_COMMIT_SHA
 

	
 
build-image:
 
  image: docker:git
 
  stage: build
 
  services:
...
 
@@ -15,45 +15,45 @@ build-image:
 
  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
 
  only:
 
    - "2022"
 
    - conf/2023
 

	
 
k8s-deploy-staging:
 
  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
 
  - kubectl config set-context cluster --cluster=cluster --namespace=lca2022-staging --user=gitlab-ci
 
  - kubectl config set-context cluster --cluster=cluster --namespace=eo2023-staging --user=gitlab-ci
 
  - kubectl config use-context cluster
 
  - kubectl --token "${KUBE_TOKEN}" set image deployment/symposion-app symposion-app=$CONTAINER_IMAGE
 
  when: manual
 
  only:
 
  - dev/2022
 
  - dev/2023
 
  environment:
 
    name: 2022/staging
 
    url: https://staging-lca2022.gc2020.org/
 
    name: 2023/staging
 
    url: https://staging-eo2023.osaconftools.net/
 

	
 
k8s-deploy-prod:
 
  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
 
  - kubectl config set-context cluster --cluster=cluster --namespace=lca2022-prod --user=gitlab-ci
 
  - kubectl config set-context cluster --cluster=cluster --namespace=eo2023-prod --user=gitlab-ci
 
  - kubectl config use-context cluster
 
  - kubectl --token "${KUBE_TOKEN}" set image deployment/symposion-app symposion-app=$CONTAINER_IMAGE
 
  when: manual
 
  only:
 
  - "2022"
 
  - conf/2023
 
  environment:
 
    name: 2022/prod
 
    url: https://lca2022.linux.org.au
 
    name: 2023/prod
 
    url: https://2023.everythingopen.au/
 

	
 
.docs_template: &sphinx
 
  image: alpine
 
  script:
 
  - apk --no-cache add py3-pip python3-dev make
 
  - pip install sphinx
...
 
@@ -67,17 +67,17 @@ k8s-deploy-prod:
 

	
 
pages:
 
  <<: *sphinx
 
  stage: build
 
  only:
 
  - master
 
  - "2022"
 
  - conf/2023
 
  environment:
 
    name: docs
 
    url: https://laconfdev.gitlab.io/symposion_app/
 

	
 
build-sphinx:
 
  <<: *sphinx
 
  stage: build
 
  except:
 
  - master
 
  - "2022"
 
  - conf/2023