Skip to content
Snippets Groups Projects
Commit 40bf9463 authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

ci: #be sketch deploy jobs

parent a4da2e44
No related branches found
No related tags found
No related merge requests found
Pipeline #23158 failed
...@@ -4,7 +4,6 @@ variables: ...@@ -4,7 +4,6 @@ variables:
stages: stages:
- build - build
- deploy - deploy
- setup
.be-build-job: .be-build-job:
variables: variables:
...@@ -27,17 +26,18 @@ stages: ...@@ -27,17 +26,18 @@ stages:
only: only:
- main - main
.be-deploy-job: #==[ Backend deployment ]=======================================================
variables:
KUBECTL_VERSION: v1.8.10
IMAGE_NAME: $CI_REGISTRY_IMAGE/backend
.be-deploy-job:
image: docker:latest
stage: deploy stage: deploy
tags: tags:
- commul - commul
image: docker:latest
services: services:
- docker:dind - docker:dind
variables:
KUBECTL_VERSION: v1.8.10
IMAGE_NAME: $CI_REGISTRY_IMAGE/backend
before_script: before_script:
- wget https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl - wget https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl
# NOTE: version is too ald and don't have sha256 available # NOTE: version is too ald and don't have sha256 available
...@@ -47,41 +47,32 @@ stages: ...@@ -47,41 +47,32 @@ stages:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN https://$CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN https://$CI_REGISTRY
script: script:
- kubectl version --client - kubectl version --client
- echo YAY! - docker pull ${IMAGE_NAME}:${CI_COMMIT_SHA}
- docker pull ${IMAGE_NAME}:main #- kubectl --namespace $K8S_NAMESPACE set image deployment/$K8S_DEPLOYMENT webserver=${IMAGE_NAME}:${CI_COMMIT_SHA}
#- kubectl --namespace kommul-dev set image deployment/merlin browser=${CONTAINER_IMAGE}:${CI_COMMIT_SHA}
only:
- main
.be-setup-job: be-prd-deploy-job:
image: node:16-alpine extends: .be-deploy-job
stage: setup environment:
cache: name: production/backend
- key: deployment_tier: production
files: url: https://kommul.eurac.edu/oetzi
- backend/package-lock.json variables:
paths: K8S_NAMESPACE: kommul
- backend/node_modules K8S_DEPLOYMENT: oetzi-prd-deployment
script: only: # TODO: only on tag
# TODO: drop python once we stop using sqlite3 in CI (soon, please) - main
- apk add --update python2 build-base
- cd backend
- npm install
- echo Success!
.fe-setup-job: be-stg-deploy-job:
image: node:16-alpine extends: .be-deploy-job
stage: setup environment:
cache: name: staging/backend
- key: deployment_tier: staging
files: url: https://kommul-dev.eurac.edu/oetzi
- frontend/package-lock.json variables:
paths: K8S_NAMESPACE: kommul-dev
- frontend/node_modules K8S_DEPLOYMENT: oetzi-stg-deployment
script: only:
- cd frontend - development
- npm install
- echo Success!
#==[ Frontend deployment ]====================================================== #==[ Frontend deployment ]======================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment