Skip to content

Commit 30c8a5c

Browse files
authored
Merge pull request #185 from ethosengine/staging
Decoupling components with versioning in the deployment pipeline
2 parents 4c9824c + a05b5d9 commit 30c8a5c

15 files changed

Lines changed: 341 additions & 74 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,7 @@ research/matrix/pinecone
5353
genesis/.blob-cache/
5454
/elohim/research/A2A/
5555
/elohim/research/a2a-go/
56+
57+
# Ephemeral SonarQube data (regenerated by sonar-issues-summary.sh)
58+
.claude/sonar-issues-raw.json
59+
.claude/sonar-issues-summary.json

Jenkinsfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,25 @@ def deployAppToEnvironment(String environment, String namespace, String deployme
8484
// Validate ConfigMap exists
8585
sh "kubectl get configmap elohim-config-${environment} -n ${namespace} || { echo 'ConfigMap missing'; exit 1; }"
8686

87-
// Update deployment manifest with image tag
88-
sh "sed 's/BUILD_NUMBER_PLACEHOLDER/${imageTag}/g' ${manifestPath} > ${manifestPath.replace('.yaml', '')}-${imageTag}.yaml"
87+
// Update deployment manifest with image tag (SITE_TAG_PLACEHOLDER)
88+
def outputFile = manifestPath.replace('.yaml', "-${environment}.rendered.yaml")
89+
sh "sed 's/SITE_TAG_PLACEHOLDER/${imageTag}/g' ${manifestPath} > ${outputFile}"
90+
91+
// Fail fast if any placeholders remain
92+
def remaining = sh(script: "grep -c '_PLACEHOLDER' ${outputFile} || true", returnStdout: true).trim()
93+
if (remaining != '0') {
94+
error "Unresolved placeholders in ${outputFile}!"
95+
}
8996

9097
// Preview manifest
9198
sh """
9299
echo '==== Deployment manifest preview ===='
93-
grep 'image:' ${manifestPath.replace('.yaml', '')}-${imageTag}.yaml
100+
grep 'image:' ${outputFile}
94101
echo '===================================='
95102
"""
96103

97104
// Deploy and rollout
98-
sh "kubectl apply -f ${manifestPath.replace('.yaml', '')}-${imageTag}.yaml"
105+
sh "kubectl apply -f ${outputFile}"
99106
sh "kubectl rollout restart deployment/${deploymentName} -n ${namespace}"
100107
sh "kubectl rollout status deployment/${deploymentName} -n ${namespace} --timeout=300s"
101108

VERSION

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
APP_VERSION=1.0.0
2-
HAPP_VERSION=1.0.0
1+
# Component versions - bump independently
2+
SITE_VERSION=1.0.0
3+
DOORWAY_VERSION=1.0.0
4+
EDGENODE_VERSION=1.0.0
5+
STORAGE_VERSION=1.0.0
6+
HAPP_INSTALLER_VERSION=1.0.0
7+
DOORWAY_APP_VERSION=1.0.0
8+
HAPP_VERSION=1.0.0
9+
WASM_CACHE_VERSION=1.0.0
10+
11+
# Backward compat (remove after full migration)
12+
APP_VERSION=1.0.0

elohim-app/manifests/alpha-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
spec:
1818
containers:
1919
- name: elohim-site-alpha
20-
image: harbor.ethosengine.com/ethosengine/elohim-site:BUILD_NUMBER_PLACEHOLDER
20+
image: harbor.ethosengine.com/ethosengine/elohim-site:SITE_TAG_PLACEHOLDER
2121
imagePullPolicy: Always
2222
ports:
2323
- containerPort: 80

elohim-app/manifests/prod-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
spec:
1818
containers:
1919
- name: elohim-site
20-
image: harbor.ethosengine.com/ethosengine/elohim-site:BUILD_NUMBER_PLACEHOLDER
20+
image: harbor.ethosengine.com/ethosengine/elohim-site:SITE_TAG_PLACEHOLDER
2121
imagePullPolicy: Always
2222
ports:
2323
- containerPort: 80
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
#TODO migrate to elohim-prod namespace when production cutover is complete.
21
apiVersion: networking.k8s.io/v1
32
kind: Ingress
43
metadata:
54
name: elohim-site-ingress
6-
namespace: ethosengine
5+
namespace: elohim-prod
76
annotations:
87
cert-manager.io/cluster-issuer: letsencrypt-production
98
spec:
@@ -22,4 +21,4 @@ spec:
2221
tls:
2322
- hosts:
2423
- elohim.host
25-
secretName: elohim-site-tls-cert
24+
secretName: elohim-site-tls-cert

elohim-app/manifests/staging-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
spec:
1818
containers:
1919
- name: elohim-site-staging
20-
image: harbor.ethosengine.com/ethosengine/elohim-site:BUILD_NUMBER_PLACEHOLDER
20+
image: harbor.ethosengine.com/ethosengine/elohim-site:SITE_TAG_PLACEHOLDER
2121
imagePullPolicy: Always
2222
ports:
2323
- containerPort: 80

environments/alpha.env

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Alpha Environment - auto-updated by pipeline after each deploy
2+
# Format: COMPONENT_TAG=harbor-image-tag
3+
SITE_TAG=dev-latest
4+
EDGENODE_TAG=dev-latest
5+
DOORWAY_TAG=dev-latest
6+
STORAGE_TAG=dev-latest
7+
HAPP_INSTALLER_TAG=dev-latest
8+
DOORWAY_APP_TAG=dev-latest
9+
HAPP_TAG=dev-latest

environments/prod.env

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Production Environment - auto-updated by pipeline after each deploy
2+
# Format: COMPONENT_TAG=harbor-image-tag
3+
SITE_TAG=latest
4+
EDGENODE_TAG=latest
5+
DOORWAY_TAG=latest
6+
STORAGE_TAG=latest
7+
HAPP_INSTALLER_TAG=latest
8+
DOORWAY_APP_TAG=latest
9+
HAPP_TAG=latest

environments/staging.env

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Staging Environment - auto-updated by pipeline after each deploy
2+
# Format: COMPONENT_TAG=harbor-image-tag
3+
SITE_TAG=dev-latest
4+
EDGENODE_TAG=dev-latest
5+
DOORWAY_TAG=dev-latest
6+
STORAGE_TAG=dev-latest
7+
HAPP_INSTALLER_TAG=dev-latest
8+
DOORWAY_APP_TAG=dev-latest
9+
HAPP_TAG=dev-latest

0 commit comments

Comments
 (0)