diff --git a/app/Http/Controllers/Api/V1/MicroSoftTeamController.php b/app/Http/Controllers/Api/V1/MicroSoftTeamController.php index bbebdf5b1..cf55406d5 100644 --- a/app/Http/Controllers/Api/V1/MicroSoftTeamController.php +++ b/app/Http/Controllers/Api/V1/MicroSoftTeamController.php @@ -268,16 +268,16 @@ public function getUserPofile(GetUserProfileRequest $request) if ($accessToken && array_key_exists('access_token', $accessToken)) { $getProfile = $this->microsoftTeamRepository->getUserProfile($accessToken['access_token']); - return response([ - 'profile' => $getProfile, - ], 200); - } else { - return response([ - 'status_code' => 424, - 'errors' => $accessToken['error'], - 'message' => $accessToken['error_description'] - ], 500); + if ($getProfile && array_key_exists('displayName', $getProfile)) { + return response([ + 'profile' => $getProfile, + ], 200); + } } + + return response([ + 'profile' => 'Something went wrong with the login code or token, unable to fetch user profile', + ], 400); } /** diff --git a/app/Repositories/MicrosoftTeam/MicrosoftTeamRepository.php b/app/Repositories/MicrosoftTeam/MicrosoftTeamRepository.php index c67feefbb..59ffae424 100644 --- a/app/Repositories/MicrosoftTeam/MicrosoftTeamRepository.php +++ b/app/Repositories/MicrosoftTeam/MicrosoftTeamRepository.php @@ -418,7 +418,7 @@ private function getUserDetails($token) */ public function getUserProfile($token) { - $apiURL = $this->landingUrl . '/me'; + $apiURL = $this->landingUrl . '/profile'; $headers = [ 'Content-length' => 0, 'Content-type' => 'application/json', diff --git a/charts/curriki/Chart.yaml b/charts/curriki/Chart.yaml deleted file mode 100644 index 706342f41..000000000 --- a/charts/curriki/Chart.yaml +++ /dev/null @@ -1,3 +0,0 @@ -apiVersion: v2 -name: curriki -version: 3.0 \ No newline at end of file diff --git a/charts/curriki/templates/_helpers.tpl b/charts/curriki/templates/_helpers.tpl deleted file mode 100644 index 0285a0c68..000000000 --- a/charts/curriki/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "curriki.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "curriki.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "curriki.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "curriki.labels" -}} -helm.sh/chart: {{ include "curriki.chart" . }} -{{ include "curriki.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "curriki.selectorLabels" -}} -app.kubernetes.io/name: {{ include "curriki.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "curriki.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "curriki.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/charts/curriki/templates/acme-issuer.yaml b/charts/curriki/templates/acme-issuer.yaml deleted file mode 100644 index 10c5548e0..000000000 --- a/charts/curriki/templates/acme-issuer.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: cert-manager.io/v1 -kind: ClusterIssuer -metadata: - name: letsencrypt - namespace: cert-manager -spec: - acme: - server: https://acme-v02.api.letsencrypt.org/directory - email: alimehdi.official@gmail.com - privateKeySecretRef: - name: letsencrypt - solvers: - - http01: - ingress: - class: nginx \ No newline at end of file diff --git a/charts/curriki/templates/api-ing.yaml b/charts/curriki/templates/api-ing.yaml deleted file mode 100644 index cea68a2f4..000000000 --- a/charts/curriki/templates/api-ing.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: api-app - annotations: - kubernetes.io/ingress.class: nginx - cert-manager.io/cluster-issuer: "letsencrypt" - nginx.ingress.kubernetes.io/rewrite-target: /$2 -spec: - tls: - - hosts: - - stage.currikistudio.org - secretName: letsencrypt - rules: - - host: stage.currikistudio.org - http: - paths: - - pathType: Prefix - path: "/api(/|$)(.*)" - backend: - service: - name: api-svc - port: - number: 80 - \ No newline at end of file diff --git a/charts/curriki/templates/api.yaml b/charts/curriki/templates/api.yaml deleted file mode 100644 index 25b930361..000000000 --- a/charts/curriki/templates/api.yaml +++ /dev/null @@ -1,282 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-api - labels: - app: {{ .Release.Name }}-api -spec: - replicas: 3 - selector: - matchLabels: - app: {{ .Release.Name }}-api - template: - metadata: - labels: - app: {{ .Release.Name }}-api - annotations: - rollme: {{ randAlphaNum 5 | quote }} - spec: - containers: - - name: api - image: {{ .Values.image.apirepo}} #quay.io/curriki/api:stage - imagePullPolicy: Always - ports: - - containerPort: 80 - readinessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 5 - periodSeconds: 10 - livenessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 15 - periodSeconds: 20 - volumeMounts: - - name: api-env - mountPath: /var/www/html/.env - subPath: .env - - name: nfs-volume - mountPath: /var/www/html/storage - envFrom: - - secretRef: - name: api-env - resources: - limits: - cpu: 600m - memory: 1500Mi - requests: - cpu: 350m - memory: 800Mi - command: - - /bin/sh - - -c - - | - php /var/www/html/artisan storage:link - apache2ctl -D FOREGROUND - volumes: - - name: api-env - secret: - secretName: api-env - items: - - key: api-env-secret - path: .env - - name: nfs-volume - nfs: - server: 139.144.231.192 - path: /mnt/storage - readOnly: no - - ---- -apiVersion: v1 -kind: Service -metadata: - name: api-svc -spec: - type: ClusterIP - ports: - - port: 80 - targetPort: 80 - selector: - app: {{ .Release.Name }}-api - ---- -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ .Release.Name }}-api -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ .Release.Name }}-api - minReplicas: 3 - maxReplicas: 10 - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 50 - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: 50 - - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-cron - labels: - app: {{ .Release.Name }}-cron -spec: - replicas: 1 - selector: - matchLabels: - app: {{ .Release.Name }}-cron - template: - metadata: - labels: - app: {{ .Release.Name }}-cron - annotations: - rollme: {{ randAlphaNum 5 | quote }} - spec: - containers: - - name: api - image: {{ .Values.image.cronrepo}} - imagePullPolicy: Always - ports: - - containerPort: 80 - readinessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 5 - periodSeconds: 10 - livenessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 15 - periodSeconds: 20 - volumeMounts: - - name: api-env - mountPath: /var/www/html/.env - subPath: .env - - name: nfs-volume - mountPath: /var/www/html/storage - envFrom: - - secretRef: - name: api-env - command: - - /bin/sh - - -c - - | - php /var/www/html/artisan storage:link - service cron start - apache2ctl -D FOREGROUND - volumes: - - name: api-env - secret: - secretName: api-env - items: - - key: api-env-secret - path: .env - - - name: nfs-volume - nfs: - server: 139.144.231.192 - path: /mnt/storage - readOnly: no - - - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: migrations - annotations: - "helm.sh/hook": post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation -spec: - template: - spec: - containers: - - name: migration - image: {{ .Values.image.apirepo}} - imagePullPolicy: Always - command: - - /bin/sh - - -c - - php /var/www/html/artisan migrate --force - readinessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 5 - periodSeconds: 10 - livenessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 15 - periodSeconds: 20 - volumeMounts: - - name: api-env - mountPath: /var/www/html/.env - subPath: .env - - name: nfs-volume - mountPath: /var/www/html/storage - envFrom: - - secretRef: - name: api-env - restartPolicy: Never - volumes: - - name: api-env - secret: - secretName: api-env - items: - - key: api-env-secret - path: .env - - name: nfs-volume - nfs: - server: 139.144.231.192 - path: /mnt/storage - readOnly: no - backoffLimit: 4 - - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-queue - labels: - app: {{ .Release.Name }}-queue -spec: - replicas: 3 - selector: - matchLabels: - app: {{ .Release.Name }}-queue - template: - metadata: - labels: - app: {{ .Release.Name }}-queue - annotations: - rollme: {{ randAlphaNum 5 | quote }} - spec: - containers: - - name: queue - image: {{ .Values.image.apirepo}} - imagePullPolicy: Always - ports: - - containerPort: 80 - command: - - /bin/sh - - -c - - php /var/www/html/artisan queue:work --timeout=0 - volumeMounts: - - name: api-env - mountPath: /var/www/html/.env - subPath: .env - - name: nfs-volume - mountPath: /var/www/html/storage - envFrom: - - secretRef: - name: api-env - volumes: - - name: api-env - secret: - secretName: api-env - items: - - key: api-env-secret - path: .env - - name: nfs-volume - nfs: - server: 139.144.231.192 - path: /mnt/storage - readOnly: no \ No newline at end of file diff --git a/charts/curriki/templates/client.yaml b/charts/curriki/templates/client.yaml deleted file mode 100644 index 04f95b3ee..000000000 --- a/charts/curriki/templates/client.yaml +++ /dev/null @@ -1,160 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-client - labels: - app: {{ .Release.Name }}-client -spec: - replicas: 3 - selector: - matchLabels: - app: {{ .Release.Name }}-client - template: - metadata: - labels: - app: {{ .Release.Name }}-client - annotations: - rollme: {{ randAlphaNum 5 | quote }} - spec: - containers: - - name: client - image: {{ .Values.image.clientrepo}} - imagePullPolicy: Always - ports: - - containerPort: 80 - readinessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 5 - periodSeconds: 10 - livenessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 15 - periodSeconds: 20 - volumeMounts: - - name: client-env-local - mountPath: /usr/share/nginx/html/.env - subPath: .env - volumeMounts: - - name: client-env-script - mountPath: /usr/share/nginx/html/runtime-env.js - subPath: runtime-env.js - envFrom: - - configMapRef: - name: client-env - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 10m - memory: 20Mi - - volumes: - - name: client-env - configMap: - name: client-env - - name: client-env-local - configMap: - name: client-env-local - - name: client-env-script - configMap: - name: client-env-script - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: client-env -data: - REACT_APP_PEXEL_API: "563492ad6f91700001000001155d7b75f5424ea694b81ce9f867dddf" - REACT_APP_API_URL: "https://stage.currikistudio.org/api/api" - REACT_APP_RESOURCE_URL: "https://stage.currikistudio.org/api" - REACT_APP_GOOGLE_CAPTCHA: "6LdImbgZAAAAAN4s1eEi53-ul7uJfLONrFuBcKS0" - REACT_APP_GAPI_CLIENT_ID: "898143939834-9ioui2i9ghgrmcgmgtg0h6rsf83d0t0c.apps.googleusercontent.com" - REACT_APP_HUBSPOT: "7874555" - REACT_APP_API_VERSION: "v1" - REACT_APP_H5P_KEY: "B6TFsmFD5TLZaWCAYZ91ly0D2We0xjLAtRmBJzQ" - REACT_APP_TSUGI_SERVER_URL: "https://stage-tsugi.currikistudio.org/mod/curriki/" - REACT_APP_SHARED_PROJECT_DEMO_USER: "demoaccount@gmail.com" - REACT_APP_SHARED_PROJECT_DEMO_PASS: "Qwerty123" - REACT_APP_SHARED_PROJECT_USERID: "1608" - REACT_MS_APP_ID: "5e0ea881-693a-4f0a-94a7-dcef7b5accd6" - REACT_MS_TENANT_ID: "75f881ff-c83b-44de-a964-f0f9ee64c60c" - REACT_DOMAIN_URL: "https://stage.currikistudio.org/" - - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: client-env-local -data: - .env: | - REACT_APP_PEXEL_API=563492ad6f91700001000001155d7b75f5424ea694b81ce9f867dddf - REACT_APP_API_URL=https://stage.currikistudio.org/api/api - REACT_APP_RESOURCE_URL=https://stage.currikistudio.org/api - REACT_APP_GOOGLE_CAPTCHA=6LdImbgZAAAAAN4s1eEi53-ul7uJfLONrFuBcKS0 - REACT_APP_GAPI_CLIENT_ID=898143939834-9ioui2i9ghgrmcgmgtg0h6rsf83d0t0c.apps.googleusercontent.com - REACT_APP_HUBSPOT=7874555 - REACT_APP_API_VERSION=v1 - REACT_APP_H5P_KEY=B6TFsmFD5TLZaWCAYZ91ly0D2We0xjLAtRmBJzQ - REACT_APP_TSUGI_SERVER_URL=https://stage-tsugi.currikistudio.org/mod/curriki/ - REACT_APP_SHARED_PROJECT_DEMO_USER=demoaccount@gmail.com - REACT_APP_SHARED_PROJECT_DEMO_PASS=Qwerty123 - REACT_APP_SHARED_PROJECT_USERID=1608 - REACT_MS_APP_ID=5e0ea881-693a-4f0a-94a7-dcef7b5accd6 - REACT_MS_TENANT_ID=75f881ff-c83b-44de-a964-f0f9ee64c60c - REACT_DOMAIN_URL=https://stage.currikistudio.org/ - - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: client-env-script -data: - runtime-env.js: | - window.__RUNTIME_CONFIG__ = {"REACT_APP_PEXEL_API":"563492ad6f91700001000001155d7b75f5424ea694b81ce9f867dddf","REACT_APP_API_URL":"https://stage.currikistudio.org/api/api","REACT_APP_RESOURCE_URL":"https://stage.currikistudio.org/api","REACT_APP_GOOGLE_CAPTCHA":"6LdImbgZAAAAAN4s1eEi53-ul7uJfLONrFuBcKS0","REACT_APP_GAPI_CLIENT_ID":"898143939834-9ioui2i9ghgrmcgmgtg0h6rsf83d0t0c.apps.googleusercontent.com","REACT_APP_HUBSPOT":"7874555","REACT_APP_API_VERSION":"v1","REACT_APP_H5P_KEY":"B6TFsmFD5TLZaWCAYZ91ly0D2We0xjLAtRmBJzQ","REACT_APP_TSUGI_SERVER_URL":"https://stage-tsugi.currikistudio.org/mod/curriki/","REACT_APP_SHARED_PROJECT_DEMO_USER":"demoaccount@gmail.com","REACT_APP_SHARED_PROJECT_DEMO_PASS":"Qwerty123","REACT_APP_SHARED_PROJECT_USERID":"1608","REACT_MS_APP_ID":"5e0ea881-693a-4f0a-94a7-dcef7b5accd6","REACT_MS_TENANT_ID":"75f881ff-c83b-44de-a964-f0f9ee64c60c","REACT_DOMAIN_URL":"https://stage.currikistudio.org/"}; - ---- -apiVersion: v1 -kind: Service -metadata: - name: client-svc -spec: - type: ClusterIP - ports: - - port: 80 - targetPort: 80 - selector: - app: {{ .Release.Name }}-client - - ---- -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ .Release.Name }}-client -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ .Release.Name }}-client - minReplicas: 3 - maxReplicas: 10 - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 50 - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: 50 \ No newline at end of file diff --git a/charts/curriki/templates/ingress.yaml b/charts/curriki/templates/ingress.yaml deleted file mode 100644 index 96f4bacdc..000000000 --- a/charts/curriki/templates/ingress.yaml +++ /dev/null @@ -1,56 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: main-app - annotations: - kubernetes.io/ingress.class: nginx - cert-manager.io/cluster-issuer: "letsencrypt" -spec: - tls: - - hosts: - - stage.currikistudio.org - - stage-api.currikistudio.org - - stage-trax.currikistudio.org - - stage-tsugi.currikistudio.org - secretName: letsencrypt - rules: - - host: stage.currikistudio.org - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: client-svc - port: - number: 80 - - host: stage-api.currikistudio.org - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: api-svc - port: - number: 80 - - host: stage-trax.currikistudio.org - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: trax-svc - port: - number: 80 - - host: stage-tsugi.currikistudio.org - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: tsugi-svc - port: - number: 80 \ No newline at end of file diff --git a/charts/curriki/templates/trax.yaml b/charts/curriki/templates/trax.yaml deleted file mode 100644 index f519d0cfb..000000000 --- a/charts/curriki/templates/trax.yaml +++ /dev/null @@ -1,113 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-trax - labels: - app: {{ .Release.Name }}-trax -spec: - replicas: 3 - selector: - matchLabels: - app: {{ .Release.Name }}-trax - template: - metadata: - labels: - app: {{ .Release.Name }}-trax - annotations: - rollme: {{ randAlphaNum 5 | quote }} - spec: - # initContainers: - # - name: init-container - # image: quay.io/curriki/trax:latest - # command: [ "/bin/bash", "-c", "cd /var/www/html/storage && mkdir -p framework/views && mkdir -p framework/sessions && mkdir -p framework/cache/data && mkdir -p framework/testing && mkdir -p logs && mkdir -p app/public" ] - # volumeMounts: - # - mountPath: /var/www/html/storage - # name: trax-storage - containers: - - name: trax - image: {{ .Values.image.traxrepo}} - imagePullPolicy: Always - ports: - - containerPort: 6900 - readinessProbe: - tcpSocket: - port: 6900 - initialDelaySeconds: 5 - periodSeconds: 10 - livenessProbe: - tcpSocket: - port: 6900 - initialDelaySeconds: 15 - periodSeconds: 20 - volumeMounts: - - name: trax-env - mountPath: /var/www/html/.env - subPath: .env - - name: nfs-volume - mountPath: /var/www/html/storage - envFrom: - - secretRef: - name: trax-env - resources: - limits: - cpu: 400m - memory: 750Mi - requests: - cpu: 50m - memory: 100Mi - volumes: - # - name: trax-storage - # emptyDir: {} - - name: trax-env - secret: - secretName: trax-env - items: - - key: trax-env-secret - path: .env - - name: nfs-volume - nfs: - server: 139.144.231.192 - path: /mnt/traxstorage - readOnly: no - - - ---- -apiVersion: v1 -kind: Service -metadata: - name: trax-svc -spec: - type: ClusterIP - ports: - - port: 80 - targetPort: 6900 - selector: - app: {{ .Release.Name }}-trax - ---- -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ .Release.Name }}-trax -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ .Release.Name }}-trax - minReplicas: 3 - maxReplicas: 10 - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 50 - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: 50 \ No newline at end of file diff --git a/charts/curriki/templates/tsugi.yaml b/charts/curriki/templates/tsugi.yaml deleted file mode 100644 index 1819f5be7..000000000 --- a/charts/curriki/templates/tsugi.yaml +++ /dev/null @@ -1,111 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-tsugi - labels: - app: {{ .Release.Name }}-tsugi -spec: - replicas: 1 - selector: - matchLabels: - app: {{ .Release.Name }}-tsugi - template: - metadata: - labels: - app: {{ .Release.Name }}-tsugi - annotations: - rollme: {{ randAlphaNum 5 | quote }} - spec: - containers: - - name: tsugi - image: {{ .Values.image.tsugirepo}} - imagePullPolicy: Always - ports: - - containerPort: 80 - readinessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 5 - periodSeconds: 10 - livenessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 15 - periodSeconds: 20 - volumeMounts: - - name: tsugi-config - mountPath: /var/www/html/tsugi/config.php - subPath: config.php - - name: tsugi-mod-config - mountPath: /var/www/html/tsugi/mod/curriki/config.php - subPath: config.php - resources: - limits: - cpu: 400m - memory: 750Mi - requests: - cpu: 50m - memory: 100Mi - volumes: - - name: tsugi-config - secret: - secretName: tsugi-env - items: - - key: tsugi-env-secret - path: config.php - - name: tsugi-mod-config - configMap: - name: tsugi-mod-config - - - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: tsugi-mod-config -data: - config.php: | - > kubeconfig + /*stage('Deploy Helm') { + echo 'Copy' + sh 'curl https://raw.githubusercontent.com/helm/helm/v3.7.0/scripts/get-helm-3 | DESIRED_VERSION="v3.7.0" bash' + sh """ + #!/bin/bash + set -ex + echo "${kubeconfig}" >> kubeconfig """ - sh 'helm upgrade --install curriki charts/curriki -f charts/staging.yaml --namespace staging --kubeconfig $(pwd config)/kubeconfig' - } else { - echo 'No Kubernetes deployment' - } - } + sh 'helm upgrade --install curriki charts/curriki --namespace staging --kubeconfig $(pwd config)/kubeconfig' + }*/ @@ -70,4 +66,4 @@ node("currikidev") { } ) -} \ No newline at end of file +}