Commit ce6ea416 authored by Thomas Boni's avatar Thomas Boni
Browse files

Merge branch '62-updating-helm-to-use-new-ci-workflow' into latest

parents 3e4c4aa7 28e41be8
Loading
Loading
Loading
Loading

jobs/helm_deploy/README.md

deleted100644 → 0
+0 −42
Original line number Diff line number Diff line
# ☸️  Helm

🚧 *Work in progress*

<!--

Deploy on your kubernetes cluster using Helm charts.

* In issue branch: review environment
* In master branch: staging environment
* In master branch: production environment (manual)

* Chart and values files must be in repo, see Variables section
* Use [helm secrets](https://github.com/futuresimple/helm-secrets) to encrypt/decrypt secrets values files
* Values files must be named like `<ENV>.yaml` for clear text and `secrets.<ENV>.yaml` for encrypted

**Specifications**

* File: https://gitlab.com/go2scale/jobs/raw/2020-03-05_3/jobs/helm.gitlab-ci.yml
* Publications: *TODO*
* Image:
    * Repository: https://gitlab.com/go2scale/dockerfiles/helm
    * Documentation: https://go2scale.gitlab.io/dockerfiles/helm

**Variables**

| Name | Description | Default |
| ---- | ----------- | ------- |
| `REVIEW_DISABLE` | Disable review deployment | |
| `STAGING_DISABLE` | Disable staging deployment | |
| `PRODUCTION_DISABLE` | Disable production deployment | |
| `CHART_PATH` | Path of helm chart to use | `/charts/$CI_PROJECT_NAME` |
| `VALUES_PATH` | Path of values files to use | `./conf/values` |

**Secret variables**

| Name | Description | Type |
| ---- | ----------- | ------- |
| `PGP_PUBLIC` | Public PGP key to decrypt secrets values | `file` |
| `PGP_PRIVATE` | Private PGP key to decrypt secrets values | `file` |

-->

jobs/helm_deploy/helm_deploy.yml

deleted100644 → 0
+0 −46
Original line number Diff line number Diff line
# "Helm" jobs
# See https://gitlab.com/go2scale/jobs/ for more informations

stages:
  - review

.helm:
  image: registry.gitlab.com/go2scale/dockerfiles/helm:v0.2.3
  variables:
    CHART_PATH: "./charts/$CI_PROJECT_NAME"
    VALUES_PATH: "./conf/values"
    REGISTRY: "${CI_REGISTRY_IMAGE}/$CI_COMMIT_REF_SLUG"
  script:
    - /run.sh

deploy_review:
  extends: .helm
  stage: review
  environment:
    name: review/$CI_COMMIT_REF_SLUG
    url: https://${CI_ENVIRONMENT_SLUG}.${CI_PROJECT_NAME}.${KUBE_INGRESS_BASE_DOMAIN}/
    on_stop: cleanup_review
  except:
    refs:
      - master
    variables:
      - $REVIEW_DISABLE

cleanup_review:
  extends: .helm
  stage: review
  variables:
    GIT_STRATEGY: none
  when: manual
  script:
    - helm ls --all --short -n $KUBE_NAMESPACE | xargs -L1 helm -n $KUBE_NAMESPACE delete
#    - kubectl delete namespace $KUBE_NAMESPACE # TODO: it's forbidden due tu user RBAC
  environment:
    name: review/$CI_COMMIT_REF_SLUG
    action: stop
  allow_failure: true
  except:
    refs:
      - master
    variables:
      - $REVIEW_DISABLE

jobs/helm_deploy/job.yml

deleted100644 → 0
+0 −5
Original line number Diff line number Diff line
name: helm_deploy
description: A ready-to-use helm job to deploy your application
default_stage: deployment
icon: ☸️
maintainer: thomasboni
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
* Initial version
Loading