@@ -19,12 +19,12 @@ pipeline {
1919 }
2020 stage(' Build and Push Go Microservices' ) {
2121 agent { docker { image ' docker:24-dind' ; args ' --privileged' ; reuseNode true } }
22- when { anyOf { changeset " go-services/blockchain-monitor/**" ; changeset " go-services/anomaly-detector/**" } }
22+ when { anyOf { changeset " go-services/blockchain-monitor/**" ; changeset " go-services/anomaly-detector/**" ; changeset " go-services/dashboard/** " } }
2323 steps {
2424 withAWS(credentials : ' aws-credentials' , region : " ${ AWS_REGION} " ) {
2525 sh ' aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${ECR_REGISTRY}'
2626 script {
27- def services = [' blockchain-monitor' , ' anomaly-detector' ]
27+ def services = [' blockchain-monitor' , ' anomaly-detector' , ' dashboard ' ]
2828 services. each { svc ->
2929 sh " docker build -t ${ ECR_REGISTRY} /${ svc} :${ DOCKER_TAG} ./go-services/${ svc} "
3030 sh " docker push ${ ECR_REGISTRY} /${ svc} :${ DOCKER_TAG} "
@@ -33,24 +33,13 @@ pipeline {
3333 }
3434 }
3535 }
36- stage(' Build and Push Dashboard' ) {
37- agent { docker { image ' docker:24-dind' ; args ' --privileged' ; reuseNode true } }
38- when { changeset " dashboard/**" }
39- steps {
40- withAWS(credentials : ' aws-credentials' , region : " ${ AWS_REGION} " ) {
41- sh ' aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${ECR_REGISTRY}'
42- sh ' docker build -t ${ECR_REGISTRY}/dashboard:${DOCKER_TAG} ./dashboard' // Adjust if merged with anomaly-detector
43- sh ' docker push ${ECR_REGISTRY}/dashboard:${DOCKER_TAG}'
44- }
45- }
46- }
4736 stage(' Deploy to EKS' ) {
4837 steps {
4938 withAWS(credentials : ' aws-credentials' , region : " ${ AWS_REGION} " ) {
5039 sh ' helm upgrade --install ai-agent ./helm/ai-agent --namespace default --set image.repository=${ECR_REGISTRY}/ai-agent'
5140 sh ' helm upgrade --install blockchain-monitor ./helm/go-microservices/blockchain-monitor --namespace default --set image.repository=${ECR_REGISTRY}/blockchain-monitor'
5241 sh ' helm upgrade --install anomaly-detector ./helm/go-microservices/anomaly-detector --namespace default --set image.repository=${ECR_REGISTRY}/anomaly-detector'
53- sh ' helm upgrade --install dashboard ./helm/dashboard --namespace default --set image.repository=${ECR_REGISTRY}/dashboard'
42+ sh ' helm upgrade --install dashboard ./helm/go-microservices/ dashboard --namespace default --set image.repository=${ECR_REGISTRY}/dashboard'
5443 }
5544 }
5645 }
0 commit comments