Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#GOV-547 Run Integration test #35

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8435b54
test deployment
Aug 9, 2023
1646443
add bpmn upload and update circleci
Aug 9, 2023
f373e38
add bpmn upload and update circleci
Aug 9, 2023
16773e3
fix fineract deployment
Aug 9, 2023
13555cc
fix the bpmn and secret
Aug 9, 2023
18c504f
fix fineract deploy
Aug 14, 2023
8366a19
test new release
Aug 16, 2023
90375cc
upsate docker image for curl command
Aug 16, 2023
2b35c49
fix elasticsearch-secret
Aug 16, 2023
9659b6e
helm test
Aug 17, 2023
ee2cbdb
fix importer_es image
Aug 17, 2023
b909192
fix chart
Aug 17, 2023
e996141
fix chart
Aug 17, 2023
e74cf50
helm install
Aug 17, 2023
e25015f
helm upgrade
Aug 17, 2023
d7f9fad
helm install
Aug 17, 2023
e5cc779
helm install
Aug 17, 2023
721b34f
helm install with new release name
Aug 17, 2023
97fb82b
helm install with g2p-sandbox release
Aug 17, 2023
a5164b9
test chart
Aug 17, 2023
561fe7e
helm test cluster setup
Aug 17, 2023
a1ec9a6
helm test in NS
Aug 18, 2023
c8615a6
deploy bpmn
Aug 18, 2023
ffcc295
enable mps with dockerimage
Aug 21, 2023
64e78f6
Add integration test cases
Aug 21, 2023
95e11f6
test with gradle command
Aug 21, 2023
f7c1513
test integration test cases
Aug 23, 2023
24917c8
test with ph-ee-connector
Aug 23, 2023
e88e0ce
test without ph-ee-connector
Aug 23, 2023
0c3fb8d
test bulk svc
Aug 23, 2023
204a896
test bulk svc
Aug 23, 2023
ea34b3e
test bulk svc
Aug 23, 2023
7dff1e8
helm test with attribute
Aug 23, 2023
7ed9c2f
helm test with attribute filter
Aug 23, 2023
3f65745
helm test with attribute filter
Aug 23, 2023
843bdd9
helm test with release name
Aug 23, 2023
edb37c1
test with iam
Aug 25, 2023
7346aa6
test with service names
Sep 11, 2023
9b7db6b
test v1.10.0
Sep 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
220 changes: 210 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,218 @@
version: 2.1
setup: true

orbs:
test-harness: govstack-working-group/[email protected]
aws-eks: circleci/[email protected]
slack: circleci/[email protected]
helm: circleci/[email protected]
kubernetes: circleci/[email protected]
aws-cli: circleci/[email protected]

jobs:
deploy-g2psandbox-govstack-chart:
docker:
- image: cimg/python:3.10
steps:
- checkout
- aws-cli/setup:
role_arn: "${AWS_CIRCLECI_ROLE_ARN}"
region: AWS_REGION
profile_name: "playground"
role_session_name: deploy-test
session_duration: '1800'
- helm/install-helm-client:
version: v3.2.0
- run:
name: Update kubeconfig
command: |
aws eks update-kubeconfig --name ${EKS_CLUSTER}

# Deploy Helm chart to EKS
- run:
name: Deploy Helm chart to EKS
command: |
# Clone your GitHub repository
git clone https://github.com/GovStackWorkingGroup/bb-payments.git
# Install Helm chart
# helm repo add fyn https://fynarfin.io/images/
# helm repo update
cd bb-payments/
helm dep up helm/govstack-chart
helm package helm/govstack-chart
helm upgrade --install -f helm/govstack-chart/values.yaml g2p-sandbox helm/govstack-chart --create-namespace --namespace paymenthub
# helm upgrade --install g2p-sandbox ./helm/govstack-chart
deploy-fineract-helm-chart:
docker:
- image: cimg/python:3.10
steps:
- checkout
- aws-cli/setup:
role_arn: "${AWS_CIRCLECI_ROLE_ARN}"
region: AWS_REGION
profile_name: "playground"
role_session_name: deploy-test
session_duration: '1800'
- helm/install-helm-client:
version: v3.2.0
- run:
name: Update kubeconfig
command: |
aws eks update-kubeconfig --name ${EKS_CLUSTER}
- helm/upgrade-helm-chart:
add-repo: "https://fynarfin.io/images/fineract/"
chart: "https://fynarfin.io/images/fineract/fin-engine-1.0.0-SNAPSHOT.tgz"
release-name: fineract
namespace: fineract
recreate-pods: true
wait: true
timeout: "300s"

create-secret:
docker:
- image: cimg/base:2022.06
steps:
- checkout
# - setup_remote_docker:
# version: 20.10.14
- aws-cli/setup:
role_arn: "${AWS_CIRCLECI_ROLE_ARN}"
region: AWS_REGION
profile_name: "playground"
role_session_name: deploy-test
session_duration: '1800'
- run:
name: Update kubeconfig
command: |
aws eks update-kubeconfig --name ${EKS_CLUSTER}
- kubernetes/install-kubectl
# - aws-eks/update-kubeconfig-with-authenticator:
# cluster-name: "GStack-sb-eks-plg"
# aws-region: "$REGION"
- run: |
cd helm/kibana-secret/
make secrets || echo "kibana" already exists
- run: |
cd helm/es-secret/
make secrets || echo "elastic-certificates" already exists

# - run: |
# kubectl delete secret bulk-processor-secret -n paymenthub || echo "delete the secret if exist"
# kubectl create secret generic bulk-processor-secret \
# --from-literal=aws-access-key="$S3_ACCESS_KEY_ID" \
# --from-literal=aws-secret-key="$S3_SECRET_ACCESS_KEY" -n paymenthub

deploying-bpmns:
docker:
- image: cimg/base:2022.06
- image: 'curlimages/curl:8.2.1'
steps:
- checkout
- aws-cli/setup:
role_arn: "${AWS_CIRCLECI_ROLE_ARN}"
region: AWS_REGION
profile_name: "playground"
role_session_name: deploy-test
session_duration: '1800'
- run:
name: Update kubeconfig
command: |
aws eks update-kubeconfig --name ${EKS_CLUSTER}
- run: sh orchestration/deployBpmn.sh

helm-test:
docker:
- image: cimg/python:3.10
steps:
- checkout
- aws-cli/setup:
role_arn: "${AWS_CIRCLECI_ROLE_ARN}"
region: AWS_REGION
profile_name: "playground"
role_session_name: deploy-test
session_duration: '1800'
- run:
name: Update kubeconfig
command: |
aws eks update-kubeconfig --name ${EKS_CLUSTER}
- helm/install-helm-client:
version: v3.2.0
- run:
name: Run Helm Tests
command: |
helm test g2p-sandbox --namespace paymenthub

test-chart-gov:
docker:
- image: cimg/openjdk:17.0.0
steps:
- run: git clone https://github.com/somanath21/ph-ee-integration-test.git
- run: cd ph-ee-integration-test && ./gradlew test -Dcucumber.filter.tags="@gov"
- store_test_results:
path: ph-ee-integration-test/build/cucumber.xml
- store_artifacts:
path: ph-ee-integration-test/build/reports/tests/test
test-chart-ams:
docker:
- image: cimg/openjdk:17.0.0
steps:
- run: git clone https://github.com/somanath21/ph-ee-integration-test.git
- run: cd ph-ee-integration-test && ./gradlew test -Dcucumber.filter.tags="@amsIntegration"
- store_test_results:
path: ph-ee-integration-test/build/cucumber.xml
- store_artifacts:
path: ph-ee-integration-test/build/reports/tests/test

workflows:
test_everything:
deploy:
jobs:
- test-harness/create-config:
post-steps: # Persist to workspace has to be defined in main workflow
- persist_to_workspace:
root: workspace
paths:
- generated.yml
- test-harness/execute-tests:
- deploy-g2psandbox-govstack-chart:
context: # CircleCI context containing AWS credentials
- AWS
- playground
- deploy-fineract-helm-chart:
context:
- AWS
- playground
- create-secret:
requires:
- test-harness/create-config
- deploy-g2psandbox-govstack-chart
context:
- AWS
- playground
- deploying-bpmns:
requires:
- deploy-g2psandbox-govstack-chart
context:
- AWS
- playground
- helm-test:
requires:
- create-secret
context:
- AWS
- playground
- test-chart-gov:
requires:
- create-secret
context:
- AWS
- playground
- test-chart-ams:
requires:
- create-secret
context:
- AWS
- playground



# - test-harness/create-config:
# post-steps: # Persist to workspace has to be defined in main workflow
# - persist_to_workspace:
# root: workspace
# paths:
# - generated.yml
# - test-harness/execute-tests:
# requires:
# - test-harness/create-config

Binary file added helm/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions helm/govstack-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ appVersion: 1.0.0

dependencies:
- name: ph-ee-g2psandbox
repository: https://fynarfin.io/images/ph-ee-g2psandbox-0.0.0
version: 0.0.0
repository: https://fynarfin.io/images/ph-ee-g2psandbox-1.2.0/
version: 1.2.0
Loading