Skip to content

Commit

Permalink
ONE-3416: Move helm chart to Operations repo
Browse files Browse the repository at this point in the history
  • Loading branch information
procivisAG committed Sep 17, 2024
1 parent e6edfc7 commit 716fd57
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 442 deletions.
51 changes: 18 additions & 33 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
image: node:18.16.0-alpine

include:
- project: "procivis/one/one-operations"
file:
- "gitlab/docker.gitlab-ci.yml"

variables:
YARN_CACHE_FOLDER: './.yarn/cache'
YARN_ENABLE_GLOBAL_CACHE: 'false'
Expand Down Expand Up @@ -55,27 +60,6 @@ stages:
rules:
- if: $CI_COMMIT_REF_NAME == "main"

.deploy_k8s:
image: registry.gitlab.procivis.ch/procivis/one/one-operations/az-helm-kubectl:1.25.7
dependencies: []
variables:
DEPLOY_IMAGE_TAG: $CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
K8S_TYPE: deployment
HELM_APP_NAME: react-native
HELM_PATH: app-components-chart
before_script:
- az aks install-cli
- az login --service-principal -u "$AAD_SERVICE_PRINCIPAL_CLIENT_ID" -p "$AAD_SERVICE_PRINCIPAL_CLIENT_SECRET" --tenant "$AD_TENANT_ID"
- az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME
- kubelogin convert-kubeconfig -l spn
script:
- cd "$HELM_PATH"
- >
helm upgrade --install $HELM_APP_NAME .
--values $HELM_VALUES_FILE
--set "image.tag=$DEPLOY_IMAGE_TAG"
--namespace $K8S_NAMESPACE
- kubectl rollout restart $K8S_TYPE $HELM_APP_NAME-$HELM_PATH --namespace=$K8S_NAMESPACE

build_deps:
stage: prepare
Expand Down Expand Up @@ -121,23 +105,17 @@ build:storybook:

publish:storybook:
stage: publish
image: docker:20
needs: [build:storybook]
dependencies: [build:storybook]
needs:
- job: build:storybook
artifacts: true
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE/storybook:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
services:
- docker:20-dind
script:
- docker build -t $IMAGE_TAG -f ./docker/Dockerfile .
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $IMAGE_TAG
extends:
- .docker_publish
- .only_main

publish:npm:
stage: deploy
needs: [test]
script:
- npm config set @procivis:registry https://${CI_SERVER_HOST}/api/v4/npm/
- npm config set //${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken ${CI_JOB_TOKEN}
Expand All @@ -148,10 +126,17 @@ publish:npm:

deploy:storybook:
stage: deploy
needs: [publish:storybook]
needs:
- publish:storybook
extends:
- .deploy_k8s
- .only_main
variables:
HELM_VALUES_FILE: values/app-components.dev.procivis-one.yaml
K8S_NAMESPACE: default
HELM_APP_NAME: react-native
HELM_PATH: charts/one-rn-components-chart
DEPLOY_IMAGE_TAG: $CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
trigger:
project: procivis/one/one-operations
branch: main
strategy: depend
23 changes: 0 additions & 23 deletions app-components-chart/.helmignore

This file was deleted.

6 changes: 0 additions & 6 deletions app-components-chart/Chart.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions app-components-chart/README.md

This file was deleted.

22 changes: 0 additions & 22 deletions app-components-chart/templates/NOTES.txt

This file was deleted.

62 changes: 0 additions & 62 deletions app-components-chart/templates/_helpers.tpl

This file was deleted.

68 changes: 0 additions & 68 deletions app-components-chart/templates/deployment.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions app-components-chart/templates/ingress.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions app-components-chart/templates/service.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions app-components-chart/templates/serviceaccount.yaml

This file was deleted.

Loading

0 comments on commit 716fd57

Please sign in to comment.