diff --git a/.circleci/config.yml b/.circleci/config.yml index a06048d9..6c57e335 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,21 @@ version: 2.1 +parameters: + stg-devops-path: + type: string + description: Path to the values for stg cluster + default: ./devops/stg.values.yaml + + ppd-devops-path: + type: string + description: Path to the values for ppd(prod) cluster + default: ./devops/ppd.values.yaml + + prod-devops-path: + type: string + description: Path to the values for prod cluster + default: ./devops/prd.values.yaml + orbs: kubernetes: circleci/kubernetes@1.0.0 helm: circleci/helm@2.0.1 @@ -39,7 +55,7 @@ jobs: name: Deploy command: > helm upgrade - lecoffre-back devops/ -i -f devops/ppd.values.yaml + lecoffre-back devops/ -i -f devops/<>.values.yaml -n lecoffre --create-namespace --set lecoffreBack.image.repository='rg.fr-par.scw.cloud/lecoffre/back' @@ -48,7 +64,7 @@ jobs: workflows: version: 2 - build-and-register: + build-and-deploy-stg: jobs: - build-push-docker-image: filters: @@ -56,11 +72,33 @@ workflows: only: /^v.*/ branches: ignore: /.*/ + context: + - staging - deploy-docker-image: requires: - build-push-docker-image context: - staging + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + + build-and-deploy-ppd: + jobs: + - build-push-docker-image: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + context: + - production + - deploy-docker-image: + requires: + - build-push-docker-image + context: - production filters: tags: @@ -68,3 +106,24 @@ workflows: branches: ignore: /.*/ + # build-and-deploy-prod: + # jobs: + # - build-push-docker-image: + # filters: + # tags: + # only: /^v.*/ + # branches: + # ignore: /.*/ + # context: + # - production + # - deploy-docker-image: + # requires: + # - build-push-docker-image + # context: + # - production + # filters: + # tags: + # only: /^v.*/ + # branches: + # ignore: /.*/ + diff --git a/devops/Chart.yaml b/devops/Chart.yaml index 91f31340..811868f9 100644 --- a/devops/Chart.yaml +++ b/devops/Chart.yaml @@ -21,5 +21,5 @@ version: 0.0.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: 0.4.7 +appVersion: 0.4.4