Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
DaviPtrs committed Dec 4, 2024
2 parents 6275393 + f0f6447 commit dcf5e08
Show file tree
Hide file tree
Showing 21 changed files with 246 additions and 177 deletions.
70 changes: 22 additions & 48 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,15 @@ steps:
# Set auxiliary environment variables
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
-f helm/values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
-f values.yaml -f apps/"$APP_NAME"/values.yaml
-f apps/"$APP_NAME"/values."$env_name".yaml
--set deployment.image.tag="$COMMIT_SHORT_SHA"
--wait renlabs/application
# Install application charts
- cd apps/"$APP_NAME"
- helmfile sync -e "$env_name" --set deployment.image.tag="$COMMIT_SHORT_SHA"

trigger:
branch:
Expand Down Expand Up @@ -106,20 +101,15 @@ steps:
# Set auxiliary environment variables
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
-f helm/values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
-f values.yaml -f apps/"$APP_NAME"/values.yaml
-f apps/"$APP_NAME"/values."$env_name".yaml
--set deployment.image.tag="$COMMIT_SHORT_SHA"
--wait renlabs/application
# Install application charts
- cd apps/"$APP_NAME"
- helmfile sync -e "$env_name" --set deployment.image.tag="$COMMIT_SHORT_SHA"

trigger:
branch:
Expand Down Expand Up @@ -179,13 +169,12 @@ steps:
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
-f helm/values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application charts
- cd apps/"$APP_NAME"
- export HELMFILE_ENVIRONMENT=$env_name
- helmfile sync --set deployment.image.tag="$COMMIT_SHORT_SHA"
- helmfile sync -e "$env_name" --set deployment.image.tag="$COMMIT_SHORT_SHA"

trigger:
branch:
Expand Down Expand Up @@ -242,20 +231,15 @@ steps:
# Set auxiliary environment variables
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
-f helm/values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
-f values.yaml -f apps/"$APP_NAME"/values.yaml
-f apps/"$APP_NAME"/values."$env_name".yaml
--set deployment.image.tag="$COMMIT_SHORT_SHA"
--wait renlabs/application
# Install application charts
- cd apps/"$APP_NAME"
- helmfile sync -e "$env_name" --set deployment.image.tag="$COMMIT_SHORT_SHA"

trigger:
branch:
Expand Down Expand Up @@ -312,20 +296,15 @@ steps:
# Set auxiliary environment variables
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
-f helm/values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
-f values.yaml -f apps/"$APP_NAME"/values.yaml
-f apps/"$APP_NAME"/values."$env_name".yaml
--set deployment.image.tag="$COMMIT_SHORT_SHA"
--wait renlabs/application
# Install application charts
- cd apps/"$APP_NAME"
- helmfile sync -e "$env_name" --set deployment.image.tag="$COMMIT_SHORT_SHA"

trigger:
branch:
Expand Down Expand Up @@ -382,20 +361,15 @@ steps:
# Set auxiliary environment variables
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
-f helm/values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
-f values.yaml -f apps/"$APP_NAME"/values.yaml
-f apps/"$APP_NAME"/values."$env_name".yaml
--set deployment.image.tag="$COMMIT_SHORT_SHA"
--wait renlabs/application
# Install application charts
- cd apps/"$APP_NAME"
- helmfile sync -e "$env_name" --set deployment.image.tag="$COMMIT_SHORT_SHA"

trigger:
branch:
Expand Down
41 changes: 41 additions & 0 deletions apps/commune-cache/helmfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
environments:
dev:
values:
- ../../helm/values.yaml
- values.yaml
- namespace: commune-dev-web-apps
- environmentName: dev
- wssApiEndpoint: wss://testnet.api.communeai.net
- releaseName: dev-commune-cache
- ingressHost: dev.cache.communeai.org
prod:
values:
- ../../helm/values.yaml
- values.yaml
- namespace: commune-prod-web-apps
- environmentName: prod
- wssApiEndpoint: wss://api.communeai.net
- releaseName: commune-cache
- ingressHost: cache.communeai.org

---
helmDefaults:
wait: true
createNamespace: false

repositories:
- name: renlabs
url: https://charts.renlabs.dev/

releases:
- name: '{{ .Values.releaseName }}'
namespace: '{{ .Values.namespace }}'
chart: renlabs/application
values:
- ../../helm/values.yaml.gotmpl
- ingress:
hosts:
- host: '{{ .Values.ingressHost }}'
paths:
- path: /
pathType: Prefix
10 changes: 0 additions & 10 deletions apps/commune-cache/values.dev.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions apps/commune-cache/values.prod.yaml

This file was deleted.

43 changes: 43 additions & 0 deletions apps/commune-governance/helmfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
environments:
dev:
values:
- ../../helm/values.yaml
- values.yaml
- namespace: commune-dev-web-apps
- environmentName: dev
- wssApiEndpoint: wss://testnet.api.communeai.net
- cacheUrl: https://dev.cache.communeai.org
- releaseName: dev-commune-governance
- ingressHost: dev.governance.communeai.org
prod:
values:
- ../../helm/values.yaml
- values.yaml
- namespace: commune-prod-web-apps
- environmentName: prod
- wssApiEndpoint: wss://api.communeai.net
- cacheUrl: https://cache.communeai.org
- releaseName: commune-governance
- ingressHost: governance.communeai.org

---
helmDefaults:
wait: true
createNamespace: false

repositories:
- name: renlabs
url: https://charts.renlabs.dev/

releases:
- name: '{{ .Values.releaseName }}'
namespace: '{{ .Values.namespace }}'
chart: renlabs/application
values:
- ../../helm/values.yaml.gotmpl
- ingress:
hosts:
- host: '{{ .Values.ingressHost }}'
paths:
- path: /
pathType: Prefix
11 changes: 0 additions & 11 deletions apps/commune-governance/values.dev.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions apps/commune-governance/values.prod.yaml

This file was deleted.

43 changes: 43 additions & 0 deletions apps/commune-page/helmfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
environments:
dev:
values:
- ../../helm/values.yaml
- values.yaml
- namespace: commune-dev-web-apps
- environmentName: dev
- wssApiEndpoint: wss://testnet.api.communeai.net
- cacheUrl: https://dev.cache.communeai.org
- releaseName: dev-commune-page
- ingressHost: dev.communeai.org
prod:
values:
- ../../helm/values.yaml
- values.yaml
- namespace: commune-prod-web-apps
- environmentName: prod
- wssApiEndpoint: wss://api.communeai.net
- cacheUrl: https://cache.communeai.org
- releaseName: commune-page
- ingressHost: communeai.org

---
helmDefaults:
wait: true
createNamespace: false

repositories:
- name: renlabs
url: https://charts.renlabs.dev/

releases:
- name: '{{ .Values.releaseName }}'
namespace: '{{ .Values.namespace }}'
chart: renlabs/application
values:
- ../../helm/values.yaml.gotmpl
- ingress:
hosts:
- host: '{{ .Values.ingressHost }}'
paths:
- path: /
pathType: Prefix
11 changes: 0 additions & 11 deletions apps/commune-page/values.dev.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions apps/commune-page/values.prod.yaml

This file was deleted.

43 changes: 43 additions & 0 deletions apps/commune-validator/helmfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
environments:
dev:
values:
- ../../helm/values.yaml
- values.yaml
- namespace: commune-dev-web-apps
- environmentName: dev
- wssApiEndpoint: wss://testnet.api.communeai.net
- cacheUrl: https://dev.cache.communeai.org
- releaseName: dev-commune-validator
- ingressHost: dev.validator.communeai.org
prod:
values:
- ../../helm/values.yaml
- values.yaml
- namespace: commune-prod-web-apps
- environmentName: prod
- wssApiEndpoint: wss://api.communeai.net
- cacheUrl: https://cache.communeai.org
- releaseName: commune-validator
- ingressHost: validator.communeai.org

---
helmDefaults:
wait: true
createNamespace: false

repositories:
- name: renlabs
url: https://charts.renlabs.dev/

releases:
- name: '{{ .Values.releaseName }}'
namespace: '{{ .Values.namespace }}'
chart: renlabs/application
values:
- ../../helm/values.yaml.gotmpl
- ingress:
hosts:
- host: '{{ .Values.ingressHost }}'
paths:
- path: /
pathType: Prefix
11 changes: 0 additions & 11 deletions apps/commune-validator/values.dev.yaml

This file was deleted.

Loading

0 comments on commit dcf5e08

Please sign in to comment.