Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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.
117 changes: 108 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,115 @@ setup: true

orbs:
test-harness: govstack-working-group/[email protected]
slack: circleci/[email protected]
helm: circleci/[email protected]
aws-eks: circleci/[email protected]
kubernetes: circleci/[email protected]
jobs:
build:
docker:
- image: cimg/python:3.10
working_directory: ~/repo
environment:
TERM: dumb
steps:
- checkout
- run: rm -f helm/govstack-chart/Chart.lock helm/govstack-chart/requirements.lock helm/govstack-chart/charts/*
- helm/install-helm-client:
version: "v3.8.2"
# - run: "sed -i '12s/.*/version: 0.0.0/' helm/g2p-sandbox-fynarfin-SIT/Chart.yaml"
- run: cat helm/govstack-chart/Chart.yaml
- run: helm dep up helm/govstack-chart
- run: helm package helm/govstack-chart
- run: helm repo index .
# - run: echo "$CERT_FILE" | base64 --decode > b64encoded.pem
# - run: chmod 400 b64encoded.pem
# - run: scp -o StrictHostKeyChecking=No -i b64encoded.pem index.yaml govstack-chart-1.0.0.tgz [email protected]:~/
# - run: ssh -i b64encoded.pem -o StrictHostKeyChecking=No [email protected] sudo mv -t /apps/apache-tomcat-7.0.82/webapps/ROOT/images/govstack-chart index.yaml govstack-chart-1.0.0.tgz
upgrade-g2psandbox-helm-chart:
docker:
- image: cimg/python:3.10
parameters:
cluster-name:
description: "sit"
type: string
steps:
- aws-eks/update-kubeconfig-with-authenticator:
cluster-name: "sit"
aws-region: "us-east-2"
- helm/install-helm-client:
version: "v3.8.2"
- run: helm ls --namespace=paymenthub
- helm/upgrade-helm-chart:
chart: "https://fynarfin.io/images/ph-ee-g2psandbox-fynarfin/govstack-chart-1.0.0.tgz"
release-name: "g2p-sandbox"
namespace: paymenthub
recreate-pods: true
add-repo: "https://fynarfin.io/images/govstack-chart"
wait: true
timeout: "300s"
# - run: helm test g2p-sandbox --namespace=paymenthub
# reset-values: true
# dry-run: true
# - helm/install-helm-chart:
# add-repo: "https://fynarfin.io/images/"
# chart: "https://fynarfin.io/images/ph-ee-g2psandbox-0.2.0.tgz"
# release-name: g2p-sandbox
# namespace: ph-test

# kubectl delete secrets elastic-certificates elastic-certificate-pem elastic-certificate-crt|| true


workflows:
test_everything:

# test_everything:
# 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:
# requires:
# - test-harness/create-config
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:
- build:
context:
- aws
- Helm
- slack
- upgrade-g2psandbox-helm-chart:
cluster-name: sit
requires:
- test-harness/create-config
- build
context:
- aws
- Helm
- slack
- Secrets
# test_everything:
# 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:
# requires:
# - test-harness/create-config

# workflows:
# test_everything:
# 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:
# requires:
# - test-harness/create-config
Loading